Bug #60763 [Com]: Access denied. when file extension is .html
| From: | dmilith at gmail dot com | Date: | Mon, 16 Jan 2012 21:52:14 +0000 |
| Subject: | Bug #60763 [Com]: Access denied. when file extension is .html | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-166525@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=60763&edit=1
ID: 60763
Comment by: dmilith at gmail dot com
Reported by: nbari at dalmp dot com
Summary: Access denied. when file extension is .html
Status: Closed
Type: Bug
Package: FPM related
Operating System: FreeBSD / Mac OS
PHP Version: 5.3.9
Block user comment: N
Private report: N
New Comment:
It also happens on Debian Lenny. It's not system related.
Previous Comments:
------------------------------------------------------------------------
[2012-01-16 00:06:38] nbari at dalmp dot com
php 5.3.9 adds support to chose what extensions to parse
the solution was to add the next line the php-fpm.conf
security.limit_extensions = .php .html
------------------------------------------------------------------------
[2012-01-15 23:27:57] nbari at dalmp dot com
Description:
------------
When serving .html files as php an "Access denied." is displayed instead of the
properly parsed page.
With php versions <= 5.3.8 the following configuration example works for nginx
--
server {
server_name domain.tpl *.domain.tld;
root /home/sites/domain.tld/home/html;
location ~ \.(php|htm|html)$ {
fastcgi_pass unix:/tmp/php-fpm.socket;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
--
files on /home/sites/domain.tld/home/html are:
http://domain.tld/index.html <--- does not work with
php-5.3.9 display an Access
denied.
http://domain.tld/test.php <--- works
Expected result:
----------------
properly parse the .html and display the content.
Actual result:
--------------
Access denied.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=60763&edit=1