Bug #11804 Updated: curl_error results strange strings

From: Date: Mon, 02 Jul 2001 12:06:35 +0000
Subject: Bug #11804 Updated: curl_error results strange strings
Groups: php.dev 
Request: Send a blank email to php-dev+get-58677@lists.php.net to get a copy of this message
ID: 11804 Updated by: sterling Reported By: alberty@neptunlabs.de Status: Open Bug Type: cURL related Operating system: PHP Version: 4.0 Latest CVS (2001-06-29) Assigned To: Comments: Fixed in cvs. Previous Comments: --------------------------------------------------------------------------- [2001-06-29 13:46:53] alberty@neptunlabs.de Hi, - cURL 7.8, PHP CVS, Apache 1.3.20, linux-i686 curl_errno doesnt work with follow code: ------ <?php $url="http://www.foo.com"; $ch = curl_init ($url); $header_file = fopen ("header_curl.dat", "w"); $content_file = fopen ("content_curl.dat", "w"); curl_setopt ($ch, CURLOPT_FILE, $content_file); curl_setopt ($ch, CURLOPT_WRITEHEADER, $header_file); curl_setopt ($ch, CURLOPT_REFERER, $url); curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt ($ch, CURLOPT_NOPROGRESS, true); curl_setopt ($ch, CURLOPT_TIMEOUT, 30); $result=curl_exec ($ch); $returncode=curl_getinfo($ch, CURLINFO_HTTP_CODE); $totaltime=curl_getinfo($ch,CURLINFO_TOTAL_TIME); $realurl=curl_getinfo($ch,CURLINFO_EFFECTIVE_URL); $contentsize=curl_getinfo($ch,CURLINFO_SIZE_DOWNLOAD); if (curl_errno($ch)>0){ $error=curl_error($ch); echo $error; } fclose($header_file); fclose($content_file); ?> ------ curl_errno($ch) results a wrong error number and also curl_error($ch) contains broken strings. -- Steve --------------------------------------------------------------------------- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=11804&edit=2

« previous php.dev (#58677) next »