php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #44001 PATH_INFO with final dot is not correctly set under Windows
Submitted: 2008-01-31 16:51 UTC Modified: 2010-03-29 16:58 UTC
From: nicolas dot grekas+php at gmail dot com Assigned:
Status: Closed Package: Apache related
PHP Version: 5.2.11/5.3.1 OS: Windows XP
Private report: No CVE-ID: None
 [2008-01-31 16:51 UTC] nicolas dot grekas+php at gmail dot com
Description:
------------
This bug seems to be Windows only (tested under linux, it's ok)

Compare the output of :
http://doc.espci.org/path_info_bug.php/foo
http://doc.espci.org/path_info_bug.php/foo. (with final dot)

In the second case PATH_INFO, SCRIPT_NAME and PATH_TRANSLATED are not correctly set. This bug seems specific to windows and a final dot in path_info.

Reproduce code:
---------------
See http://doc.espci.org/path_info_bug.php/foo.

(the final dot is important)

<?php

echo 'PATH_INFO: ',       htmlspecialchars($_SERVER['PATH_INFO']),       '<br>';
echo 'SCRIPT_NAME: ',     htmlspecialchars($_SERVER['SCRIPT_NAME']),     '<br>';
echo 'PATH_TRANSLATED: ', htmlspecialchars($_SERVER['PATH_TRANSLATED']), '<br>';

Expected result:
----------------
PATH_INFO: /foo.
SCRIPT_NAME: /path_info_bug.php
PATH_TRANSLATED: C:\wamp\www\foo.

Actual result:
--------------
PATH_INFO: /foo
SCRIPT_NAME: /path_info_bug.php/foo.
PATH_TRANSLATED: C:\wamp\www\foo

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-02-02 08:10 UTC] nicolas dot grekas+php at gmail dot com
Seems ok to me
 [2008-02-02 22:20 UTC] jani@php.net
Yes, it was fixed apparently. :)
 [2010-03-29 16:58 UTC] nicolas dot grekas+php at gmail dot com
-PHP Version: 5.2.5 +PHP Version: 5.2.11/5.3.1
 [2010-03-29 16:58 UTC] nicolas dot grekas+php at gmail dot com
This bug is back, tested on 5.2.11 and 5.3.1
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Mon Apr 22 16:01:25 2019 UTC