ID:               45701
 User updated by:  sergiocrz at hotmail dot com
 Reported By:      sergiocrz at hotmail dot com
-Status:           Bogus
+Status:           Open
 Bug Type:         cURL related
 Operating System: XP
 PHP Version:      5.2.6
 New Comment:

A simple way to solve this would be to set the last "@" position
instead of the first for detecting the ip/host in the php CURL script.

but how can it be done?


Previous Comments:
------------------------------------------------------------------------

[2008-08-03 14:41:01] [EMAIL PROTECTED]

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

See Bug#44456, thanks.

------------------------------------------------------------------------

[2008-08-03 14:30:05] sergiocrz at hotmail dot com

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 this bug report at http://bugs.php.net/?id=45701&edit=1

Reply via email to