#37766 [NEW]: include_once() adds file more them one time
| From: | boris_k at iname dot com | Date: | Fri, 09 Jun 2006 15:37:05 +0000 |
| Subject: | #37766 [NEW]: include_once() adds file more them one time | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-98243@lists.php.net to get a copy of this message | ||
From: boris_k at iname dot com
Operating system: win2000
PHP version: 5CVS-2006-06-09 (snap)
PHP Bug Type: Unknown/Other Function
Bug description: include_once() adds file more them one time
Description:
------------
File inc/test3.inc included in code more then one time.
php is module of apache 2.2
php.ihi is here http://bdr.kiev.ua/tmpboris/php.ini till some time.
ICQ 176869864
Good luck!
Reproduce code:
---------------
File test.php
<?php
include_once('inc/test3.inc'); // it have to print array
include_once('inc/test3.inc'); // no output
include_once('inc/test3.inc'); // no output
include_once ('inc/test2.inc'); //
?>
File inc/test2.inc
<?php include_once ("test3.inc"); ?>
File inc/test3.inc
<?php
echo "file inc/file3.inc\n";
print_r(get_included_files ( ));
?>
Expected result:
----------------
file inc/file3.inc
Array
(
[0] => C:\tmp\bdr\html\php\test.php
[1] => C:\tmp\bdr\html\php\inc\test3.inc
)
Actual result:
--------------
file inc/file3.inc
Array
(
[0] => C:\tmp\bdr\html\php\test.php
[1] => C:\tmp\bdr\html\php\inc\test3.inc
)
file inc/file3.inc
Array
(
[0] => C:\tmp\bdr\html\php\test.php
[1] => C:\tmp\bdr\html\php\inc\test3.inc
[2] => C:\tmp\bdr\html\php\inc\test2.inc
[3] => c:\tmp\bdr\html\php\inc\test3.inc
)
--
Edit bug report at http://bugs.php.net/?id=37766&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=37766&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=37766&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=37766&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=37766&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=37766&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=37766&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=37766&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=37766&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=37766&r=support
Expected behavior: http://bugs.php.net/fix.php?id=37766&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=37766&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=37766&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=37766&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=37766&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=37766&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=37766&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=37766&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=37766&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=37766&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=37766&r=mysqlcfg