Edit report at https://bugs.php.net/bug.php?id=33570&edit=1
ID: 33570
Comment by: vps3721 at gmail dot com
Reported by: eja40 at cam dot ac dot uk
Summary: curl_errno does not return error codes on multi
handles
Status: No Feedback
Type: Bug
Package: cURL related
Operating System: Redhat 9
PHP Version: 5.0.4
Block user comment: N
Private report: N
New Comment:
PHP 5.4.15 CURL 7.30.0 CentOS 6.4 64BIT
demo.php
<?php
$ch1 = curl_init();
curl_setopt($ch1, CURLOPT_URL, "http://localhost/sleep.php");
curl_setopt($ch1, CURLOPT_HEADER, 0);
curl_setopt($ch1, CURLOPT_TIMEOUT, 1);
$mh = curl_multi_init();
curl_multi_add_handle($mh,$ch1);
$active = null;
do {
$mrc = curl_multi_exec($mh, $active);
} while ($mrc == CURLM_CALL_MULTI_PERFORM);
while ($active && $mrc == CURLM_OK) {
if (curl_multi_select($mh) != -1) {
do {
$mrc = curl_multi_exec($mh, $active);
} while ($mrc == CURLM_CALL_MULTI_PERFORM);
}
}
echo curl_errno( $ch1); //0
echo '<br />';
echo curl_error( $ch1); //Operation timed out after 1004 milliseconds with 0
out
of -1 bytes received
curl_multi_remove_handle($mh, $ch1);
curl_multi_close($mh);
sleep.php
<?php
sleep( 60);
Previous Comments:
------------------------------------------------------------------------
[2012-10-10 15:42:38] jerry at jerryniman dot co dot uk
Bug still there at PHP 5.2.13
OS - redhat linux
Build Date - May 1 2010 23:54:46
curl_error($ch) returns 'Couldn't resolve host'
curl_errno($ch) returns 0
------------------------------------------------------------------------
[2010-06-16 16:42:32] c dot madmax at gmail dot com
The bug still exists in PHP 5.2.9!
------------------------------------------------------------------------
[2005-07-12 01:00:04] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
------------------------------------------------------------------------
[2005-07-05 00:15:15] [email protected]
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
------------------------------------------------------------------------
[2005-07-05 00:10:27] eja40 at cam dot ac dot uk
Description:
------------
curl_error($this->connections[$i]) returns 'Operation timed out with 27286 out
of 64683 bytes received'
But:
curl_errno($this->connections[$i]) returns 0 regardless of the error text
This only occurs on a multi-curl handle...
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=33570&edit=1