#26670 [NEW]: Repeated use of include() function causes fatal error.
| From: | transporteraccident at hotmail dot com | Date: | Fri, 19 Dec 2003 18:54:33 +0000 |
| Subject: | #26670 [NEW]: Repeated use of include() function causes fatal error. | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-52321@lists.php.net to get a copy of this message | ||
From: transporteraccident at hotmail dot com
Operating system: Fedora Core 1
PHP version: 4.3.3
PHP Bug Type: Reproducible crash
Bug description: Repeated use of include() function causes fatal error.
Description:
------------
I've been trying to use multiple levels of includes to create a kind of
inheritance effect. Each directory has an "init.php" which includes the
"init.php" file from the directory one level above. I was hoping to have
this work, but after a few levels deep, I start getting errors like:
Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to
allocate 3840 bytes) in /www/php-example/1/init.php on line 2
Logically, I'm thinking this should work, since each include file will
include the file from above and, so forth.
Reproduce code:
---------------
http://129.219.146.200/php-example/1/2/init.php
Expected result:
----------------
File name: /php-example/init.php
Current value of $path = /php-example/
File name: /php-example/1/init.php
Current value of $path = /php-example/1/
File name: /php-example/1/2/init.php
Current value of $path = /php-example/1/2
Actual result:
--------------
Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to
allocate 3840 bytes) in /www/php-example/1/init.php on line 2
--
Edit bug report at http://bugs.php.net/?id=26670&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26670&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26670&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=26670&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=26670&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=26670&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=26670&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=26670&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=26670&r=support
Expected behavior: http://bugs.php.net/fix.php?id=26670&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=26670&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=26670&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=26670&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26670&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=26670&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=26670&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=26670&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26670&r=float