#28029 [Opn-Fbk]: HTTP request failed!

2004-11-02 Thread jorton
 ID:   28029
 Updated by:   [EMAIL PROTECTED]
 Reported By:  coadmin at hostings dot pl
-Status:   Open
+Status:   Feedback
 Bug Type: URL related
 Operating System: FreeBSD 4.9 and 5.2.1
 PHP Version:  4CVS-2004-04-16 (stable)
 New Comment:

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/.



Previous Comments:


[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?



[2004-08-18 08:58:26] andreizilla at gmail dot com

I'm having simular (same?) problems on:

* FreeBSD zig.andreib.com 5.2.1-RELEASE-p9 FreeBSD 5.2.1-RELEASE-p9 #0:
Sun Aug 15 18:42:43 CDT 2004
[EMAIL PROTECTED]:/usr/obj/usr/src/sys/MYKERNEL  i386
* Apache/1.3.31
* PHP Version 4.3.8 configuted with: './configure'
'--enable-versioning' '--enable-memory-limit' '--with-layout=GNU'
'--with-config-file-scan-dir=/usr/local/etc/php' '--disable-all'
'--with-regex=php' '--disable-cli' '--with-apxs=/usr/local/sbin/apxs'
'--disable-ipv6' '--prefix=/usr/local' 'i386-portbld-freebsd5.2.1'

Apache seems to be segfaulting every several minutes. This is what the
log files look like:

[Wed Aug 18 01:52:25 2004] [notice] child pid 18870 exit signal
Segmentation fault (11)
[Wed Aug 18 01:52:28 2004] [notice] child pid 18869 exit signal
Segmentation fault (11)
[Wed Aug 18 01:52:32 2004] [notice] child pid 18868 exit signal
Segmentation fault (11)
[Wed Aug 18 01:52:45 2004] [notice] child pid 18867 exit signal
Segmentation fault (11)
[Wed Aug 18 01:53:15 2004] [notice] child pid 18866 exit signal
Segmentation fault (11)

... times several hundred.

This also happends when I do `apachectl graceful'

If anyone knows where I can find more information on resolving this
problem please, please, please tell me. Thank you.

- andrei



[2004-07-25 14:02:46] coadmin at hostings dot pl

Hello,

sorry I couldn't use --disable-all on productive machine. There are too
many commercial hostings accounts.

But...

My problem was suddenly  resolved  about month ago before compiling
PHP. It was very strange. I didn't do any changes in Apache or PHP.
From one day up to now all is working correctly. There wasn't any HTTP
request failed!. Additionaly, I upgraded to 4.3.8 a week ago and there
is many many many less segfaults.

But... #2

On the other server (php 4.3.6) always was OK. After upgrade to PHP
4.3.8 I've again the same bug...

I really don't know what is it. Maybe it's OS releated? But as I see on
bug status, 

#28029 [Opn-Fbk]: HTTP request failed!

2004-07-11 Thread sniper
 ID:   28029
 Updated by:   [EMAIL PROTECTED]
 Reported By:  coadmin at hostings dot pl
-Status:   Open
+Status:   Feedback
 Bug Type: URL related
 Operating System: FreeBSD 4.9 and 5.2.1
 PHP Version:  4CVS-2004-04-16 (stable)
 New Comment:

Please try using this CVS snapshot:

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

And use EXACTLY this configure line:

# ./configure --with-apxs=/usr/local/apache/bin/apxs --disable-all
# make  make install
# /usr/local/apache/bin/apachectl stop  sleep 10
# /usr/local/apache/bin/apachectl start

Then test using the simplest script you could reproduce this problem
before.



Previous Comments:


[2004-05-24 04:25:00] joseph at xtremecorponline dot com

My mistake.  fopen causes these errors when the filename passed to it
does not exist, or is corrupted, on the server.  I hope that helps
narrow it down.



[2004-05-24 04:16:19] joseph at xtremecorponline dot com

Hello -
Running FreeBSD 4.9,PHP4.3.6.  

I get the same errors, fopen causing segmentation fault, which then
interrupts the browser's SSL connection. I have a script that
thumbnails images on the fly.  It's not all the time, but every once in
a while, fopen will cause this error:

 [error] PHP Warning:  fopen: failed to open stream: HTTP
 in /usr/local/www/site/phpthumb.php on line 615  

which is reported in my apache error log for the virtual host. 
consequently, immediately after, in the apache error-log in apache
root, this error occurs:

 child pid 43187 exit signal Segmentation fault (11)  (note the PID #
is always different as the apache processes recycle)


The script file is 1200 lines long, I'm sure yuo dont want it all, but
here is the area of line 615 as the error shows.  The code `if ($fp =
fopen($_REQUEST['src'], 'rb')) {` is line 615.

FreeBSD 4.9
Apache/1.3.29 
PHP/4.3.6
mod_ssl/2.8.16 
OpenSSL/0.9.6g

Am also running turck-mmcache 2.4.6

Please help with this.  Am also more than willing to get you any info
you need to help troubleshoot as fast as possible.

?php
ob_start();
if ($fp = fopen($_REQUEST['src'], 'rb')) {

$OriginalImageData = '';
do {
$buffer = fread($fp, 8192);
if (strlen($buffer) == 0) {
break;
}
$OriginalImageData .= $buffer;
} while (true);
fclose($fp);

} else {

$fopen_error = ob_get_contents();
ob_end_clean();
if (ini_get('allow_url_fopen')) {
ErrorImage('cannot open '.$_REQUEST['src'].' - 
fopen() said:
'.$fopen_error.'');
} else {
ErrorImage('allow_url_fopen disabled');
}

}
ob_end_clean();
?



[2004-05-09 11:35:57] coadmin at hostings dot pl

I'm still waiting for solution from PHP team.



[2004-05-06 23:28:52] bwb at bweebhosting dot com

I was having this problem and found someone who can fix it. Email
[EMAIL PROTECTED] and he can, he fixed it and mine is working fine as of
last night.



[2004-05-06 09:13:50] coadmin at hostings dot pl

The same problem reproduced in a few hours.



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=28029edit=1


#28029 [Opn-Fbk]: HTTP request failed!

2004-05-05 Thread edink
 ID:   28029
 Updated by:   [EMAIL PROTECTED]
 Reported By:  coadmin at hostings dot pl
-Status:   Open
+Status:   Feedback
 Bug Type: URL related
 Operating System: FreeBSD 4.9 and 5.2.1
 PHP Version:  4CVS-2004-04-16 (stable)
 New Comment:

By removing or commenting out all zend_extension= lines from
/usr/local/Zend/etc/php.ini and restarting apache.


Previous Comments:


[2004-05-05 13:45:59] coadmin at hostings dot pl

How to build without Zend Optimizer and others?

Now I'm using:
./configure --with-apxs=/usr/local/apache/bin/apxs --with-xml
--enable-bcmath --enable-calendar --with-curl --enable-ftp --with-gd
--with-jpeg-dir=/usr/local --with-png-dir=/usr
--with-xpm-dir=/usr/X11R6 --enable-magic-quote --with-mysql
--enable-discard-path --with-pear --enable-sockets --enable-track-vars
--enable-versioning --with-zlib

and it goes with Zend Optimizer like here:
http://69.93.217.178/info.php



[2004-04-30 12:24:28] bwb at bweebhosting dot com

I am having this problem as well. The interesting thing is that if I
run:

?
if (fopen(http://www.cnn.com,r)) echo OK;
?

Through a shell as root it works fine and returns ok, as well if I have
fopen open a local file. Through my web browser using it to open a
local file works as well and its only when its trying to open an
outside connection that it hangs. 

This seems to indicate its a run/permission problem with apache maybe?

Thanks, Ben W.



[2004-04-29 23:04:04] [EMAIL PROTECTED]

Disable all zend extensions first..then if you still get the segfault
with non-debug build, get a backtrace of THAT, it might show
_something_..




[2004-04-29 13:53:41] coadmin at hostings dot pl

Hello,

I cleared my own CFLAGS and also tried to compile with exported
CFLAGS=-O but problem is still recurrent.

I can't reproduce problem in --enable-debug.

I'm waiting for any other hints.



[2004-04-28 21:00:36] coadmin at hostings dot pl

Hello,

I'm still doing tests. I'll post answer soon. Please keep this ticket.
Thanks.



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=28029edit=1


#28029 [Opn-Fbk]: HTTP request failed!

2004-05-05 Thread sniper
 ID:   28029
 Updated by:   [EMAIL PROTECTED]
 Reported By:  coadmin at hostings dot pl
-Status:   Open
+Status:   Feedback
 Bug Type: URL related
 Operating System: FreeBSD 4.9 and 5.2.1
 PHP Version:  4CVS-2004-04-16 (stable)
 New Comment:

Remove --enable-versioning from your configure line for starters. 


Previous Comments:


[2004-05-05 16:23:31] coadmin at hostings dot pl

One more thing: now I haven't segfaults. I don't know how to  reproduce
segfaults, somethimes there are with HTTP request failed, sometimes
not. Now not.



[2004-05-05 16:18:26] coadmin at hostings dot pl

After commenting out Zend in php.ini, Zend Optimizer went down and
phpinfo() was right, without Zend Opt, but my problem isn't solved. I
reproduced bug in 15 minutes. 

So, only one way to prevent bug is --enable-debug in PHP.

I'm waiting for other hints.



[2004-05-05 15:55:47] [EMAIL PROTECTED]

By removing or commenting out all zend_extension= lines from
/usr/local/Zend/etc/php.ini and restarting apache.



[2004-05-05 13:45:59] coadmin at hostings dot pl

How to build without Zend Optimizer and others?

Now I'm using:
./configure --with-apxs=/usr/local/apache/bin/apxs --with-xml
--enable-bcmath --enable-calendar --with-curl --enable-ftp --with-gd
--with-jpeg-dir=/usr/local --with-png-dir=/usr
--with-xpm-dir=/usr/X11R6 --enable-magic-quote --with-mysql
--enable-discard-path --with-pear --enable-sockets --enable-track-vars
--enable-versioning --with-zlib

and it goes with Zend Optimizer like here:
http://69.93.217.178/info.php



[2004-04-30 12:24:28] bwb at bweebhosting dot com

I am having this problem as well. The interesting thing is that if I
run:

?
if (fopen(http://www.cnn.com,r)) echo OK;
?

Through a shell as root it works fine and returns ok, as well if I have
fopen open a local file. Through my web browser using it to open a
local file works as well and its only when its trying to open an
outside connection that it hangs. 

This seems to indicate its a run/permission problem with apache maybe?

Thanks, Ben W.



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=28029edit=1


#28029 [Opn-Fbk]: HTTP request failed!

2004-04-29 Thread sniper
 ID:   28029
 Updated by:   [EMAIL PROTECTED]
 Reported By:  coadmin at hostings dot pl
-Status:   Open
+Status:   Feedback
 Bug Type: URL related
 Operating System: FreeBSD 4.9 and 5.2.1
 PHP Version:  4CVS-2004-04-16 (stable)
 New Comment:

Disable all zend extensions first..then if you still get the segfault
with non-debug build, get a backtrace of THAT, it might show
_something_..



Previous Comments:


[2004-04-29 13:53:41] coadmin at hostings dot pl

Hello,

I cleared my own CFLAGS and also tried to compile with exported
CFLAGS=-O but problem is still recurrent.

I can't reproduce problem in --enable-debug.

I'm waiting for any other hints.



[2004-04-28 21:00:36] coadmin at hostings dot pl

Hello,

I'm still doing tests. I'll post answer soon. Please keep this ticket.
Thanks.



[2004-04-23 18:04:28] [EMAIL PROTECTED]

When compiling PHP without debug do you export your own 
CFLAGS? It is possible that with debug your compiler over 
optimizes and consequently breaks the code. If you are not 
setting any optimization options, try doing export 
CFLAGS=-O before running configure/make/make install 
procedure. 



[2004-04-21 15:30:27] coadmin at hostings dot pl

Heh, the problem is *strange*...

As you reqested, I decided to compile PHP with --enable-debug. All
problems went away... The aren't any segfaults and php stream releated
functions works correctly all the time.

When I compile PHP again, without debug, it reproduces errors
quickly...

I tried PHP-4.3.3 and 4.3.7dev - both of them works preety good with
--enable-debug, and reproduce erros in not debug mode.

What's it? Other configure options are the same. In --enable-debug only
Zend doesn't work, but my scripts doesn't use it.

Please help. I don't know gow to reproduce errors with --enable-debug.



[2004-04-21 09:29:27] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php

Once you have generated a backtrace, please submit it to this bug
report and change the status back to Open. Thank you for helping
us make PHP better.

We really need a backtrace.



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=28029edit=1


#28029 [Opn-Fbk]: HTTP request failed!

2004-04-23 Thread iliaa
 ID:   28029
 Updated by:   [EMAIL PROTECTED]
 Reported By:  coadmin at hostings dot pl
-Status:   Open
+Status:   Feedback
 Bug Type: URL related
 Operating System: FreeBSD 4.9 and 5.2.1
 PHP Version:  4CVS-2004-04-16 (stable)
 New Comment:

When compiling PHP without debug do you export your own 
CFLAGS? It is possible that with debug your compiler over 
optimizes and consequently breaks the code. If you are not 
setting any optimization options, try doing export 
CFLAGS=-O before running configure/make/make install 
procedure. 


Previous Comments:


[2004-04-21 15:30:27] coadmin at hostings dot pl

Heh, the problem is *strange*...

As you reqested, I decided to compile PHP with --enable-debug. All
problems went away... The aren't any segfaults and php stream releated
functions works correctly all the time.

When I compile PHP again, without debug, it reproduces errors
quickly...

I tried PHP-4.3.3 and 4.3.7dev - both of them works preety good with
--enable-debug, and reproduce erros in not debug mode.

What's it? Other configure options are the same. In --enable-debug only
Zend doesn't work, but my scripts doesn't use it.

Please help. I don't know gow to reproduce errors with --enable-debug.



[2004-04-21 09:29:27] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php

Once you have generated a backtrace, please submit it to this bug
report and change the status back to Open. Thank you for helping
us make PHP better.

We really need a backtrace.



[2004-04-21 07:51:08] coadmin at hostings dot pl

Latest stable PHP from CVS wasn't helpful for me, but is difference...

Apr 21 01:48:37 gw kernel: pid 44845 (httpd), uid 65534: exited on
signal 11
Apr 21 01:48:37 gw kernel: pid 45103 (httpd), uid 65534: exited on
signal 11
Apr 21 01:48:38 gw kernel: pid 45391 (httpd), uid 65534: exited on
signal 11
Apr 21 02:00:20 gw kernel: pid 70302 (httpd), uid 65534: exited on
signal 11
Apr 21 02:13:17 gw kernel: pid 91837 (httpd), uid 65534: exited on
signal 11
Apr 21 02:13:17 gw kernel: pid 80739 (httpd), uid 65534: exited on
signal 11
Apr 21 02:13:18 gw kernel: pid 79870 (httpd), uid 65534: exited on
signal 11
Apr 21 02:13:18 gw kernel: pid 79954 (httpd), uid 65534: exited on
signal 11
Apr 21 02:13:19 gw kernel: pid 80397 (httpd), uid 65534: exited on
signal 11
Apr 21 02:13:19 gw kernel: pid 92146 (httpd), uid 65534: exited on
signal 11
Apr 21 02:13:19 gw kernel: pid 80029 (httpd), uid 65534: exited on
signal 11
Apr 21 02:13:20 gw kernel: pid 91777 (httpd), uid 65534: exited on
signal 11
Apr 21 02:13:20 gw kernel: pid 80190 (httpd), uid 65534: exited on
signal 11
Apr 21 02:13:21 gw kernel: pid 80104 (httpd), uid 65534: exited on
signal 11
Apr 21 02:13:21 gw kernel: pid 92057 (httpd), uid 65534: exited on
signal 11

I can't do GDB because there are child processes, not root, and also I
haven't httpd.core.

Now I can't see HTTP request failed! but document contains no data.
(unexpected network error in lynx).



[2004-04-20 20:42:35] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2004-04-20 11:41:04] servers at apandres dot com

I have the same problem, php 4.3.3 on redhat. i am checking for a
reciprocal link of a submitted page. it is working for a few hours and
then nothing can be submitted any more. same error msg. after apache
restart everything is ok again for the next few hours. i did not notice
this in php 4.3.2



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=28029edit=1


#28029 [Opn-Fbk]: HTTP request failed!

2004-04-21 Thread derick
 ID:   28029
 Updated by:   [EMAIL PROTECTED]
 Reported By:  coadmin at hostings dot pl
-Status:   Open
+Status:   Feedback
 Bug Type: URL related
 Operating System: FreeBSD 4.9 and 5.2.1
 PHP Version:  4CVS-2004-04-16 (stable)
 New Comment:

Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php

Once you have generated a backtrace, please submit it to this bug
report and change the status back to Open. Thank you for helping
us make PHP better.

We really need a backtrace.


Previous Comments:


[2004-04-21 07:51:08] coadmin at hostings dot pl

Latest stable PHP from CVS wasn't helpful for me, but is difference...

Apr 21 01:48:37 gw kernel: pid 44845 (httpd), uid 65534: exited on
signal 11
Apr 21 01:48:37 gw kernel: pid 45103 (httpd), uid 65534: exited on
signal 11
Apr 21 01:48:38 gw kernel: pid 45391 (httpd), uid 65534: exited on
signal 11
Apr 21 02:00:20 gw kernel: pid 70302 (httpd), uid 65534: exited on
signal 11
Apr 21 02:13:17 gw kernel: pid 91837 (httpd), uid 65534: exited on
signal 11
Apr 21 02:13:17 gw kernel: pid 80739 (httpd), uid 65534: exited on
signal 11
Apr 21 02:13:18 gw kernel: pid 79870 (httpd), uid 65534: exited on
signal 11
Apr 21 02:13:18 gw kernel: pid 79954 (httpd), uid 65534: exited on
signal 11
Apr 21 02:13:19 gw kernel: pid 80397 (httpd), uid 65534: exited on
signal 11
Apr 21 02:13:19 gw kernel: pid 92146 (httpd), uid 65534: exited on
signal 11
Apr 21 02:13:19 gw kernel: pid 80029 (httpd), uid 65534: exited on
signal 11
Apr 21 02:13:20 gw kernel: pid 91777 (httpd), uid 65534: exited on
signal 11
Apr 21 02:13:20 gw kernel: pid 80190 (httpd), uid 65534: exited on
signal 11
Apr 21 02:13:21 gw kernel: pid 80104 (httpd), uid 65534: exited on
signal 11
Apr 21 02:13:21 gw kernel: pid 92057 (httpd), uid 65534: exited on
signal 11

I can't do GDB because there are child processes, not root, and also I
haven't httpd.core.

Now I can't see HTTP request failed! but document contains no data.
(unexpected network error in lynx).



[2004-04-20 20:42:35] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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





[2004-04-20 11:41:04] servers at apandres dot com

I have the same problem, php 4.3.3 on redhat. i am checking for a
reciprocal link of a submitted page. it is working for a few hours and
then nothing can be submitted any more. same error msg. after apache
restart everything is ok again for the next few hours. i did not notice
this in php 4.3.2



[2004-04-18 00:59:25] coadmin at hostings dot pl

Maybe, old one was unclear, this the easiest way to reproduce this
bug:

?
if (fopen(http://www.cnn.com,r)) echo OK;
?

Online url: http://69.93.217.178/test.php

If fails it shows:
Warning: fopen(http://www.cnn.com): failed to open stream: HTTP request
failed!  in /home/homepage/public_html/test.php on line 2

If works shows:
OK

Please help. Best regards.



[2004-04-18 00:02:34] coadmin at hostings dot pl

inessential, my solution was wrong. this is not it. please make your
investigations into this problem. thanks.



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=28029edit=1


#28029 [Opn-Fbk]: HTTP request failed!

2004-04-20 Thread wez
 ID:   28029
 Updated by:   [EMAIL PROTECTED]
 Reported By:  coadmin at hostings dot pl
-Status:   Open
+Status:   Feedback
 Bug Type: URL related
 Operating System: FreeBSD 4.9 and 5.2.1
 PHP Version:  4CVS-2004-04-16 (stable)
 New Comment:

Please try using this CVS snapshot:

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




Previous Comments:


[2004-04-20 11:41:04] servers at apandres dot com

I have the same problem, php 4.3.3 on redhat. i am checking for a
reciprocal link of a submitted page. it is working for a few hours and
then nothing can be submitted any more. same error msg. after apache
restart everything is ok again for the next few hours. i did not notice
this in php 4.3.2



[2004-04-18 00:59:25] coadmin at hostings dot pl

Maybe, old one was unclear, this the easiest way to reproduce this
bug:

?
if (fopen(http://www.cnn.com,r)) echo OK;
?

Online url: http://69.93.217.178/test.php

If fails it shows:
Warning: fopen(http://www.cnn.com): failed to open stream: HTTP request
failed!  in /home/homepage/public_html/test.php on line 2

If works shows:
OK

Please help. Best regards.



[2004-04-18 00:02:34] coadmin at hostings dot pl

inessential, my solution was wrong. this is not it. please make your
investigations into this problem. thanks.



[2004-04-17 20:53:19] coadmin at hostings dot com dot pl

Please hold one for one day, maybe I've solution. I must test it. I
will write what about it in 24h. Regards.



[2004-04-17 19:15:59] coadmin at hostings dot pl

It's code of PHP script which make error [2].

$check is delivered by POST method from HTML form.

sprawdz.php:

?
$id = ;
$code = x,x,x,x,x;
$type = sms,c1;

$handle =
fopen(http://allpay.pl/check_code.php?id=.$id.code=.$code.c
heck=.$check.type=.$type., 'r');
$status = fgets($handle, 8);
$czas_zycia = fgets($handle, 24);
fclose($handle);
$czas_zycia = rtrim($czas_zycia);
if ($status == 0) {print pass is bad - try again; exit;}  else
{  # if pass is good:
if (!isset($_COOKIE['ActiveCode']))
{
setcookie('ActiveCode',1, time()+$czas_zycia);
}
else
{
setcookie('ActiveCode',0, time()+2, /);
setcookie('ActiveCode',1, time()+$czas_zycia, /);
}
header(Location: index1.php);
}
?


full error:

Warning:
fopen(http://allpay.pl/check_code.php?id=code=x,x,x,x,xcheck=yourpassword8type=sms,c1):
failed to open stream: HTTP request failed! AeáW in
/home/prospl/public_html/sprawdz.php on line 20
Warning: fgets(): supplied argument is not a valid stream resource in
/home/prospl/public_html/sprawdz.php on line 21
Warning: fgets(): supplied argument is not a valid stream resource in
/home/prospl/public_html/sprawdz.php on line 22
Warning: fclose(): supplied argument is not a valid stream resource in
/home/prospl/public_html/sprawdz.php on line 23


line in error (20) is: $handle = fopen(http://..;

Online URL: http://www.pros.pl/ (it is working now)

Form is from the left side with button Wchodze do bazy. You could
give any password there. It should shows Kod niepoprawny - wpisz
ponownie. - it means bad password. If fails, is timeout and it shows
error message as above.

IMHO, there aren't any mistakes in php code, the problem is to open
sockets with http://; url.

I'll provide GDB backtrace asap. I'm not sure if it will be possible,
because PHP still works, and there aren't any crashes. Crash was my
word to describe that these functions stopped to work.



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=28029edit=1


#28029 [Opn-Fbk]: HTTP request failed!

2004-04-16 Thread sniper
 ID:   28029
 Updated by:   [EMAIL PROTECTED]
 Reported By:  coadmin at hostings dot pl
-Status:   Open
+Status:   Feedback
 Bug Type: URL related
 Operating System: FreeBSD 4.9 and 5.2.1
 PHP Version:  4CVS-2004-04-16 (stable)
 New Comment:

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with ?php and ends with ?,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try avoid embedding huge scripts into the report.

And also a GDB backtrace of the crash. (configure with
--enable-debug!)




Previous Comments:


[2004-04-16 18:32:21] coadmin at hostings dot pl

Description:

PHP randomly crashes(?) and some functions couldn't open HTTP
connection. I found these are bad:

getimagesize()

fopen()

fsockopen()

and others...



I checked two different servers with different hardware and different
systems: FreeBSD 4.9-STABLE and FreeBSD 5.2.1-p3. I checked following
PHP versions: 4.3.3, 4.3.4, 4.3.5, 4.3.6, 4.3.7-dev. All are affected.
Apache version is 1.3.29. PHP is compiled as mod_php.





Reproduce code:
---
URL requests crashes about a few minutes to a few hours after starting
apache. Apache restart is helpfull and make functions working again for
next a few hours. After it is the same, next restart, works for some
time, and the same... During crash others PHP functions works well.

Actual result:
--
Sample logs:



[1]



PHP Warning:  getimagesize(http://foo.com/image.jpg): failed to open
stream: HTTP request failed! ^L°^R^A in /home/foo/public_html/index.php
on line 1053



[2]



PHP Warning:  fopen(http://foo.com/check.php?id=111code=xxx): failed
to open stream: HTTP request failed! @Áå^L in
/home/foo/public_html/check.php on line 19



[3]



PHP Warning:  copy(http://foo.com/file.php?board=2700zip=1): failed to
open stream: HTTP request failed! ^LpLÒ^K in

 /home/foo/public_html/zip.php on line 44



And many others... I'm always receiving strange code after the HTTP
request failed! info.





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