From: mkwan at darkside dot com dot au Operating system: Linux (Fedora 7) PHP version: 5.2.3 PHP Bug Type: Reproducible crash Bug description: Segmentation fault when using FTP proxy
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 bug report at http://bugs.php.net/?id=42420&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=42420&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=42420&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=42420&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=42420&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=42420&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=42420&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=42420&r=needscript Try newer version: http://bugs.php.net/fix.php?id=42420&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=42420&r=support Expected behavior: http://bugs.php.net/fix.php?id=42420&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=42420&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=42420&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=42420&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=42420&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=42420&r=dst IIS Stability: http://bugs.php.net/fix.php?id=42420&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=42420&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=42420&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=42420&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=42420&r=mysqlcfg