|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #73830 Directory does not exist.
Submitted: 2016-12-29 01:17 UTC Modified: 2017-10-24 05:46 UTC
From: noreply at example dot com Assigned: ab (profile)
Status: Closed Package: Built-in web server
PHP Version: 7.1.0 OS: Windows
Private report: No CVE-ID: None
 [2016-12-29 01:17 UTC] noreply at example dot com
mkdir "1 2"
cd "1 2"

Directory C:\...\1 2"  does not exist.

Test script:
"C:\php\php-7_1\php.exe" -S -t "%~dp0" 
"C:\php\php-7_0\php.exe" -S -t "%~dp0" 
"C:\php\php-5_6\php.exe" -S -t "%~dp0" 

Expected result:
PHP 7.xx Development Server started at 
Listening on

Actual result:
[PHP 7and 7.1]

Directory C:\...\1 2"  does not exist.

[PHP 5.6]
PHP 5.6.29 Development Server started at
Listening on


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2017-01-11 05:44 UTC]
-Status: Open +Status: Verified -Assigned To: +Assigned To: ab
 [2017-01-11 05:44 UTC]
Anatol, I had someone quickly verify this is an actual bug. Can you take a look when you have a moment please ?
 [2017-01-11 05:48 UTC]
Note that properly quoted path with spaces is working fine, not sure what has changed with regard to magical ~dp0 cmd magic, if anything.
 [2017-01-12 16:30 UTC]
~dp0 delivers the current directory with a backslash at the end. Say it's e:\dir0\dir1\. As a result, "~dp0" would be "e:\dir0\dir1\". The \" at the end arrives in PHP literaly as "e:\dir0\dir1\"". Huh. Further, this path is passed through stat(). Now comes the weird - with vc11 stat seems to process that despite the path is broken, vc14 doesn't like it. Digging further so far, maybe it still should be fixed even if CRT changed.

 [2017-10-24 05:46 UTC]
-Status: Verified +Status: Assigned
 [2017-11-28 11:43 UTC]
Automatic comment on behalf of ab
Log: Fixed bug #73830 Directory does not exist.
 [2017-11-28 11:43 UTC]
-Status: Assigned +Status: Closed
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Feb 28 10:01:27 2024 UTC