php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11804 curl_error results strange strings
Submitted: 2001-06-29 13:46 UTC Modified: 2001-07-02 08:06 UTC
From: alberty at neptunlabs dot de Assigned:
Status: Closed Package: cURL related
PHP Version: 4.0 Latest CVS (2001-06-29) OS: i686-pc-linux-gnu
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: alberty at neptunlabs dot de
New email:
PHP Version: OS:

 

 [2001-06-29 13:46 UTC] alberty at neptunlabs dot 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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-07-02 08:06 UTC] sterling@php.net
Fixed in cvs.
 [2001-07-02 08:06 UTC] sterling@php.net
.
 [2003-03-23 17:55 UTC] axegen at hotmail dot com
hi,

curl_error still does not work.

curl_errno($ch) continues to return a strange value like 1119632216 and curl_error($ch) returns strange text.

using cURL 7.8, PHP 4.3, Apache, linux-i686

-a
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 21:01:28 2024 UTC