Bug #14902 Updated: php crash when using curl with returntransfer

From: Date: Fri, 01 Feb 2002 20:52:32 +0000
Subject: Bug #14902 Updated: php crash when using curl with returntransfer
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-78815@lists.php.net to get a copy of this message
ID: 14902 Updated by: dlb@gmx.ch Reported By: dlb@gmx.ch Status: Closed Bug Type: cURL related Operating System: Windows 2000 Server PHP Version: 4.1.1 New Comment: 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. Previous Comments: ------------------------------------------------------------------------ [2002-01-27 01:12:32] sterling@php.net Cannot reproduce, works fine with CVS. ------------------------------------------------------------------------ [2002-01-07 06:24:14] dlb@gmx.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. ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=14902&edit=1

« previous php.dev (#78815) next »