ID: 42953 User updated by: chcaron at nrcan dot gc dot ca Reported By: chcaron at nrcan dot gc dot ca -Status: Open +Status: Closed Bug Type: iPlanet related Operating System: Solaris 5.8 PHP Version: 5CVS-2007-10-12 (snap) New Comment:
Too many problems with FastCGI (files from Sun are dating from 2005, so I don't think they're updated often...). We went back to NSAPI and it works ok again. You can close that bug as we won't be able to test it anymore. Previous Comments: ------------------------------------------------------------------------ [2007-10-18 14:25:11] [EMAIL PROTECTED] My problem was with sessions, I had not used session_write_close() in right place. So it's not related to this. ------------------------------------------------------------------------ [2007-10-17 12:51:38] [EMAIL PROTECTED] I have also some problem with file_get_contents() doing a request from same server. For me it just hangs though. ------------------------------------------------------------------------ [2007-10-15 15:50:31] chcaron at nrcan dot gc dot ca It is definitely not a firewall/permission issue, but it could be iPlanet or FastCGI module (from Sun?) related. The command line PHP works great for 5.2.x, but not for 4.4.7: nrn7# /usr/local/php-4.4.7/bin/php a.php Warning: file_get_contents(http://servername/b.php): failed to open stream: HTTP request failed! in /www/servername/a.php on line 4 nrn7# /usr/local/php-5.2.4/bin/php a.php Hello World! nrn7# /usr/local/php-5.2-snap/bin/php a.php Hello World! I can't test it on lighttpd or Apache (it has to work with iPlanet). ------------------------------------------------------------------------ [2007-10-15 10:18:40] [EMAIL PROTECTED] Can you please try the same but using lighttpd so that we can rule out any iPlanet issue? (note: I can't reproduce this using FastCGI on Apache or Lighttpd) And are you sure there isn't any permission issue, such as firewall or something like that? Try running the same script using PHP CLI binary. (And under same user as the fastcgi processes run as) ------------------------------------------------------------------------ [2007-10-12 19:45:24] chcaron at nrcan dot gc dot ca Description: ------------ We have a site that calls file_get_contents() to retrieve data from another file in the same site and display it on the screen. It used to work correctly when we used the NSAPI PHP. Now that we went to FastCGI, it doesn't work anymore, except if "b.php" is sitting on another site, on the same server or another one. I could reproduce the bug with 4.4.7, 5.2.4 and the latest 5.2 snapshot (before you ask to try). PHP was compiled with the following: ./configure --prefix=/usr/local/php-5.2-snap --enable-fastcgi --disable-libxml --disable-dom --disable-simplexml --disable-xml --disable-xmlreader --disable-xmlwriter --without-pear It is Sun Java System Web Server (formely known as iPlanet, or SunONE) 6.1 SP8 with the Sun's FastCGI plugin (http://www.sun.com/download/products.xml?id=42d693c3). Reproduce code: --------------- a.php contains: <?php $url="http://servername/b.php"; $file = file_get_contents($url); echo $file; ?> b.php contains: <? print "Hello World!"; ?> Expected result: ---------------- While browsing to http://servername/a.php, I should see: Hello World! Actual result: -------------- Warning: file_get_contents(http://servername/b.php) [function.file-get-contents]: failed to open stream: HTTP request failed! in /www/servername/a.php on line 3 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=42953&edit=1
