Bug #17822: Realpath, getcwd not returning true pathname

From: Date: Tue, 18 Jun 2002 22:20:36 +0000
Subject: Bug #17822: Realpath, getcwd not returning true pathname
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-11221@lists.php.net to get a copy of this message
From: csaba@alum.mit.edu Operating system: Windows - all PHP version: 4.2.0 PHP Bug Type: Directory function related Bug description: Realpath, getcwd not returning true pathname 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 -- Edit bug report at http://bugs.php.net/?id=17822&edit=1 -- Fixed in CVS: http://bugs.php.net/fix.php?id=17822&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=17822&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=17822&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=17822&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=17822&r=support Expected behavior: http://bugs.php.net/fix.php?id=17822&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=17822&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=17822&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=17822&r=globals

« previous php.bugs (#11221) next »