RE: BUG #18630

php.internals

Pete Dishman

22 years ago
> How is this a BUG? It's just a feature on windows where you have > case-insensitive filenames. I fyou want to handle that, just use one > style in your code (ie, always lower case).
I take it then this is unlikely to change in the future? Fair enough I suppose. However if I create a patch/diff that changes this behaviour on windows is there any chance it would be accepted or will the status quo be maintained? As for the sig, good point and apologies. It's company policy, but I admit I hadn't realised how stupid it looks when used in plain text. Cheers, Pete Dishman

Andi Gutmans

22 years ago
At 04:02 PM 10/29/2003 +0000, Peter Dishman wrote:
> > How is this a BUG? It's just a feature on windows where you have > > case-insensitive filenames. I fyou want to handle that, just use one > > style in your code (ie, always lower case). > >I take it then this is unlikely to change in the future? Fair enough I >suppose. >However if I create a patch/diff that changes this behaviour on windows is >there any >chance it would be accepted or will the status quo be maintained?
I think it would be a good idea to fix this. I'm going to discuss this matter with Zeev and I'll get back to you. Andi

Derick Rethans

22 years ago
On Wed, 29 Oct 2003, Andi Gutmans wrote:
> At 04:02 PM 10/29/2003 +0000, Peter Dishman wrote: > > > How is this a BUG? It's just a feature on windows where you have > > > case-insensitive filenames. I fyou want to handle that, just use one > > > style in your code (ie, always lower case). > > > >I take it then this is unlikely to change in the future? Fair enough I > >suppose. > >However if I create a patch/diff that changes this behaviour on windows is > >there any > >chance it would be accepted or will the status quo be maintained? > > I think it would be a good idea to fix this. > I'm going to discuss this matter with Zeev and I'll get back to you.
Isn't this in a hash key which is case sensitive? Then the only possibility would be to always lower case it... which is a 'weird' fix for this. I really wonder why this should be fixed in code. Why would you want to use "require_once("FoO.php"); " in one script, and require_once("FOO.PHP") a little bit down? It's just something of keeping style in a script which is definitely not a bad thing. I'd say that time could better be spend on real fixes... Derick
-- "Interpreting what the GPL actually means is a job best left to those that read the future by examining animal entrails." ------------------------------------------------------------------------- Derick Rethans http://derickrethans.nl/ International PHP Magazine http://php-mag.net/ -------------------------------------------------------------------------

Andi Gutmans

22 years ago
At 05:15 PM 10/29/2003 +0100, Derick Rethans wrote:
>On Wed, 29 Oct 2003, Andi Gutmans wrote: > > > At 04:02 PM 10/29/2003 +0000, Peter Dishman wrote: > > > > How is this a BUG? It's just a feature on windows where you have > > > > case-insensitive filenames. I fyou want to handle that, just use one > > > > style in your code (ie, always lower case). > > > > > >I take it then this is unlikely to change in the future? Fair enough I > > >suppose. > > >However if I create a patch/diff that changes this behaviour on windows is > > >there any > > >chance it would be accepted or will the status quo be maintained? > > > > I think it would be a good idea to fix this. > > I'm going to discuss this matter with Zeev and I'll get back to you. > >Isn't this in a hash key which is case sensitive? Then the only >possibility would be to always lower case it... which is a 'weird' fix >for this. I really wonder why this should be fixed in code. Why would >you want to use "require_once("FoO.php"); " in one script, and >require_once("FOO.PHP") a little bit down? It's just something of >keeping style in a script which is definitely not a bad thing. I'd say >that time could better be spend on real fixes...
No I was not thinking about lower casing (although that is an option). I was wondering if it's possible to do something like realpath() in Windows which gives you the pretty name (the case preserving name). We could then use that and it would look good in error messages too. Andi

Adam Maccabee Trachtenberg

22 years ago
On Wed, 29 Oct 2003, Andi Gutmans wrote:
> No I was not thinking about lower casing (although that is an option). I > was wondering if it's possible to do something like realpath() in Windows > which gives you the pretty name (the case preserving name). We could then > use that and it would look good in error messages too.
FWIW, Mac OS X is also case-insensative. (As I was reminded of when LWP's HEAD overwrote /usr/bin/head and broke everything...) -adam
-- adam@trachtenberg.com

Andi Gutmans

22 years ago
At 11:35 AM 10/29/2003 -0500, Adam Maccabee Trachtenberg wrote:
>On Wed, 29 Oct 2003, Andi Gutmans wrote: > > > No I was not thinking about lower casing (although that is an option). I > > was wondering if it's possible to do something like realpath() in Windows > > which gives you the pretty name (the case preserving name). We could then > > use that and it would look good in error messages too. > >FWIW, Mac OS X is also case-insensative. (As I was reminded of when >LWP's HEAD overwrote /usr/bin/head and broke everything...)
Is it case-preserving like Windows? Does realpath work on MAC OS X and give the case preserved name? Andi

Adam Maccabee Trachtenberg

22 years ago
On Wednesday, October 29, 2003, at 11:39 AM, Andi Gutmans wrote:
> Is it case-preserving like Windows? Does realpath work on MAC OS X and > give the case preserved name?
I don't have easy access to a Windows machine to test, but I think the answer is yes: [adam@benlev:~/Documents/php/test] $ ls -l total 0 -rw-r--r-- 1 adam staff 0 Oct 29 12:10 foo [adam@benlev:~/Documents/php/test] $ php -r 'print realpath("foo") . "\n";' /Users/adam/Documents/php/test/foo [adam@benlev:~/Documents/php/test] $ php -r 'print realpath("FOO") . "\n";' /Users/adam/Documents/php/test/FOO realpath() will return a case-preserved match of the original file, but will match the name regardless of case. -adam
-- adam trachtenberg adam@trachtenberg.com

Andi Gutmans

22 years ago
At 12:16 PM 10/29/2003 -0500, Adam Trachtenberg wrote:
>On Wednesday, October 29, 2003, at 11:39 AM, Andi Gutmans wrote: > >>Is it case-preserving like Windows? Does realpath work on MAC OS X and >>give the case preserved name? > >I don't have easy access to a Windows machine to test, but I think the >answer is yes: > >[adam@benlev:~/Documents/php/test] $ ls -l >total 0 >-rw-r--r-- 1 adam staff 0 Oct 29 12:10 foo >[adam@benlev:~/Documents/php/test] $ php -r 'print realpath("foo") . "\n";' >/Users/adam/Documents/php/test/foo >[adam@benlev:~/Documents/php/test] $ php -r 'print realpath("FOO") . "\n";' >/Users/adam/Documents/php/test/FOO > >realpath() will return a case-preserved match of the original file, but >will match the name regardless of case.
That's not what I meant. I didn't mean it should preserve the name you pass to realpath(). I meant it should give the name which is saved by the OS in the filesystem. Win32 is case-insensitive but it does have the case preserved version saved. Andi