From: kirys at neoteroi dot org Operating system: Centos 4 PHP version: 4.4.7 PHP Bug Type: Reproducible crash Bug description: calling curl_init after using fsockopen cause segmentation fault
Description: ------------ Using curl_init() after using the fsockopen calls produce a segmentation fault into apache The script i've attached always reproduces the problem on my service provider server (just set the var to some working location) Cya Reproduce code: --------------- $file = fsockopen ($site, $port, $errno, $errstr,6); if (!$file) { echo "<sockmessage>$site, $port $errstr ($errno)</sockmessage>\n"; @fclose ($file); } else { socket_set_timeout($file,1); fputs ($file, "\n"); @fclose ($file); } $crl = curl_init(); $timeout = 2; curl_setopt ($crl, CURLOPT_URL,$url); curl_setopt ($crl, CURLOPT_RETURNTRANSFER, 1); curl_setopt ($crl, CURLOPT_CONNECTTIMEOUT, $timeout); $ret = curl_exec($crl); curl_close($crl); echo "$ret"; Expected result: ---------------- The contents of the url curl opened :) Actual result: -------------- Apache goes segfault -- Edit bug report at http://bugs.php.net/?id=41642&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=41642&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=41642&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=41642&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=41642&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=41642&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=41642&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=41642&r=needscript Try newer version: http://bugs.php.net/fix.php?id=41642&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=41642&r=support Expected behavior: http://bugs.php.net/fix.php?id=41642&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=41642&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=41642&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=41642&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=41642&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=41642&r=dst IIS Stability: http://bugs.php.net/fix.php?id=41642&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=41642&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=41642&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=41642&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=41642&r=mysqlcfg