#40611 [NEW]: cURL memory error
| From: | zamorov at edinorog dot ru | Date: | Fri, 23 Feb 2007 18:05:35 +0000 |
| Subject: | #40611 [NEW]: cURL memory error | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-109421@lists.php.net to get a copy of this message | ||
From: zamorov at edinorog dot ru
Operating system: FreeBSD 4.11
PHP version: 4CVS-2007-02-23 (snap)
PHP Bug Type: cURL related
Bug description: cURL memory error
Description:
------------
cURL 1.15.5, 1.16.0 and 1.16.1
Got many error in log if request site with empty body.
Sample:
http://bar-navig.yandex.ru/u?sample=test
HTTP/1.1 200 Ok
Connection: close
Cache-control: no-cache, max-age=0
Expires: Thu, 01 Jan 1970 00:00:01 GMT
Content-Type: text/html; charset=windows-1251
and no body.
Reproduce code:
---------------
<?php
$curl = curl_init();
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HEADER, 0);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);
curl_setopt($curl, CURLOPT_USERAGENT, '');
curl_setopt($curl, CURLOPT_URL,
'http://bar-navig.yandex.ru/u?sample=test');
$return = curl_exec($curl);
echo (curl_errno($this->Curl) == 0) ? 'ok' : 'error';
?>
Expected result:
----------------
error.log
many lines with
httpd in free(): warning: page is already free
httpd in free(): warning: chunk is already free
and
Integer overflow in memory_limit check detected
Actual result:
--------------
Zero page.
--
Edit bug report at http://bugs.php.net/?id=40611&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40611&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40611&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40611&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=40611&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=40611&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=40611&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=40611&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=40611&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=40611&r=support
Expected behavior: http://bugs.php.net/fix.php?id=40611&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=40611&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=40611&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=40611&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40611&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=40611&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=40611&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=40611&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=40611&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=40611&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=40611&r=mysqlcfg