php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #60112 If URI does not contain a file, index.php is not served
Submitted: 2011-10-22 14:17 UTC Modified: 2012-11-25 12:49 UTC
From: info at phpgangsta dot de Assigned: laruence (profile)
Status: Closed Package: Built-in web server
PHP Version: 5.4.0beta2 OS: Windows 7
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: info at phpgangsta dot de
New email:
PHP Version: OS:

 

 [2011-10-22 14:17 UTC] info at phpgangsta dot de
Description:
------------
Started the build-in webserver with
php.exe -S localhost:8000

Opening
http://localhost:8000/
in the browser gives me an error message with 404 status code.

On linux the index.php would have been served, like described in the manual.

Btw: http://localhost:8000/index.php works fine.

I'm using
http://windows.php.net/downloads/qa/php-5.4.0beta2-Win32-VC9-x86.zip

Expected result:
----------------
I would expect the index.php to be served (like on linux), but I get a 404:

[Sat Oct 22 16:13:16 2011] ::1:5403 [404]: / - No such file or directory


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-10-22 14:31 UTC] laruence@php.net
-Status: Open +Status: Bogus
 [2011-10-22 14:31 UTC] laruence@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

plz start built-in webserver *with* a router php
php.exe -S localhost:8000 ***.php
 [2011-10-22 15:12 UTC] info at phpgangsta dot de
As I said, on linux it is working fine, there is a difference between linux and windows.

There is also this line on the manual page of the webserver:
http://docs.php.net/manual/en/features.commandline.webserver.php

"If a URI request does not specify a file, then either index.php or index.html in the given directory are returned. If neither file exists, then a 404 response code is returned."

So in my opinion there is a problem.
 [2011-10-22 15:18 UTC] laruence@php.net
oh, I mis-understand. reopen it, and I will try to reproduce it.
 [2011-10-22 15:18 UTC] laruence@php.net
-Status: Bogus +Status: Open
 [2011-10-23 02:35 UTC] laruence@php.net
-Assigned To: +Assigned To: laruence
 [2011-10-23 02:54 UTC] laruence@php.net
Automatic comment from SVN on behalf of laruence
Revision: http://svn.php.net/viewvc/?view=revision&revision=318332
Log: Fixed bug #60112 If URI does not contain a file, index.php is not served
This is a windows Issue.
and after this fix, previously 404 request like "localhost/foo/bar"
now could server correctly with request_uri "index.php" and PATH_INFO "/foo/bar/"
 [2011-10-23 02:55 UTC] laruence@php.net
This bug has been fixed in SVN.

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/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.


 [2011-10-23 02:55 UTC] laruence@php.net
-Status: Assigned +Status: Closed
 [2012-04-18 09:48 UTC] laruence@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=cd216d38bed46f6a922f84314dbb7dae870f46f1
Log: Fixed bug #60112 If URI does not contain a file, index.php is not served This is a windows Issue. and after this fix, previously 404 request like "localhost/foo/bar" now could server correctly with request_uri "index.php" and PATH_INFO "/foo/bar/"
 [2012-07-24 23:39 UTC] rasmus@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=cd216d38bed46f6a922f84314dbb7dae870f46f1
Log: Fixed bug #60112 If URI does not contain a file, index.php is not served This is a windows Issue. and after this fix, previously 404 request like "localhost/foo/bar" now could server correctly with request_uri "index.php" and PATH_INFO "/foo/bar/"
 [2013-11-17 09:35 UTC] laruence@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=cd216d38bed46f6a922f84314dbb7dae870f46f1
Log: Fixed bug #60112 If URI does not contain a file, index.php is not served This is a windows Issue. and after this fix, previously 404 request like "localhost/foo/bar" now could server correctly with request_uri "index.php" and PATH_INFO "/foo/bar/"
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Dec 03 17:01:29 2024 UTC