php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #19598 Including a file in itself causes the php.exe program to crash.
Submitted: 2002-09-25 13:13 UTC Modified: 2002-09-25 16:04 UTC
From: rami at rjames dot org Assigned:
Status: Not a bug Package: Reproducible crash
PHP Version: 4.2.3 OS: Windows 2000, sp3
Private report: No CVE-ID: None
 [2002-09-25 13:13 UTC] rami at rjames dot org
Including a file in itself causes the php.exe program to crash.

It was late, and I was tired. :)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-09-25 13:18 UTC] iliaa@php.net
Sorry, but the bug system is not the appropriate forum for asking
support questions. Your problem does not imply a bug in PHP itself.
For a list of more appropriate places to ask for help using PHP,
please visit http://www.php.net/support.php

Thank you for your interest in PHP.

This is why you should use include/require_once functions, they will prevent inclusion of the same file more then once.
The source of the crash I am guessing, is that your system simply ran out of resources since what you did was make a fairly resource entensive unterminated loop.
 [2002-09-25 16:03 UTC] rami at rjames dot org
Allow me to be more specific. This was not a support question, as I already know the answer to the problem. I just wanted to let you guys know that this is a serious error which can bring down the php.exe file on the remote server.

If I create an empty php file called "test.php" and place this text within it, it will cause php.exe to crash.

<?php include("text.php"); ?>

It causes a loop which PHP doesn't prevent by throwing an error.
 [2002-09-25 16:04 UTC] rami at rjames dot org
oops, that should read, 

<?php include("test.php"); ?>
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Jul 15 17:01:33 2025 UTC