php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17424 Apache sends HTTP 500, but still sends PHP HTML without error
Submitted: 2002-05-25 01:43 UTC Modified: 2002-11-02 14:22 UTC
Votes:3
Avg. Score:5.0 ± 0.0
Reproduced:2 of 3 (66.7%)
Same Version:2 (100.0%)
Same OS:0 (0.0%)
From: ashpool7 at yahoo dot com Assigned:
Status: Closed Package: Apache related
PHP Version: 4.2.1 OS: Windows NT 4.0 SP6a + Fixes
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: ashpool7 at yahoo dot com
New email:
PHP Version: OS:

 

 [2002-05-25 01:43 UTC] ashpool7 at yahoo dot com
Setup:

* Windows NT SP6a with all the fixins' and none of the fat (No IIS, etc).
* Apache 1.3.23, PHP as a module.  Mostly default php.ini settings.  Using the zip binary.

I upgraded from PHP 4.1.1 to 4.2.0 on my site and immediately ran into problems with users of WebTV and other unreported browsers saying they could not access the site.  Using Ethereal, I discovered that Apache was sending "500 Internal Server Error" along with the rest of the headers versus a HTTP 200, but was **STILL** sending the PHP generated HTML.  There is no error reported in the Apache error log (the access log was too large to analyze on the server, and probably only says it served a "500" anyway) or any other clues in the HTTP headers.

A typical page that generates this error would contain the following:

<?
$description = "bla bla";
$keywords = "bla bla";
$pagetitle = "bla bla";
include("page_header.php");
?>

... some HTML here ...

<? include("lower_content.html");
include("page_footer.php"); ?>

Internet Explorer 5.5 SP2 and Netscape 4.78 appear to ignore the HTTP 500 message and pretend nothing happened.

I'll see if I can get back with some more stats.


(As a totally unrelated side note, the Microsoft SQL DLL is broken in the v4.1.0< win32 binary dist.  Its build 'signature' doesn't match and the main PHP DLL detects, complains, and disables it.)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-11 09:02 UTC] alexpulp at yahoo dot com
A similar problem occurs on Win98 SE with Apache 1.3.24 and PHP 4.2.1 (binary zip dist.) with default configurations: any scripts, even empty ones (<? ?>) fail with error 500 when the URL has a "?" at the end, with or without any actual GET parameters; once failed, the script will fail with every consequent call even without the query part (browser caching disabled - IE6). Apache error log has no sign of this, access log looks as if nothing went wrong (ie, the expected page content IS sent).

Scripts with phpinfo() work fine. Besides, when I add phpinfo() to a failing script and reload the page, then remove it and reload again, everything works properly, but only until I change the query part, then it fails again.

Sometimes PHP scripts with only HTML code in them also behave like this, sometimes not, but each particular script is persistant in its behavior.

PHP 4.1 has no trouble with this.
 [2002-08-26 15:16 UTC] php at jdc dot parodius dot com
This phenomenon may be directly related to bug #19113 (http://bugs.php.net/19113).
 [2002-10-09 11:27 UTC] iliaa@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-latest.zip


 [2002-10-25 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over 2 weeks, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2002-11-02 14:22 UTC] ashpool7 at yahoo dot com
This behaviour has been fixed in 4.2.3.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 16:01:28 2024 UTC