php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21448 apache_lookup_uri returns "valid URI" even when passed non-existent filenames
Submitted: 2003-01-05 19:44 UTC Modified: 2003-01-06 15:48 UTC
From: awkay69 at hotmail dot com Assigned:
Status: Not a bug Package: Apache2 related
PHP Version: 4.3.0 OS: Linux (redhat)
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: awkay69 at hotmail dot com
New email:
PHP Version: OS:

 

 [2003-01-05 19:44 UTC] awkay69 at hotmail dot com
I compiled Apache 2.0.43 and PHP 4.3.0 from source as a DSO.

When using the internal PHP apache_lookup_uri(), it always returns status 200.

<?php 
$f = apache_lookup_uri("/abcdef");
echo $f->status;
echo $f->the_request;
?>

I always get 200, and the URI of the PHP file in which it is enclosed.

Does anyone know the apache API??? I dug through the source, but I don't know much about the Apache filter chains and the linkage of the request structures. I'll try to look further when I get a chance, but if anyone has any ideas, I'd love to hear them.

- Tony

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-01-05 22:11 UTC] awkay69 at hotmail dot com
I've played with this some more. I'm beginning to feel that this is a documentation problem. Neither the Apache or PHP docs say so, but is this just a parsing function that never actually does a stat(2) on the underlying file? 

I got the impression from the code for virtual() in php-4.3.0/sapi/apache2filter that it did more, but perhaps it is a misunderstanding on my part.

This is probably a closable entry in your bug database...sorry.
 [2003-01-06 15:49 UTC] iliaa@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

apache_lookup_uri() is a very simple wrapper around Apache 2's own ap_sub_req_lookup_uri() function. Any bugs that you encounter while using that function are in Apache 2 and not PHP.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 03 15:01:34 2025 UTC