From:             [EMAIL PROTECTED]
Operating system: windows 2000, macosx
PHP version:      4.1.2
PHP Bug Type:     cURL related
Bug description:  php is segfaulting when trying to read http header of a 
ftp.domaine.com site

Here is a simple code for this : 
<?php
curl_setopt($ch, CURLOPT_URL, "ftp.dds.be"); // this is an 
example
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt ($ch, CURLOPT_HEADER, 1);
curl_setopt ($ch, CURLOPT_NOBODY, 1);
curl_setopt ($ch, CURLOPT_TIMEOUT, 5);

print "OK until now\n";
var_dump( $retour = curl_exec ($ch));
?>

When the protocol is not specified, and the host name 
starts with ftp., there is a conflict segfault.
It seems to have a conflict where curl choose automatically 
ftp protocole for ftp.*.* sites, but the script ask for 
http header. Then php crashes.

This has been found with PHP 4.1.0/4.1.1 for windows, and 
PHP 4.1.2/ curl 7.9.4

PHP should return an error, but not crash. Note that when 
specifying the protocol, (eg, "http://ftp.site.com";), it 
works fine.
-- 
Edit bug report at http://bugs.php.net/?id=15989&edit=1
-- 
Fixed in CVS:        http://bugs.php.net/fix.php?id=15989&r=fixedcvs
Fixed in release:    http://bugs.php.net/fix.php?id=15989&r=alreadyfixed
Need backtrace:      http://bugs.php.net/fix.php?id=15989&r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=15989&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=15989&r=support
Expected behavior:   http://bugs.php.net/fix.php?id=15989&r=notwrong
Not enough info:     http://bugs.php.net/fix.php?id=15989&r=notenoughinfo
Submitted twice:     http://bugs.php.net/fix.php?id=15989&r=submittedtwice

Reply via email to