2

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"); ?>
hakre
  • 193,403
  • 52
  • 435
  • 836
webww
  • 21
  • 3
  • Edit your PHP configuration. If you have no option to, well, that's a problem with your host. Either rename the files or move host. – Andrea Jul 17 '17 at 00:02

1 Answers1

3

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)

Rafael
  • 1,495
  • 1
  • 14
  • 25