php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #5643 Including of the same file
Submitted: 2000-07-17 13:47 UTC Modified: 2000-11-21 04:29 UTC
From: mop at globalpark dot de Assigned:
Status: Closed Package: Reproducible Crash
PHP Version: 4.0 Release Candidate 2 OS: Linux
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: mop at globalpark dot de
New email:
PHP Version: OS:

 

 [2000-07-17 13:47 UTC] mop at globalpark dot de
Ok...first of all it's a stupid bug:)

I made a include file "func.inc.php" and wanted to include config.inc.php. But instead of including config.inc.php i included func.inc.php:)

The result was that my "server" started reading and was hang completely because he always tried to include "func.inc.php" when he started with "func.inc.php" :)

PHP3 says that i can't redeclare my functions and i hope that PHP4 will do this as well in the future.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-07-17 22:57 UTC] joey at cvs dot php dot net
If you upgrade to php4.0.1pl2 or better, you will get a
segmentation fault instead of hanging. Still not ideal,
but better until it's fixed.
 [2000-11-21 04:07 UTC] sniper@php.net
There is include_once() which should be used instead.

--Jani
 [2000-11-21 04:29 UTC] hholzgra@php.net
current versions (tested 4.0.1pl1) fail with a 
"Fatal: emallo(): unable to allocate ... bytes"
when no more memory is left or with 
'cannot redeclare function' if a function 
definition is in place ahead of the circular 
include 
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Sat Oct 10 11:00:01 2026 UTC