php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35771 ErrorDocument HTML Page with PHP Code -> Segfault
Submitted: 2005-12-22 11:51 UTC Modified: 2005-12-23 10:30 UTC
From: daniel dot sand at pixelpark dot com Assigned:
Status: Closed Package: Apache2 related
PHP Version: 5.1.1 OS: Solaris
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: daniel dot sand at pixelpark dot com
New email:
PHP Version: OS:

 

 [2005-12-22 11:51 UTC] daniel dot sand at pixelpark dot com
Description:
------------
Under Apache 2.0.55 with PHP 5.1.1 ( and PHP 5.1.0RC1 ) and defined ErrorDocument 404 html page with treating .html like PHP segfaults apache child.


Reproduce code:
---------------
Under Apache 2.x with PHP 5.1.1 set in 

Apache Config:

ErrorDocument 404 /error/HTTP_NOT_FOUND.html

AddType application/x-httpd-php .php .php4 .html .htm

touch the file and put some example code in it:

<html><body><?php echo phpinfo();?></body></html>

start up apache and call some not existing page on the Webserver:

nothing much happens and in the error log you see that the apache child segfaults:

[Thu Dec 22 11:15:58 2005] [notice] child pid 25725 exit signal Segmentation fault (11)

Expected result:
----------------
It should return an Errorpage with the correct content of the File.

Actual result:
--------------
Segfault of the Apache Child

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-12-22 11:55 UTC] tony2001@php.net
Please try using this CVS snapshot:

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


 [2005-12-23 10:30 UTC] daniel dot sand at pixelpark dot com
i took the sapi/apache2handler/sapi_apache2.c from php5.1-latest and it fixed the bug. thx a lot.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 02 07:01:33 2025 UTC