I have python and php scripts on my web.
The problem is that, python scripts are run correctly but PHP, instead of displayed, is downloaded. It is funny that not all PHP is downloaded, and you can prevent downloading by inserting /? in the end of php script name.
Here is the content of my .htaccess:
Options Indexes Includes ExecCGI
Options +ExecCGI
AddHandler cgi-script .py
DirectoryIndex code.py/
And... the setting is, this .htaccess is placed on the root /www. The PHP scripts is on the other directory let say /php.
Please help. How to let run the PHP correctly.
You need a handler for php. Something along the lines of:
AddHandler php-cgi .php
depending on what handler should be executing the php scripts (could also be php5-fastcgi
)