php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1889 parse_url doesn't work -- returns empty UrlElements
Submitted: 1999-07-26 20:02 UTC Modified: 2001-02-10 15:45 UTC
From: jennine at netcom dot com Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 3.0.11 OS: Linux 2.2.4 Alpha
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: jennine at netcom dot com
New email:
PHP Version: OS:

 

 [1999-07-26 20:02 UTC] jennine at netcom dot com
Under Alpha Linux, parse_url was returning empty UrlElements:

		$Url="http://www.sun.com/";
		$UrlElements = parse_url($Url);
		if( (empty($UrlElements)) or (!$UrlElements) )
		{
			$errmsg = "is_url: Parse error reading [$Url]";
			print "$errmsg\n";
		}

		$scheme		= $UrlElements[scheme];
		$HostName	= $UrlElements[host];

both $scheme and $HostName would be empty.
I fixed it on my system by pulling down a fresh copy of Henry Spencer's
regex stuff from his ftp site and building Apache with that.
It looks like the version with Apache (and PHP) is a few years old.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-11-11 19:44 UTC] joey at cvs dot php dot net
Please confirm that bug is still there. I was unable to duplicate
on debian (ix86), Solaris (2.6 or 2.7), but I do not have access
to Aplha machine. What flavor of linux?

Also try 3.0.12, and make sure you are not compiling --with-system-regex.

Setting as analyzed.
 [2001-02-10 15:45 UTC] jimw@php.net
no feedback, closing.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed May 07 14:01:30 2025 UTC