ID:               28029
 Comment by:       maxim at enelis dot ru
 Reported By:      coadmin at hostings dot pl
 Status:           No Feedback
 Bug Type:         URL related
 Operating System: FreeBSD 4.9 and 5.2.1
 PHP Version:      4CVS-2004-04-16 (stable)
 New Comment:

Have the same problem on FreeBSD 5.3 Release. + Apache 2.0.48 or 2.0.52
 + PHP 4.3.8 + 4.3.9 + 4.3.10

--enable-debug doesn't solve the problem. Using --disable-all can't be
done because this is a production host. It worked without any problems
until last days. And right now fopen http doesnt work at all.

Have tested the same on FreeBSD 4.9 + Apache 2.0.48 + PHP 4.3.10. Works
correct with no problems.

The server where we catch this bug hosts about  500 virtualhosts. 

code:

<?
$r = fopen("http://ya.ru","r";);
fpassthru($r);
fclose($r);
?>

--
error:

Warning: fopen(http://ya.ru/): failed to open stream: HTTP request
failed! in /home/test/www/test2.php on line 6
--

Sometimes after "HTTP request failed!" there are some unreadable chars
as "".


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

[2004-11-10 01:00:08] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".

------------------------------------------------------------------------

[2004-11-02 10:41:52] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.0-win32-latest.zip

If using fsockopen and friends on servers with large numbers of error
logs configured and seeing memory corruption bugs or otherwise, then
that's bug 24189 - select vs FD_SETSIZE issues.

This is fixed for future 5.0.x releases (all praise Wez!), so try a
5.0.x snapshot.  Bugs in Fedora Core or RHEL PHP packages should be
reported to https://bugzilla.redhat.com/bugzilla/.


------------------------------------------------------------------------

[2004-11-01 15:51:16] tongsam at 126 dot com

I'v this problem too, on apache started a few hours, the logs:

kernel: pid 65604 (httpd), uid 1011: exited on signal 11

Freebsd 4.9 + Apache 2.0.52 + php 4.3.9

------------------------------------------------------------------------

[2004-10-08 01:02:52] joseph at digiweb dot net dot nz

Apache 2.0.46
PHP 4.3.2
Redhat Enterprise 3.0

We were seeing very similar behaviour to this with fopen, getimagesize,
etc, however, we were not experiencing any segfaults.

What we found was that first, the number of VirtualHosts we had defined
would affect the behaviour of this bug: If we had more than 502
virtualhosts, the fopen HTTP requests would fail, if we had 502 or
less, they would work correctly.

We thought it might have something to do with the number of open file
handles, but as far as we could tell, we were well clear of these
limits.

Then (basically by accident) we worked out that if we had each
VirtualHost use the same, global "ErrorLog" file, the problem went
away, as opposed to the situation before when we had seperate error
logs for each virtualhost.

We also had another test box, running Fedora Core 2, Apache 2.0.51, and
PHP 5.02, on which we were unable to reproduce the problem.

I hope this might possibly shed some light on things.

------------------------------------------------------------------------

[2004-09-02 00:02:10] maximander at gmail dot com

this has been happening to my site too.
the following code errors, as does almost any use of
file(),fopen(),file_get_contents() or readfile() on remote files.
fsockopen seems to work for now though.

<?
// error'ing code
$file = file("http://gerpok.darkflux.com/write.php";);
if(strpos($file[0],"you don't")) { echo "not updated";}
?>

and, whats more, after a recompile with --enable-debug, it is still
error'ing. anything useful we can do with a debug build that errors on
a regular basis?

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/28029

-- 
Edit this bug report at http://bugs.php.net/?id=28029&edit=1

Reply via email to