php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #14902 php crash when using curl with returntransfer
Submitted: 2002-01-07 06:24 UTC Modified: 2002-02-01 15:52 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:0 of 1 (0.0%)
From: dlb at gmx dot ch Assigned:
Status: Closed Package: cURL related
PHP Version: 4.1.1 OS: Windows 2000 Server
Private report: No CVE-ID: None
 [2002-01-07 06:24 UTC] dlb at gmx dot ch
function fetchHeader($url, $returntransfer)
{
	$ch = curl_init ($url);
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, $returntransfer); 
	curl_setopt ($ch, CURLOPT_HEADER, 1);
	curl_setopt($ch, CURLOPT_NOBODY, 1);	
	curl_setopt($ch, CURLOPT_TIMEOUT, 10);
	curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);	
	curl_exec ($ch);
}

$arrTestUrl = array("www.alle-autos.ch", "www.alpendrifter.ch", "www.cam-schweiz.ch", "www.bwinfo.ch", "www.canonshop.ch", "www.bmparch.ch","www.jahaya.ch");
reset($arrTestUrl);
foreach($arrTestUrl as $currUrl)
	{ echo $currUrl . "<br>"; flush(); $currUrl = "http://" . $currUrl; fetchHeader($currUrl,0); }


Running the above script generates no error. In my case the script crashed when using fetchHeader($currUrl,1) instead of fetchHeader($currUrl,1), for every given url.

I am using the curl that comes with php 4.1.1 and php as a CGI executable.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-01-27 01:12 UTC] sterling@php.net
Cannot reproduce, works fine with CVS.
 [2002-02-01 15:52 UTC] dlb at gmx dot ch
In a vmware installation of windows 2000 with php 4.1.1 I got no crash as well. However if I run here
fetchHeader($currUrl,0) for the given example
the script terminates successfully after a few seconds but when executing
fetchHeader($currUrl,1)
it times out which seems unlogical to me.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 23:01:29 2024 UTC