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

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, only 37.5% people, reproducting this bug has the same OS as
me.

There aren't segaults during HTTP request failed!, but there are other
segfaults releated to php engine.


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

[2004-07-19 01:00:06] 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-07-11 22:01:15] [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

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.


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

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

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

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