ID:               28265
 User updated by:  csaba at alum dot mit dot edu
 Reported By:      csaba at alum dot mit dot edu
-Status:           Bogus
+Status:           Open
 Bug Type:         Directory function related
 Operating System: Windows - all
-PHP Version:      5CVS-2004-05-03 (dev)
+PHP Version:      5CVS-2004-05-04 (dev)
 New Comment:

This problem is still happening on the latest snapshot of PHP I just
downloaded today (2004-May-04).  If I run the code I included below on
my Win 2000 Pro system, I get three sections, each with distinct
capitalization (mixed, lower case, upper case) of the drive letter and
trailing directory (the inner parts all match up with mixed case).  All
5 lines should appear identical (in mixed case).  This is expecially
noticable on a browser page where you have proportional fonts.

Csaba Gabor

Also, that old bug report (17822) functionally does not exist - it's
been lost (at least large parts of it).  If google can't see it, and I
can't find it by searching, and PHP can't find it by searching (when I
submit almost the same report), I'd call that lost.  So in my book,
it's not a duplicate report.  And what should I do then?


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

[2004-05-04 08:55:57] [EMAIL PROTECTED]

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.

It\'s also fixed.

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

[2004-05-04 00:07:53] csaba at alum dot mit dot edu

Description:
------------
I am resubmitting this bug report (#17822) since the previous report
seems to have been corrupted and all the developer comments gone
missing!  The bug is still there, too:

[18 Jun 2002 6:20pm CEST] csaba at alum dot mit dot edu 
realpath and getcwd on Windows systems do not actually report the
applicable directory, but rather a string that will !strcasecmp() with
the true directory:

I have a directory name, $dir, on my Win2K system (PHP 4.2.0), but it's
in all lower case, and I'd like to get the actual pathname including
the capitalizations: 

Both realpath() and dirname() only muck around with the $dir string and
don't hit the file system. Not only that, but getcwd() returns $dir
(sans capitalizations) after I've hopped over to it with chdir($dir)! 

My only solution to this point is to pop up a level and use
readdir(...) but this is wasteful, only giving me one level at a time.
Isn't there a REAL realpath() for windows? 

Thanks, 
Csaba Gabor


[27 Jul 2002 11:45am CEST] [EMAIL PROTECTED] 
Looked into this, it looks possible to implement.  Wish me luck :)

[10 Oct 2002 10:47pm CEST] [EMAIL PROTECTED] 
Any news?

[27 Oct 2002 7:27pm CET] [EMAIL PROTECTED] 
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show up on
the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.


[15 Feb 2003 5:38pm CET] csaba at alum dot mit dot edu 
I have marked this bug as open because of the demonstration below on my
PHP 4.3 build date Dec. 20, 2002; Apache 2.0.43 Filter; Win2K Pro
system.

Here is the test:
<html><head><title>getcwd Problem</title></head><body>
<?php
$cwd = getcwd();
chdir (strtolower($cwd));
print "<br>" . getcwd();
print "<br>" . realpath(getcwd());
chdir (strtoupper($cwd));
print "<br>" . getcwd();
print "<br>" . realpath(getcwd());
?>
</body></html>

On my system the first 2 directories show in lower case,
the last two are in caps.
Csaba

[15 Feb 2003 7:32pm CET] [EMAIL PROTECTED] 
Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

Cannot replicate using latest CVS.

[22 Feb 2003 8:03pm CET] [EMAIL PROTECTED] 
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


[23 Apr 12:26am CEST] csaba at alum dot mit dot edu 
I have tested this with the latest snapshot 5.0 RC 2 of April 22 on my
Win 2K Pro system and it is still a problem.  Here are the outputs that
I get (I did an inititial print right after the first cwd() so you can
see what windows thinks the directory is):

C:\Morph\phpDev\40gNiKU5LQ0C

c:\Morph\phpDev\40gniku5lq0c
c:\Morph\phpDev\40gniku5lq0c

C:\Morph\phpDev\40GNIKU5LQ0C
C:\Morph\phpDev\40GNIKU5LQ0C 

So it appears that the middle part is OK but the drive letter and the
final directory need some shoring up.

Csaba Gabor

Reproduce code:
---------------
<html><head><title>getcwd Problem</title></head><body>
<?php
$cwd = getcwd();
print "$cwd<br>";

chdir (strtolower($cwd));
print "<br>" . getcwd();
print "<br>" . realpath(getcwd());

chdir (strtoupper($cwd));
print "<br><br>" . getcwd();
print "<br>" . realpath(getcwd());
?>
</body></html>



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


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

Reply via email to