php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #76333 PHP built-in server does not find files if root pathcontains special characters
Submitted: 2018-05-12 12:14 UTC Modified: -
From: gadelat at gmail dot com Assigned:
Status: Closed Package: Built-in web server
PHP Version: 7.2.5 OS: Windows 7
Private report: No CVE-ID: None
 [2018-05-12 12:14 UTC] gadelat at gmail dot com
Description:
------------
If php serves from path containing some special characters (in my case it's characters from windows-1250), it cannot find the files. Interestingly, index.php works fine.

In "test script" you can see all is well if root of the project is in C:\project, and things break when it's changed to C:\á\project

I've searched bug tracker and found https://bugs.php.net/bug.php?id=73360 but apparently it's still not fixed

Test script:
---------------
C:\
λ mkdir project

C:\
λ cd project\

C:\project
λ echo "hello world" > test.txt

C:\project
λ php -S localhost:8000
PHP 7.2.5 Development Server started at Sat May 12 14:06:24 2018
Listening on http://localhost:8000
Document root is C:\project
Press Ctrl-C to quit.
[Sat May 12 14:06:33 2018] ::1:50018 [200]: /test.txt

C:\project
λ cd ..

C:\
λ mkdir á

C:\
λ mv project á

C:\
λ cd á

C:\á
λ cd project\

C:\á\project
λ php -S localhost:8000
PHP 7.2.5 Development Server started at Sat May 12 14:07:14 2018
Listening on http://localhost:8000
Document root is C:\á\project
Press Ctrl-C to quit.
[Sat May 12 14:07:18 2018] ::1:50023 [404]: /test.txt - No such file or directory


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-05-13 16:43 UTC] ab@php.net
Automatic comment on behalf of ab
Revision: http://git.php.net/?p=php-src.git;a=commit;h=ad787626a427a2cc49ece694ab6efc63d48df903
Log: Fixed bug #76333 PHP built-in server does not find files if root path contains special characters
 [2018-05-13 16:43 UTC] ab@php.net
-Status: Open +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 09:01:32 2024 UTC