Jump to content

edfialk

Members
  • Posts

    10
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

edfialk's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. $string = iconv( "UTF-8", "ISO-8859-1//TRANSLIT", $string ); before inserting into database or before printing xml, works, changes characters, fixes everything. solved ?
  2. Hey WolfRage, thanks for the suggestion. I am actually using htmlentities() when printing the xml. Here's one example: here's normal: CLEVELAND — Cliffs Natural Resources announced Tuesday htmlspecialchars(): CLEVELAND — Cliffs Natural Resources announced Tuesday htmlentities(): CLEVELAND — Cliffs Natural Resources announced Tuesday still has that one weird character. edit: here's what it's supposed to be: CLEVELAND — Cliffs Natural Resources announced Tuesday retrieved through rss from the site: http://www.virginiamn.com/articles/2009/03/12/news/doc49b723040ada7276745703.txt
  3. Well, I edited the one file that occasionally worked, so I have nothing successful to compare it to. Either way, the code was the same in both places, now they're both officially acting the same way. Unfortunately, not the way I'd like. So: <?php $file = file_get_contents("http://pipes.yahoo.com/pipes/pipe.run?_id=d4e3810bb02299384206deb47536ac5c&_render=rss"); $xmlobj = simplexml_load_string($file); print header("Content-type: text/plain"); print $xmlobj->channel->item[0]->description; ?> is hosted at http://pocus.wustl.edu/delicious/simplexml.php and prints out: (Washington, D.C. – March 10, 2009) The U.S. Environmental Protection Agency both in command line and in Apache. I need it to print out: (Washington, D.C. – March 10, 2009) The U.S. Environmental Protection Agency which is description[0] (until something new is posted) directly from the source: http://pipes.yahoo.com/pipes/pipe.run?_id=d4e3810bb02299384206deb47536ac5c&_render=rss The problem, again, is I'm grabbing items from the feed, inserting into database, reading later with php from the database, printing out xml, reading from javascript, and doing some displaying. When I read items from the database and print out xml, the xml breaks as soon as a single one of these characters appears, breaking my javascript display. So I need to either allow the xml to not break if it sees a character, which I can't figure out how to do, or stop the characters from showing up. Any other questions I'll try to answer asap. Thanks for any suggestions! -Ed
  4. Hi all, got an unusual problem I'm really hoping I can get some help with. I'm using: PHP 5.2.8 (cli) (built: Dec 13 2008 18:38:00) and Apache After writing a big long script to retrieve an rss and do some things with it, I noticed some special characters appearing that broke my xml display. I made a small php file to test: $xmlobj = simplexml_load_file("http://pipes.yahoo.com/pipes/pipe.run?_id=d4e3810bb02299384206deb47536ac5c&_render=rss"); print header("Content-type: text/plain"); print $xmlobj->channel->item[0]->description; which, when viewed in Apache, results in: DES MOINES, Iowa —Adopting California-style vehicle emissions standards might be Iowa’s best... but when viewed in php from command line results in: DES MOINES, Iowa âAdopting California-style vehicle emissions standards might be Iowaâs best... Where did those come from?! if I copy that exact php file to another location (even same directory), then immediately run it from Apache, I get the results with special characters. One script works correctly in apache, but not command line. Exact same script renamed doesn't work in either. To be honest, I'm pretty amazed I got it to print out correctly the first time, since I can't seem to do it again in a fresh file or my long script. I'm too scared to modify the script that works correctly because I might break it. I want the hyphen and single quotes to come through, reliably, every time. Anyone have any ideas? Thanks for any and all suggestions! -Ed
  5. even changing the startup port for WAMP to 80, which I know for a fact is open (considering I was just using it), and shutting down the Liferay server doesn't change anything. So WAMP, all alone by itself runs perfectly from localhost, but when I access it by IP I get nothing but permission denied.
  6. Hi all, I really hope someone can help me out with this. I have both a Liferay running on Tomcat and a WAMP installation on a single Windows Server 2003 image. I had to put WAMP on port 8080 (for now), because Liferay is using port 80. So, everything works GREAT with wamp when I view http://localhost:8080, however when I view http://whatever.my.ip.is:8080, I get Forbidden! You don't have permission to access / on this server. It's not a firewall issue, as I've had the ports opened for this computer, so I'm totally stuck. Again, perfect execution from localhost, but even ON localhost, going to ip:8080 gives me access forbidden. Anyone have any ideas? I would be extremely grateful. -Ed
  7. there is a php.ini for each, but I'm keeping them seperate, as well as the .so files for each. I knew this would be a toughy.
  8. Thanks for quick reply. Yes they are. in php.ini: extension_dir = /var/www/html/extensions ... extension=mysql.so
  9. Hi all, I'm desperately trying to get a simple mysql connection working in php 4.3.9 and I think I have a doozy for you guys. First of all, I didn't set up ANY of this system, I'm just working with it. So, on Redhat, we have two versions of PHP - Apache uses 4.3.9, there's also a 4.4.2 that is default from command-line. 4.3.9 was installed by RPM, 4.4.2 was built from source. I can get mysql.so loaded and working fine in 4.4.2, but not in 4.3.9 (browser window). The error on Apache startup: PHP Warning: Unknown(): Unable to load dynamic library '/var/www/html/extensions/mysql.so' - /var/www/html/extensions/mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0 But I assure you the file and directory are there: [root@niceguy httpd]# ll /var/www/html/extensions total 1620 -rwxr-xr-x 1 root root 319888 Feb 2 10:06 gd.so -rwxr-xr-x 1 root root 45632 Feb 2 10:06 ldap.so -rwxr-xr-x 1 root root 41108 Feb 2 15:42 mysql.so -rwxr-xr-x 1 root root 1214134 Jan 19 10:24 php_mapscript.so See that php_mapscript.so. That loads fiine, perfectly in fact. Here's a little more info: [root@niceguy httpd]# rpm -qa | grep "php" php-ldap-4.3.9-3.22 php-mysql-4.3.9-3.22 php-gd-4.3.9-3.22 php-4.3.9-3.22 php-pear-4.3.9-3.22 So check this out: [root@niceguy mapserver]# /usr/bin/php -v PHP Warning: Unknown(): Unable to load dynamic library '/var/www/html/extensions/mysql.so' - /var/www/html/extensions/mysql.so: undefined symbol: php_sprintf in Unknown on line 0 PHP Warning: Unknown(): Unable to load dynamic library '/var/www/html/extensions/mysql.so' - /var/www/html/extensions/mysql.so: undefined symbol: php_sprintf in Unknown on line 0 PHP 4.3.9 (cgi) (built: Nov 2 2006 16:40:38) Copyright (c) 1997-2004 The PHP Group Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies [root@niceguy mapserver]# cp /usr/lib/php4/mysql.so /var/www/html/extensions cp: overwrite `/var/www/html/extensions/mysql.so'? y [root@niceguy mapserver]# /usr/bin/php -v PHP Warning: Unknown(): Unable to load dynamic library '/var/www/html/extensions/mysql.so' - /var/www/html/extensions/mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: Unknown(): Unable to load dynamic library '/var/www/html/extensions/mysql.so' - /var/www/html/extensions/mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0 See what I did? First I put the 4.4.2 built from source mysql.so connector into extensions directory and tried to load it - undefined symbol is understandable, so then I moved the 4.3.9 (supposedly working) version to my extensions and POOF file's not there.... You can even see that I overwrote the file. So apache was reading it before...but not now. Again, desperate. Anyone got any ideas? Thanks! -Ed
  10. Hi, all I'm trying to do is load the php_mapscript.so library into php. Here's the php file: [code]dl("php_mapscriot.so") if (extension_loaded("MapScript")) echo "works!"; else echo "doesn't work!"; print_r(get_loaded_extensions());[/code] Here's from the command line: [code][edfialk@niceguy mapserver]$ php phpinfo.php <HTML> works! <br>Array (     [0] => yp    [1] => xml    [2] => wddx    [3] => tokenizer    [4] => sysvshm    [5] => sysvsem    [6] =>standard    [7] => sockets    [8] => shmop    [9] => session    [10] => pspell    [11] => posix    [12] =>pcre    [13] => pcntl    [14] => overload    [15] => mime_magic    [16] => iconv    [17] => gmp    [18] => gettext    [19] => ftp    [20] => exif    [21] => dio    [22] => dbx    [23] => dba    [24] => curl    [25] => ctype    [26] => calendar    [27] => bz2    [28] => bcmath    [29] => zlib    [30] => openssl    [31] => MapScript    [32] => gd    [33] => ldap ) <br> Config file:/etc/php.ini [/code] Here's from the browser: (http://niceguy.wustl.edu/mapserver/phpinfo.php): [code]Warning: dl(): Unable to load dynamic library '/usr/lib64/php4/php_mapscript.so' - /usr/lib64/php4/php_mapscript.so: cannot open shared object file: Permission denied in /var/www/html/mapserver/phpinfo.php on line 22 doesn't work! Array ( [0] => yp [1] => xml [2] => wddx [3] => tokenizer [4] => sysvshm [5] => sysvsem [6] => standard [7] => sockets [8] => shmop [9] => session [10] => pspell [11] => posix [12] => pcre [13] => overload [14] => mime_magic [15] => iconv [16] => gmp [17] => gettext [18] => ftp [19] => exif [20] => dio [21] => dbx [22] => dba [23] => curl [24] => ctype [25] => calendar [26] => bz2 [27] => bcmath [28] => zlib [29] => openssl [30] => apache2handler [31] => gd [32] => ldap )[/code] RAWR Permission denied?! Apache is run as 'nobody', the php_mapscript.so has 777 permissions, user/group root/root.  I'm pretty desperate about this. Anyone have any ideas? Thanks in advance! -Ed
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.