php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34249 apache crash / error on php error document
Submitted: 2005-08-25 16:23 UTC Modified: 2005-10-26 17:09 UTC
From: jeroen at terena dot nl Assigned: tony2001 (profile)
Status: Closed Package: Apache2 related
PHP Version: 5CVS-2005-10-26 (cvs) OS: *
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: jeroen at terena dot nl
New email:
PHP Version: OS:

 

 [2005-08-25 16:23 UTC] jeroen at terena dot nl
Description:
------------
Please see http://bugs.php.net/bug.php?id=33987

I'm still experiencing the same bug in 5.1RC1

Any custom error document other than a PHP document works. If I use a PHP document no code gets executed it  just seems to ignore the error document. Occaisionally I get an even  weirder response like Apache trying to send the original file (jpeg in my case) anyway. This ofcourse doesn't work.

I'm using PHP5.1RC1, Apache2 on Debian Linux.

Reproduce code:
---------------
.htaccess

ErrorDocument 404 /404.php

404.php
can leave it empty

Expected result:
----------------
empty page or whatever code was put in 404.php

Actual result:
--------------
nothing.
displays referring page in mozilla. 
IE shows its "page could not be displayed" document.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-08-25 17:04 UTC] sniper@php.net
Please try using this CVS snapshot:

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


 [2005-08-29 10:46 UTC] jeroen at terena dot nl
Yep, it works fine with the CVS version.
 [2005-10-26 14:14 UTC] sniper@php.net
I'm reopening this since I'm seeing this again. 
Ilia, you fixed this last time, but this line is suspicious:

sapi/apache2handler/sapi_apache2.c:538

if (parent_req && strcmp(parent_req->handler, PHP_MAGIC_TYPE) && strcmp(parent_req->handler, PHP_SOURCE_MAGIC_TYPE) && strcmp(parent_req->handler, PHP_SCRIPT)) {

It crashes since (in this case) the parent_req->handler is null. strcmp() didn't like that. :)

 [2005-10-26 15:29 UTC] sniper@php.net
Assigning to the guilty party. Antony, your fix for bug #34581 broke the fix for this bug.

 [2005-10-26 15:53 UTC] tony2001@php.net
Jani, if you change this line to:
if (parent_req && parent_req->handler && ..
Does it fix the issue?
 [2005-10-26 17:09 UTC] iliaa@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Tue Jan 18 17:03:14 2022 UTC