ID:               42420
 User updated by:  mkwan at darkside dot com dot au
 Reported By:      mkwan at darkside dot com dot au
-Status:           No Feedback
+Status:           Open
 Bug Type:         Reproducible crash
 Operating System: Linux (Fedora 7)
-PHP Version:      5.2.3
+PHP Version:      5.2.2
 New Comment:

Sorry, but I'm using an RPM installation, and I'm not in a position to
compile/install/test/remove a debugging version of PHP just so I can
submit a bug report.
I don't think a developer would have any trouble reproducing it.
One other piece of diagnostic information that may be useful: the
following line appears in the Apache log -
127.0.0.1 - - [23/Aug/2007:14:17:43 +1000] "GET
ftp://ftp2.bom.gov.au/anon/gen/radar/IDR463.gif HTTP/1.0" 200 22489 "-"
"-"
So it looks like PHP crashes *after* connecting to the proxy and
requesting the file.


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

[2007-09-04 01:00:00] 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".

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

[2007-08-27 09:21:40] [EMAIL PROTECTED]

And now read again the above mentioned page and reconfigure your PHP
isntallation using --enable-debug this time. Also, use the latest 5.2
CVS snapshot from: http://snaps.php.net/php5.2-latest.tar.gz



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

[2007-08-26 23:47:27] mkwan at darkside dot com dot au

#0  0x081ce50c in ?? ()
#1  0x08191a7e in ?? ()
#2  0x081ce9d4 in _php_stream_free ()
#3  0x081533fa in zif_file_get_contents ()
#4  0x08233b00 in ?? ()
#5  0x08223048 in execute ()
#6  0x0820241a in zend_execute_scripts ()
#7  0x081bc256 in php_execute_script ()
#8  0x082885ab in main ()

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

[2007-08-26 16:48:45] [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 for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

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.



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

[2007-08-25 02:51:01] mkwan at darkside dot com dot au

Description:
------------
Calling the file_get_contents() function with the ftp:// wrapper causes
a segmentation fault when an FTP proxy is enabled with the
stream_context_get_default function.

The machine is running Fedora 7 with an Apache server which has
proxying enabled.

Just for comparison, the following command DOES work -

export ftp_proxy=localhost:8080
wget ftp://ftp2.bom.gov.au/anon/gen/radar/IDR463.gif

Reproduce code:
---------------
<?php
    stream_context_get_default (
        array ("ftp" => array ("proxy" => "tcp://localhost:8080"))
    );

    $gif = file_get_contents
("ftp://ftp2.bom.gov.au/anon/gen/radar/IDR463.gif";);
    if ($gif === false)
        echo "failed\n";
    else
        echo "size = " . strlen ($gif) . "\n";
?> 

Expected result:
----------------
I expect to see a message of the form "size = 22544"

Actual result:
--------------
Segmentation fault


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


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

Reply via email to