ID: 32744
Updated by: [EMAIL PROTECTED]
Reported By: vovik at getart dot ru
-Status: Open
+Status: Bogus
Bug Type: Filesystem function related
Operating System: Windows XP
PHP Version: 4.3.11
New Comment:
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same.
Thank you for your interest in PHP.
(And this is also expected)
Previous Comments:
------------------------------------------------------------------------
[2005-04-18 16:31:58] vovik at getart dot ru
I've pasted the reproduce code with php tags and it was stripped. Here
is it:
// This file located under directory with non-lowercase name, i.e.
"TesT"
print "<pre>";
require_once("./inc.php"); // single print line there
chdir("./..");
chdir("./TesT");
require_once("./inc.php");
var_dump(get_included_files());
------------------------------------------------------------------------
[2005-04-18 16:29:23] vovik at getart dot ru
Description:
------------
When script started and do require_once() by relative filename, this
function remembers lower case real path.
If script changes working dir via chdir() and directory name consist of
not lower-case letters, require_once() will include the file again.
Reproduce code:
---------------
<?php
// This file located under directory with non-lowercase name, i.e.
"TesT"
print "<pre>";
require_once("./inc.php"); // single print line there
chdir("./..");
chdir("./TesT");
require_once("./inc.php");
var_dump(get_included_files());
?>
Expected result:
----------------
I expect to single include of inc.php.
Actual result:
--------------
Actually, got two :)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=32744&edit=1