Date: 06/29/01
- Next message: php <email protected>: "[PHP-DEV] Bug #11805: missing 3600 seconds between 10/13/2001 and 10/15/2001"
- Previous message: sniper <email protected>: "[PHP-DEV] Bug #11062 Updated: Sharing Violation Error Message"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
From: alberty <email protected>
Operating system: i686-pc-linux-gnu
PHP version: 4.0 Latest CVS (2001-06-29)
PHP Bug Type: cURL related
Bug description: curl_error results strange strings
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-- Edit Bug report at: http://bugs.php.net/?id=11804&edit=1
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: php <email protected>: "[PHP-DEV] Bug #11805: missing 3600 seconds between 10/13/2001 and 10/15/2001"
- Previous message: sniper <email protected>: "[PHP-DEV] Bug #11062 Updated: Sharing Violation Error Message"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

