#38393 [NEW]: Segmentation Fault when using curl_close in an object context

From: Date: Wed, 09 Aug 2006 05:49:53 +0000
Subject: #38393 [NEW]: Segmentation Fault when using curl_close in an object context
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-100558@lists.php.net to get a copy of this message
From: asubstitute at gmail dot com Operating system: RHEL4 PHP version: 5.1.4 PHP Bug Type: cURL related Bug description: Segmentation Fault when using curl_close in an object context Description: ------------ When I run "php /www/curltest.php" I see a Segmentation Fault. If I put "echo $this->responseData" before the call to curl_close, I see the response data. If I remove the call to curl_close, the script segfaults at the end, due to curl_close being called automatically. cURL was compiled from the newest tarball. This bug exists in the 5.2 snapshot too. php -v : PHP 5.1.4 (cgi-fcgi) (built: Aug 9 2006 00:24:52) Reproduce code: --------------- class curlTest { function __construct($url) { $this->responseData = null; $this->responseError = false; $this->curl = curl_init(); curl_setopt($this->curl, CURLOPT_URL, $url); } function makeRequest() { $this->responseData = curl_exec($this->curl); curl_close($this->curl); } } $interface = new curlTest("http://www.google.com/explanation.html"); $interface->makeRequest(); Expected result: ---------------- Nothing Actual result: -------------- Segmentation Fault -- Edit bug report at http://bugs.php.net/?id=38393&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=38393&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=38393&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=38393&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=38393&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=38393&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=38393&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=38393&r=needscript Try newer version: http://bugs.php.net/fix.php?id=38393&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=38393&r=support Expected behavior: http://bugs.php.net/fix.php?id=38393&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=38393&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=38393&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=38393&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=38393&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=38393&r=dst IIS Stability: http://bugs.php.net/fix.php?id=38393&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=38393&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=38393&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=38393&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=38393&r=mysqlcfg

« previous php.bugs (#100558) next »