From:             cleong at nflc dot org
Operating system: Windows
PHP version:      4.3.6
PHP Bug Type:     *Directory/Filesystem functions
Bug description:  parse_url() can't handle scheme:///path 

Description:
------------
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:
---------------
print_r(parse_url('file:///C:\index.php'));

print_r(parse_url('cow:///C:\index.php'));

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

-- 
Edit bug report at http://bugs.php.net/?id=28931&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=28931&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=28931&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=28931&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=28931&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=28931&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=28931&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=28931&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=28931&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=28931&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=28931&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=28931&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=28931&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28931&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=28931&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=28931&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=28931&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=28931&r=float

Reply via email to