#23337 [NEW]: dirname() returns incorrect value.

From: Date: Thu, 24 Apr 2003 20:38:21 +0000
Subject: #23337 [NEW]: dirname() returns incorrect value.
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-38339@lists.php.net to get a copy of this message
From: cyborg at driverheaven dot net Operating system: Windows 2000/XP/2003 PHP version: 5CVS-2003-04-24 (dev) PHP Bug Type: Filesystem function related Bug description: dirname() returns incorrect value. <?php $string = "C:/web_home/deluxe_mail/test.php"; $dir1 = dirname($string); $dir2 = substr($string, 0, strrpos($string, '/')); echo $dir1; // Outputs C:/web_home/deluxe_ma echo $dir2; // Outputs C:/web_home/deluxe_mail ?> dirname() obviously returns the wrong result in this case, and happens in Windows 2000 Professional, Windows 2000 Advanced Server, Windows XP Professional, as well as Windows 2003 Enterprise Server. -- Edit bug report at http://bugs.php.net/?id=23337&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=23337&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=23337&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=23337&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=23337&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=23337&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=23337&r=support Expected behavior: http://bugs.php.net/fix.php?id=23337&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=23337&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=23337&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=23337&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23337&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=23337&r=dst IIS Stability: http://bugs.php.net/fix.php?id=23337&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=23337&r=gnused

« previous php.bugs (#38339) next »