php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30608 Fatal error when using require_once
Submitted: 2004-10-29 04:12 UTC Modified: 2004-10-29 08:51 UTC
From: yogistra at msn dot com Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 5.0.2 OS: Windows 2K Pro
Private report: No CVE-ID: None
 [2004-10-29 04:12 UTC] yogistra at msn dot com
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.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-10-29 08:51 UTC] derick@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

This was also filed as a bug before.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Oct 17 14:01:27 2024 UTC