PHP-7.1.6 - enable with security.limit_extensions .shtml files?

2.6k Views Asked by At

How to enable in PHP-7.1.6, setting "security.limit_extensions", execution of .shtml files? I get error "Access to the script '/var/www/..../file.shtml' has been denied (see security.limit_extensions)" The file.shtml is following

<?php include ("web.php"); ?>
1

There are 1 best solutions below

0
Rafael On

1 - Locate the php configuration file

php-fpm.conf

2 - Edit the line for security.limit_extensions, adding the .shtml to it.

security.limit_extensions = .php .html .shtml

3 - If the line doesn't exist, just add to the file anyway

4 - Remember to reload the php service (I would recommend also restarting the server)