#23337 [Fbk->Csd]: dirname() returns incorrect value.
| From: | wez@php.net | Date: | Wed, 30 Apr 2003 11:26:42 +0000 |
| Subject: | #23337 [Fbk->Csd]: dirname() returns incorrect value. | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-38822@lists.php.net to get a copy of this message | ||
ID: 23337
Updated by: wez@php.net
Reported By: cyborg at driverheaven dot net
-Status: Feedback
+Status: Closed
Bug Type: *General Issues
Operating System: Windows 2000/XP/2003
PHP Version: 5CVS-2003-04-24 (dev)
New Comment:
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.
Fixed yesterday.
Previous Comments:
------------------------------------------------------------------------
[2003-04-30 06:12:22] sniper@php.net
I wanted to know what PHP VERSION it is, NOT when it's build..
------------------------------------------------------------------------
[2003-04-28 10:44:12] thixit at yahoo dot com
I also experienced this problem with Build date of Apr 28 2003
12:09:53.
It seems that the problem happened when dirname()'s argument contains a
drive letter.
------------------------------------------------------------------------
[2003-04-25 18:26:23] cyborg at driverheaven dot net
Well it's happened for the last week, including a release from today,
but the current release I am using right now is: Apr 25 2003 20:09:15.
(I assume that's what you wanted)
------------------------------------------------------------------------
[2003-04-25 17:01:09] sniper@php.net
What's the exact PHP version in phpinfo() output?
------------------------------------------------------------------------
[2003-04-24 15:38:21] cyborg at driverheaven dot net
<?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 this bug report at http://bugs.php.net/?id=23337&edit=1