ID:               39542
 User updated by:  snowy at corporatezoo dot com
 Reported By:      snowy at corporatezoo dot com
 Status:           Open
 Bug Type:         Scripting Engine problem
 Operating System: Windows XP
 PHP Version:      5.2.0
 New Comment:

Hi any update on this? btw, in case it was confusing, that wasn't a
"fix" I posted, it is merely a way to circumvent the behaviour.

Obviously this "fix" would require the renaming of all php class files
in old code, which is an extreme pain, but it would be ok, if I could
just confirm what the new "behaviour" of includes is meant to be.

If there is not supposed to be a change in the behaviour of
includes/requires, then this is probably a bug


Previous Comments:
------------------------------------------------------------------------

[2006-11-17 23:45:30] snowy at corporatezoo dot com

Oh btw (in case it wasn't obvious), the "remedy" is

1) rename the class file to "fooIndex.php"
2) rename the class to fooIndex
3) in index.php, $index = new fooIndex();

so the issue is when the script "driver" file (ie, the one in docroot)
is named the same as the class file (in the class path) even when the 2
files are of different case (index.php vs Index.php).

------------------------------------------------------------------------

[2006-11-17 23:39:53] snowy at corporatezoo dot com

actually I am using full paths, I'm doing a:

define('SITEROOT_DIR','/web/myproject');
define('FRAMEWORK_DIR','/web/framework');
define('SITECLASS_DIR',SITEROOT_DIR.'/_application');
set_include_path(SITECLASS_DIR.';'.FRAMEWORK_DIR.';'.get_include_path());

and /web/myproject/docroot is the docroot

(I've always been using this kind of naming with "/" for windows since
4.0.x in case I need compat)

It's almost as if it found index.php in the current namespace, and
decides it doesn't need to go to include_path to look for one? just
guessing...

------------------------------------------------------------------------

[2006-11-17 15:25:31] [EMAIL PROTECTED]

What if you change "../classes" to the full path?

------------------------------------------------------------------------

[2006-11-17 14:11:09] [EMAIL PROTECTED]

I didn't use your example, I tested it in another way.

------------------------------------------------------------------------

[2006-11-17 14:05:26] snowy at corporatezoo dot com

tony, sorry I just realised that example might be different in linux
because of being case sensitive.

could you try renaming the files and class name to "index"... ie,
"../classes/index.php" and "class index".

See which one it tries to load up first. thx

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/39542

-- 
Edit this bug report at http://bugs.php.net/?id=39542&edit=1

Reply via email to