ID: 21226 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Verified Bug Type: *URL Functions Operating System: w2000 PHP Version: 4.3.0 Assigned To: iliaa New Comment:
Add / after end of port part is a good solution. Thanks. Do you consider that it's a bug or parse_url is url RFC compliant ? Previous Comments: ------------------------------------------------------------------------ [2002-12-27 19:04:18] [EMAIL PROTECTED] Seems to come from 'port' part of url. If we consider this : user:password@host?foo works fine, user:password@host:port?foo fails but user:password@host?foo:port works and returns port number in $p_url[port] but it's not correct ------------------------------------------------------------------------ [2002-12-27 19:00:53] [EMAIL PROTECTED] Some more info: port has to be numeric and less than 5 digits long. The bug part seems to be that parse_url() doesn't recognize the end of port part if '/' is missing. So $url="http://user:[EMAIL PROTECTED]:80/?foo"; works as expected. ------------------------------------------------------------------------ [2002-12-27 18:49:37] [EMAIL PROTECTED] Verified on Windows and Linux ZTS builds. Assigning to Ilia. ------------------------------------------------------------------------ [2002-12-27 18:47:38] [EMAIL PROTECTED] Does not working on 4.3.0RC4 AND 4.3.0 final too ------------------------------------------------------------------------ [2002-12-27 18:35:38] [EMAIL PROTECTED] Script below : $url="http://user:[EMAIL PROTECTED]:portnumber?foo"; $p_url=parse_url($url); print_r($p_url); Fails with following output : Warning: parse_url(http://user:[EMAIL PROTECTED]:portnumber?foo) [function.parse-url]: Unable to parse url in C:\script\t.php on line 2 This function was working in php 4.2 It does not working with 4.3.0RC4 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=21226&edit=1