ID:               41642
 Updated by:       [EMAIL PROTECTED]
 Reported By:      kirys at neoteroi dot org
-Status:           Open
+Status:           Feedback
 Bug Type:         Reproducible crash
 Operating System: Centos 4
 PHP Version:      4.4.7
 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 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.


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

[2007-06-09 08:57:52] kirys at neoteroi dot org

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 this bug report at http://bugs.php.net/?id=41642&edit=1

Reply via email to