php.net |  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
Description:
------------
mkdir "1 2"
cd "1 2"
bug-server.bat

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



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



Expected result:
----------------
PHP 7.xx Development Server started at 
Listening on http://127.0.1.1:80


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 http://127.0.1.1:80

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-01-11 05:44 UTC] krakjoe@php.net
-Status: Open +Status: Verified -Assigned To: +Assigned To: ab
 [2017-01-11 05:44 UTC] krakjoe@php.net
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] krakjoe@php.net
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] ab@php.net
~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.

Thanks.
 [2017-10-24 05:46 UTC] kalle@php.net
-Status: Verified +Status: Assigned
 [2017-11-28 11:43 UTC] ab@php.net
Automatic comment on behalf of ab
Revision: http://git.php.net/?p=php-src.git;a=commit;h=578049fdb6a69c7cd46ff62838384d1d9b1c88c4
Log: Fixed bug #73830 Directory does not exist.
 [2017-11-28 11:43 UTC] ab@php.net
-Status: Assigned +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 16:01:28 2024 UTC