0
I operate a small shared server and would like to give some of my users the ability to execute PHP code from the browser (but not all of them) but have been unable to do so.
In the top level directory I have the directive in a .htaccess file:
AddHandler cgi-script .php .pl .py .jsp .asp .htm .shtml .sh .cgi
Options -ExecCGI
to not allow script execution.
In the lower-level folders I have tried to add a .htaccess file with the following directives:
AddHandler cgi-script .php
Options ExecCGI
However this didn't work. The PHP file is returned as text in the browser.
I am running Apache with CentOS. If anyone knows how to set this up would be appreciated.
I've tried with +ExecCGI too, unfortunately scripts are still not rendered as php in that folder. Maybe I'm missing a directive? – Dangus – 2015-12-21T04:51:47.477