|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #28931 parse_url() can't handle scheme:///path
Submitted: 2004-06-26 06:40 UTC Modified: 2004-06-28 21:39 UTC
From: cleong at nflc dot org Assigned:
Status: Not a bug Package: *Directory/Filesystem functions
PHP Version: 4.3.6 OS: Windows
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:
35 + 19 = ?
Subscribe to this entry?

 [2004-06-26 06:40 UTC] cleong at nflc dot org
The function handles urls of the form 'file:///C:\filename.ext' correctly, but when the scheme is not 'file' (e.g. 'cow:///C:\chicken.pie), it throws an error.

Would be nice if it behave the same way as parse_url() is useful for parsing the path to custom stream in ::stream_open().

Reproduce code:


Expected result:
Array ( [scheme] => file [path] => /C:\index.php ) 
Array ( [scheme] => cow [path] => /C:\index.php ) 

Actual result:
Array ( [scheme] => file [path] => /C:\index.php ) 
Warning: parse_url(cow:///C:\index.php): Unable to parse url in c:\www\test\parse_url.php on line 5


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-06-28 21:39 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

/// for anything other then file is not valid. 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 20 12:01:33 2024 UTC