From: stas at zend dot com
Operating system:
PHP version: 5.0.4
PHP Bug Type: *General Issues
Bug description: prepend does not add file to included files
Description:
------------
At least starting from 4.3.x, when file is included via include(), it is
added to the list of included files, so that the code:
<? include('foo'); include_once('foo'); ?>
woould include 'foo' only once.
However, if you put foo in auto_prepend_file and then do <?
include_once('foo'); ?> - 'foo' would be included twice.
I see this behaviour as inconsistent and needing to be fixed, though there
can be some BC issues with that.
Reproduce code:
---------------
1.
<? include('foo'); include_once('foo'); ?>
foo:
<? echo "Whatever..."; ?>
2.
auto_prepend_file=foo
<? include_once('foo'); ?>
Expected result:
----------------
"Whatever..." once in both cases
Actual result:
--------------
"Whatever..." once in the first case, twice in the second.
--
Edit bug report at http://bugs.php.net/?id=32924&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=32924&r=trysnapshot4
Try a CVS snapshot (php5.0):
http://bugs.php.net/fix.php?id=32924&r=trysnapshot50
Try a CVS snapshot (php5.1):
http://bugs.php.net/fix.php?id=32924&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=32924&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=32924&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=32924&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=32924&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=32924&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=32924&r=support
Expected behavior: http://bugs.php.net/fix.php?id=32924&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=32924&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=32924&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=32924&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=32924&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=32924&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=32924&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=32924&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=32924&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=32924&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=32924&r=mysqlcfg