Bug #61286 [Opn->Wfx]: If the trailing path that follows a script contains a dot PATH_INFO is not set
| From: | laruence@php.net | Date: | Wed, 07 Mar 2012 05:58:29 +0000 |
| Subject: | Bug #61286 [Opn->Wfx]: If the trailing path that follows a script contains a dot PATH_INFO is not set | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-168219@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=61286&edit=1
ID: 61286
Updated by: laruence@php.net
Reported by: galacticvoid+php at gmail dot com
Summary: If the trailing path that follows a script contains
a dot PATH_INFO is not set
-Status: Open
+Status: Wont fix
Type: Bug
Package: Built-in web server
Operating System: OSX
PHP Version: 5.4.0
Block user comment: N
Private report: N
New Comment:
Built-in server will consider it as a static file request if there is a dot in the
SCRIPT_NAME.
so, it's kind of expect behavior. thanks
Previous Comments:
------------------------------------------------------------------------
[2012-03-05 16:52:21] galacticvoid+php at gmail dot com
Sorry I was working on this for an hour and I left out the router part.
Using router.php (The only file in __DIR__ is index.php):
if (file_exists(__DIR__ . '/' . $_SERVER['REQUEST_URI'])) {
return false;
} else {
include_once 'index.php';
}
The results of $_SERVER['PATH_INFO'] when calling http://localhost:8000/notset
is: /notset.
The results of $_SERVER['PATH_INFO'] when calling http://localhost:8000/not.set
is: PHP Notice: Undefined index:
PATH_INFO.
------------------------------------------------------------------------
[2012-03-05 16:21:04] reeze dot xia at gmail dot com
I can't reproduce it in OSX. Are you sure you are running 5.4.0 but not previous
RC versions?
------------------------------------------------------------------------
[2012-03-05 13:28:27] galacticvoid+php at gmail dot com
Description:
------------
If the trailing path that follows a script contains a dot the variable
$_SERVER['PATH_INFO'] is not set.
Test script:
---------------
<?php
echo $_SERVER['PATH_INFO'];
Request to:
http://locahost:8000/index.php/not.set
Expected result:
----------------
/not.set
Actual result:
--------------
PHP Notice: Undefined index: PATH_INFO ...
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=61286&edit=1