php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #23437 apache_lookup_uri returns bogus information
Submitted: 2003-05-01 06:38 UTC Modified: 2004-02-06 15:14 UTC
From: nik at nikmakepeace dot com Assigned:
Status: Closed Package: Documentation problem
PHP Version: 4.3.2RC1 OS: Debian GNU/Linux (sid)
Private report: No CVE-ID: None
 [2003-05-01 06:38 UTC] nik at nikmakepeace dot com
With Apache 1.3.26 performing apache_lookup_uri("http://nikmakepeace.com/index.php") returns a class like this:

stdClass Object
(
    [status] => 200
    [the_request] => GET /apache.php HTTP/1.1
    [method] => GET
    [uri] => /http://nikmakepeace.com/index.php
    [filename] => /home/nik/html/test/http:

    [path_info] => //nikmakepeace.com/index.php
    [no_cache] => 0
    [no_local_copy] => 1
    [allowed] => 0
    [sent_bodyct] => 0
    [bytes_sent] => 0
    [byterange] => 0
    [clength] => 0
    [unparsed_uri] => /http://nikmakepeace.com/index.php
    [request_time] => 1051788489
)

The uri is not a uri, nor the filename a filename. The content-length it not 0 etc etc. If this is an Apache bug, can you mention something in the documentation about it?

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-05-01 18:41 UTC] sniper@php.net
It's not bogus. You just misundertood what the function
is for..(it works locally to YOUR server)

 [2003-05-01 22:18 UTC] nik at nikmakepeace dot com
> it works locally to YOUR server

I understood that much (nikmakepeace.com is my server), but it wasn't clear inthe documentation that it doesn't actually lookup any local uri, but only a relatve uri of a document on the local webserver. For example I get correct results by looking up "/doc/" but not "http://localhost/doc/" although both are the same resource on the same machine.
 [2004-02-06 15:14 UTC] nlopess@php.net
I already documented this function. Closing the bug....
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Jul 06 05:01:37 2025 UTC