ID:               15150
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Open
+Status:           Closed
 Bug Type:         cURL related
 Operating System: linux 2.4.16
 PHP Version:      4.1.1
 New Comment:

Fixed in CVS, thanks to both of you.


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

[2002-04-03 08:18:59] [EMAIL PROTECTED]

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;
        }

------------------------------------------------------------------------

[2002-01-21 10:45:10] [EMAIL PROTECTED]

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 

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=15150&edit=1

Reply via email to