From:
Operating system:
PHP version: 5.3.5
Package: URL related
Bug Type: Bug
Bug description:parse_url() incorrectly parses path when ? in fragment
Description:
------------
It seems that parse_url() ignores the path when fragment identifier
includes a
question mark (?).
A few similar bugs were already reported (and fixed), but none of them is
the
same; this one affects the path part of the url.
Test script:
---------------
$p = parse_url('http://example.com/path/script.html#fragment?data');
print_r($p);
Expected result:
----------------
Array
(
[scheme] => http
[host] => example.com
[path] => /path/script.html
[fragment] => fragment?data
)
Actual result:
--------------
Array
(
[scheme] => http
[host] => example.com
[fragment] => fragment?data
)
--
Edit bug report at http://bugs.php.net/bug.php?id=54180&edit=1
--
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=54180&r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=54180&r=trysnapshot53
Try a snapshot (trunk):
http://bugs.php.net/fix.php?id=54180&r=trysnapshottrunk
Fixed in SVN:
http://bugs.php.net/fix.php?id=54180&r=fixed
Fixed in SVN and need be documented:
http://bugs.php.net/fix.php?id=54180&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=54180&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=54180&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=54180&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=54180&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=54180&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=54180&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=54180&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=54180&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=54180&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=54180&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=54180&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=54180&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=54180&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=54180&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=54180&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=54180&r=mysqlcfg