From: yogistra at msn dot com
Operating system: Windows 2K Pro
PHP version: 5.0.2
PHP Bug Type: Scripting Engine problem
Bug description: Fatal error when using require_once
Description:
------------
When using require_once to include the same file but using different cases
for the file name PHP issues an error.
For example in file X I do this
require_once('common.inc')
require_once('Problem.inc')
In 'common.inc' I also have 'Problem.inc' included but like this:
require_once('PROBLEM.inc')
Now when I run file X I get a redefination problem. On windows
case doesnt matter. This is exactly the error I got:
Fatal error: Cannot redeclare logactivity() (previously declared in
d:\myphplib\WEB_LOGGING.inc:11) in d:\myphplib\WEB_Logging.inc on line 21
Reproduce code:
---------------
require_once('any_file.inc');
require_once('any_FILE.inc');
Expected result:
----------------
I dont expect errors.
Actual result:
--------------
I get errors.
--
Edit bug report at http://bugs.php.net/?id=30608&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30608&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30608&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30608&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=30608&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=30608&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=30608&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=30608&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=30608&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=30608&r=support
Expected behavior: http://bugs.php.net/fix.php?id=30608&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=30608&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=30608&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=30608&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30608&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=30608&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=30608&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=30608&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=30608&r=float
MySQL Configuration Error: http://bugs.php.net/fix.php?id=30608&r=mysqlcfg