Bug #75183 [Fbk]: When accessing with / at the end of uri with extension,source code is displayed
| From: | ab@php.net | Date: | Wed, 13 Sep 2017 10:13:01 +0000 |
| Subject: | Bug #75183 [Fbk]: When accessing with / at the end of uri with extension,source code is displayed | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-211122@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=75183&edit=1
ID: 75183
Updated by: ab@php.net
Reported by: noreply at example dot com
Summary: When accessing with / at the end of uri with
extension,source code is displayed
Status: Feedback
Type: Bug
Package: Built-in web server
Operating System: Windows
PHP Version: 7.2.0RC1
Block user comment: N
Private report: N
New Comment:
I don't reproduce this on Windows as well :( Please check the environment, especially that
there's no other programs running on the same port, etc.
Thanks.
Previous Comments:
------------------------------------------------------------------------
[2017-09-12 13:42:56] kelunik@php.net
This might be a Windows related issue, it's not reproducible on Linux.
cuâ[kelunik@kelunik] - [~] - [15:38:41] - []
â[8301] $ curl "http://localhost:8080/"
7.2.0RC1: ok
â[kelunik@kelunik] - [~] - [15:38:48] - []
â[8302] $ curl "http://localhost:8080/index.php"
7.2.0RC1: ok
â[kelunik@kelunik] - [~] - [15:38:52] - []
â[8303] $ curl "http://localhost:8080/index.php/"
7.2.0RC1: ok
------------------------------------------------------------------------
[2017-09-12 13:17:54] noreply at example dot com
php -S localhost:8080
PHP 7.2.0RC1 Development Server started at Tue Sep 12 22:10:09 2017
Listening on http://localhost:8080
Document root is
Press Ctrl-C to quit.
[Tue Sep 12 22:10:17 2017] ::1:58304 [200]: /
[Tue Sep 12 22:10:25 2017] ::1:58305 [200]: /index.php
[Tue Sep 12 22:10:29 2017] ::1:58306 [200]: /index.php/
$ curl "http://localhost:8080/"
7.2.0RC1 : ok
$ curl "http://localhost:8080/index.php"
7.2.0RC1 : ok
$ curl "http://localhost:8080/index.php/"
<?php
echo PHP_VERSION . " : ok";
------------------------------------------------------------------------
[2017-09-11 10:11:46] kelunik@php.net
I can't reproduce this with PHP 7.2beta2.
------------------------------------------------------------------------
[2017-09-11 09:56:58] noreply at example dot com
Description:
------------
When accessing with / at the end of uri with extension,
PHP source code is displayed.
BUG in PHP build-in server : PHP 7.2, 7.1 ,7.0
(There is no bug in PHP 5.x)
(1) php -S localhost:8080
(2) curl "http://localhost:8080/index.php/"
Test script:
---------------
<?php
// index.php
echo PHP_VERSION;
Expected result:
----------------
The PHP script is executed.
Actual result:
--------------
PHP source code is displayed.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=75183&edit=1