|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24836 parse_url, FTP username problem
Submitted: 2003-07-28 01:58 UTC Modified: 2003-07-28 07:41 UTC
From: php at davidmatthews dot info Assigned:
Status: Not a bug Package: URL related
PHP Version: 4.3.2 OS: Win2k, Redhat 8
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: php at davidmatthews dot info
New email:
PHP Version: OS:


 [2003-07-28 01:58 UTC] php at davidmatthews dot info
Problem when the @(AT) sign when part of the user name during a FTP scheme.

The common escape sequence of "%40" is documented within this report, "#&0040" was also tried as an escape sequence - but never fixed the problem either.

(1 SOLUTION:  Make the parser look for the (@)AT sign from the right, after the last '/' token, therefore there is no need to use escape sequences for the special character within the name)

Reproduce code:
print_r( parse_url(""));

Expected result:
Array ( [scheme] => ftp [host] => [user] => [pass] => passcode ) 

Actual result:
Array ( [scheme] => ftp [host] => [user] => [pass] => passcode ) 


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-07-28 07:41 UTC]
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at and the instructions on how to report
a bug at

prase_url never did url decoding on the various parts.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 24 07:01:35 2024 UTC