Bug #1889: parse_url doesn't work -- returns empty UrlElements
| From: | jennine at netcom dot com | Date: | Tue, 27 Jul 1999 00:02:20 +0000 |
| Subject: | Bug #1889: parse_url doesn't work -- returns empty UrlElements | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-9205@lists.php.net to get a copy of this message | ||
From: jennine@netcom.com
Operating system: Linux 2.2.4 Alpha
PHP version: 3.0.11
PHP Bug Type: Misbehaving function
Bug description: parse_url doesn't work -- returns empty UrlElements
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.