php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #6331 recursive includes
Submitted: 2000-08-24 06:54 UTC Modified: 2000-08-24 07:58 UTC
From: max at ruwr dot ru Assigned:
Status: Closed Package: Reproducible Crash
PHP Version: 4.0.1pl2 OS: RedHat Linux 6, kernel 2.2
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: max at ruwr dot ru
New email:
PHP Version: OS:

 

 [2000-08-24 06:54 UTC] max at ruwr dot ru
Recursive includes via include() leads to SIGSEGV in httpd
process.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-08-24 06:55 UTC] stas@php.net
Please provide short reproducing script.
 [2000-08-24 07:33 UTC] max at ruwr dot ru
I found that it does not happen in case of simple recursion, but It crashes on
this script (I tryed this on two our servers that runs php 4.0.1pl2):

/test: settings.inc
/test/test: test.php3

settings.inc:
<?

  include"../settings.inc";

  $SELF_PATH = "$HOME_PATH/jforum";
  $SELF_URL  = "$HOME_URL/jforum";

?>


test.php3:
<? include "../settings.inc"; ?>


Visiting /test/test/test.php3 leads to crash:
[Thu Aug 24 15:33:11 2000] [notice] child pid 1094 exit signal Segmentation fault (11)
 [2000-08-24 07:53 UTC] stas@php.net
Yes, infinite include loop leads to crash. Don't do it.
Use include_once.
 [2000-08-24 07:58 UTC] max at ruwr dot ru
but this could leak to DoS attack from php pages authors, there should be a
configurable limit of include depth or something like this.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Mon Oct 12 09:00:02 2026 UTC