From:             sergiocrz at hotmail dot com
Operating system: XP
PHP version:      5.2.6
PHP Bug Type:     cURL related
Bug description:  curl_setopt and CURLOPT_URL detecting wrong username, 
password, and host..

Description:
------------
Using 
curl_setopt($ch, CURLOPT_URL,
"ftp://$ftp_user_name:[EMAIL PROTECTED]:$ftp_port$path/");

PHP CURL will connect to the wrong ftp ip/host if the username or password
contains an "@" and there is no way to force it using the correct values.



Reproduce code:
---------------
$ftp_user_name = "[EMAIL PROTECTED]";
$ftp_pass "bujona"; 
$ftp_ip = "19.16.144.123";
$ftp_port = "21";
$path = "";

curl_setopt($ch, CURLOPT_URL,
"ftp://$ftp_user_name:[EMAIL PROTECTED]:$ftp_port$path/");



Expected result:
----------------
PHP CURL connecting to "ftp://[EMAIL PROTECTED]:[EMAIL PROTECTED]:21"

Actual result:
--------------
PHP CURL uses "na:[EMAIL PROTECTED]" as ip/hostname

Is there any way to solve this bug?

thank you



-- 
Edit bug report at http://bugs.php.net/?id=45701&edit=1
-- 
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=45701&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=45701&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=45701&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=45701&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=45701&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=45701&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=45701&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=45701&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=45701&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=45701&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=45701&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=45701&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=45701&r=globals
PHP 4 support discontinued:   http://bugs.php.net/fix.php?id=45701&r=php4
Daylight Savings:             http://bugs.php.net/fix.php?id=45701&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=45701&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=45701&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=45701&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=45701&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=45701&r=mysqlcfg

Reply via email to