php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9433 ErrorDocument 404 pointing to PHP file
Submitted: 2001-02-23 22:34 UTC Modified: 2001-06-03 14:46 UTC
From: justin at hot dot rr dot com Assigned:
Status: Closed Package: Apache related
PHP Version: 4.0.4pl1 OS: FreeBSD 4.1.1-RELEASE
Private report: No CVE-ID: None
 [2001-02-23 22:34 UTC] justin at hot dot rr dot com
Apache 1.3.12


I wrote a script that redirects a person to a different page based on the REQUEST_URI and HTTP_HOST apache variables.  Ever since PHP 4.0.2, Internet Explorer started reporting 404 errors instead of going to the appropriate page.  What is even more mysterious is that it is the IE 404 error page, not the server wide page nor the default 404 error page for the site.  To top it all off, it works for Opera as well as Netscape.  I think this must be caused by the way PHP handles headers and the way IE interprets them, because I can put PHP version 4.0.1pl2 on and it will work great even with IE, then any versions afterwards cause an error.  An example page is at http://test.jwdx.com I have also added header("Status: 404 Not Found") as stated in other bug reports.  I would not blame this on PHP except for the fact that different versions respond differently with all other circumstances remaining the same.

--Justin Bachus

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-02-24 16:43 UTC] justin at hot dot rr dot com
No, lynx reports a 404 error also.
 [2001-02-24 16:51 UTC] justin at hot dot rr dot com
Adding to this, lynx reports a 404 then continues to load the correct page.  I guess lynx reports a 404 if the file is not found then proceeds to the page specified for that error.
 [2001-02-24 17:17 UTC] justin at hot dot rr dot com
If this were the case, then why does it react differently with PHP version 4.0.1pl2 and 4.0.2?
 [2001-02-28 19:42 UTC] justin at hot dot rr dot com
No response?
 [2001-04-30 22:09 UTC] justin at hot dot rr dot com
To make this more understandable (people emailed me with questions which weren't posted in the report).  This scenario does work on lynx and it can not be a browser or apache server error because it works perfectly with 4.0.1pl2 and earlier.  Are there any modifications I can make in the php sources before compiling to meet my need if you would prefer to not modify the current php source on this feature?
 [2001-06-03 06:43 UTC] sniper@php.net
Without seeing any code it's impossible to know what's
wrong. And WHAT doesn't work? What SHOULD happen? What
happens instead?  

Please try the latest release candidate:

http://www.php.net/~andi/php-4.0.6RC2.tar.gz

--Jani



 [2001-06-03 14:45 UTC] justin at hot dot rr dot com
Bug resolved by adding header("HTTP/1.0 200 Success"); to the top of the script.
 [2001-06-03 14:46 UTC] justin at hot dot rr dot com
Report closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Mar 03 20:01:29 2024 UTC