|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #50484 parse_url can't handle with url, where password part contains slash "/"
Submitted: 2009-12-15 21:13 UTC Modified: 2009-12-16 02:43 UTC
From: max dot antonoff at gmail dot com Assigned:
Status: Not a bug Package: URL related
PHP Version: 5.3.1 OS: Linux 2.6.31
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
50 + 47 = ?
Subscribe to this entry?

 [2009-12-15 21:13 UTC] max dot antonoff at gmail dot com
parse_url can not handle password part, if it contains slash. 

Reproduce code:
php -r "print_r(parse_url('test://fuuu:de/st@folsd/lala?fio=9&slsl=290sk'));"
    [scheme] => test
    [host] => fuuu
    [path] => /st@folsd/lala
    [query] => fio=9&slsl=290sk

Expected result:
    [scheme] => test
    [host] => folsd
    [user] => fuuu
    [pass] => de/st
    [path] => /lala
    [query] => fio=9&slsl=290sk


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-12-16 02:43 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

parse_url is behaving per the spec here, since RFC 3986 doesn't allow slash characters within the userinfo component of the URL: slashes need to be percent-encoded to be used.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sun Oct 17 07:03:33 2021 UTC