php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #8344 404 errors in Zeus?
Submitted: 2000-12-20 19:18 UTC Modified: 2001-01-17 11:30 UTC
From: tim at timmy dot org Assigned:
Status: Closed Package: Feature/Change Request
PHP Version: 4.0.4 OS: Solaris 7/Zeus
Private report: No CVE-ID: None
 [2000-12-20 19:18 UTC] tim at timmy dot org
Hi, I'm not sure if this is a bug or a feature or what, but if I try to hit a page that doesn't exist using PHP under Zeus/ISAPI, I get:


Warning: Failed opening '/web/content/straight/teencumers.com/htdocs/foo.phtml' for inclusion (include_path='.:/web/php') in Unknown on line 0

plus it shows up in my log as a 200, not a 404.

--Timmy

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-01-17 11:30 UTC] joosters@php.net
The file not found message comes from PHP, not the web server.
As far as the web server is concerned, it ran the PHP extension just fine, hence the '200' code in the logs.

Handlers in Zeus, e.g. for .php files, get called whether or not the file requested in the URL actually exists. This is a feature!
(see http://support.zeus.com/extra/zeustalk-archive/0676.html )
 [2002-10-22 18:55 UTC] jagrant at nrcan dot gc dot ca
"it ran the PHP extension just fine"? How can you "run" something that doesn't exist? AFAIC, it's a bug.

Our servers are required to show custom 'corporate' error pages for the standard errors (404, 500 etc.). If the server can not detect a missing .php page, we can not fulfil that requirement.

Is there a mechanism for PHP to pass a "file not found" error code back to the server so that it can report 404 to the client's browser?  If so, that would seem to be the best approach.

http://support.zeus.com/extra/zeustalk-archive/0676.html says that this is a "feature" that allows a response to any URL. I can see that php.net uses that to good advantage,i.e. http://php.net/fopen can be used to locate & display the 'fopen' doc page. But surely there's a difference between http://php.net/fopen and http://php.net/fopen.php and the latter should return 404 instead of going straight into the function search mechanism?

John A. Grant
Geological Survey of Canada
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 10:01:28 2024 UTC