|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-01-21 10:45 UTC] alberto at urizen dot it
curl_errno() returns strange wrong values (very large numbers.. negative
numbers etc..)
$ch = curl_init ("http://www.php.net");
curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_HEADER, 0);
$page=curl_exec ($ch);
$errore=curl_errno($ch);
error_log (" curl_errno: $errore",0);
curl_close ($ch);
my configure options:
'./configure' '--enable-trans-sid' '--with-mm=/usr/local/src/mm-1.1.3' '--with-mhash' '--with-apxs=/var/lib/apache/sbin/apxs'
'--with-mysql' '--with-curl'
libcurl version is libcurl 7.9.2
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 06 22:00:01 2025 UTC |
I'd suggest a patch similar to this one. This was made against the current CVS. diff -u -r1.110 curl.c --- curl.c 24 Mar 2002 10:40:21 -0000 1.110 +++ curl.c 3 Apr 2002 13:18:14 -0000 @@ -797,8 +797,8 @@ } } + SAVE_CURL_ERROR(ch, error); if (error != CURLE_OK) { - SAVE_CURL_ERROR(ch, error); RETURN_FALSE; } @@ -857,8 +857,8 @@ } } + SAVE_CURL_ERROR(ch, error); if (error != CURLE_OK) { - SAVE_CURL_ERROR(ch, error); RETURN_FALSE; } else { RETURN_TRUE; @@ -881,10 +881,10 @@ ZEND_FETCH_RESOURCE(ch, php_curl *, zid, -1, le_curl_name, le_curl); error = curl_easy_perform(ch->cp); + SAVE_CURL_ERROR(ch, error); if (error != CURLE_OK) { if (ch->handlers->write->buf.len > 0) smart_str_free(&ch->handlers->write->buf); - SAVE_CURL_ERROR(ch, error); RETURN_FALSE; }