ID:               42953
 Updated by:       [EMAIL PROTECTED]
 Reported By:      chcaron at nrcan dot gc dot ca
-Status:           Open
+Status:           Feedback
 Bug Type:         iPlanet related
 Operating System: Solaris 5.8
 PHP Version:      5CVS-2007-10-12 (snap)
 New Comment:

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)


Previous Comments:
------------------------------------------------------------------------

[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

Reply via email to