|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #38143 parse_url() cannot parse urls with "http://" in the url query or path
Submitted: 2006-07-19 14:59 UTC Modified: 2006-07-30 01:00 UTC
Avg. Score:4.0 ± 1.3
Reproduced:18 of 18 (100.0%)
Same Version:2 (11.1%)
Same OS:3 (16.7%)
From: jalal at spread-it dot org Assigned:
Status: No Feedback Package: URL related
PHP Version: 4.4.2 OS: Fedora Core 4
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2006-07-19 14:59 UTC] jalal at spread-it dot org
I noticed that parse_url cannot parse urls with "http://" in the query or in the path
For example :*-

Reproduce code:
$url_info = parse_url("*-");

Expected result:
$url_info['scheme'] => "http"
$url_info['host'] => ""

Actual result:
Warning: parse_url(*- Unable to parse url in /var/www/html/test/index.php on line 3


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-07-22 12:14 UTC]
Please try using this CVS snapshot:
For Windows:

 [2006-07-30 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2008-06-04 16:23 UTC] ptr at fnal dot gov
This bug still exists in 5.2.6 and it is causing Apache (2.2.8) to core dump.  Under 5.2.4 the error did not cause core-dumps; this seems a recent addition to 5.2.8.


[Wed Jun 04 10:58:56 2008] [error] [client xx.xx.xx.xx] PHP Warning:  parse_url(//script/data/data.php?= [<a href='function.parse-url'>function.parse-url</a>]: Unable to parse URL in /path/to/php/files/index.php on line 12

[Wed Jun 04 10:59:00 2008] [notice] child pid 4324 exit signal Segmentation fault (11), possible coredump in /path/to/apache/server

OS: Solaris 10
Apache: 2.2.8
PHP: 5.2.6
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Tue Sep 27 19:05:52 2022 UTC