php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #27228 SSI Including PHP File Within PHP File Causes Seg Fault
Submitted: 2004-02-11 21:37 UTC Modified: 2004-10-27 20:08 UTC
From: arthur at levelogic dot com Assigned:
Status: Not a bug Package: Apache2 related
PHP Version: 4.3.4 OS: RedHat Linux 9
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: arthur at levelogic dot com
New email:
PHP Version: OS:

 

 [2004-02-11 21:37 UTC] arthur at levelogic dot com
Description:
------------
Setting up Apache 2.0 to FILTER php files and SSI parse them.  When trying to include a php file from within another php file, I get a seg fault.

Apache setup as:
<Files *.php>
    SetOutputFilter PHP;INCLUDES
    SetInputFilter PHP
    LimitRequestBody 524288
</Files>

Reproduce code:
---------------
/test1.php
<!--#include virtual="/test2.php" -->

/test2.php
Testing 1 2 3

Expected result:
----------------
Testing 1 2 3

Actual result:
--------------
Seg fault on server and hanging to eventually timeout on client.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-02-12 10:21 UTC] sniper@php.net
To make this work you must use PHP's apache2handler module.
But I don't see why you would want to do this anyway,
using 'include()' works much better when you deal with PHP code within PHP code..

(the crash is not even PHP related I bet..you failed to give a backtrace so I have to ASSUME..)

 [2004-10-27 20:08 UTC] arthur at levelogic dot com
Using latest everything (Apache, PHP5), still having same problem.  Using apache2handler.

http://bugs.php.net/bug.php?id=4804

That report says that PHP is not reentrant, so that would explain the problem.  Simple enough...But wouldn't a better error or escape be appropriate instead of a seg fault?  In my opinion, reproducible seg fault = bug.

Any plans on making PHP reentrant-able?
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 19 04:01:33 2024 UTC