: Do I need to change the Loaded Configuration File to enable cgi? I'm trying to set up a web app (which I didn't make) on a server which uses an .htaccess file written like this: <Files
I'm trying to set up a web app (which I didn't make) on a server which uses an .htaccess file written like this:
<Files *.php>
SetHandler su-cgi-script
SetEnv INTERPRETER_PATH /usr/bin/php-cgi
</Files>
I've installed LAMPP with all the necessary libraries, but I forgot the php5-cgi package and now I'm trying to set it up.
I've installed it and enabled it with a2enmod cgi. But it still doesn't work and I'm wondering if I need to somehow change the php configuration file loaded. The one displayed on the phpinfo(); page shows that the one loaded is /etc/php5/apache2/php.ini I thought it might work if I could change it to /etc/php5/cgi/php.ini. Though I'm not familiar with this. Everything currently works fine if I get rid of the directives declared in the .htaccess file, but this is not a solution, just a proof that everything else works.
More posts by @Shelton105
1 Comments
Sorted by latest first Latest Oldest Best
Just remove that crap from .htaccess. These lines are meant to be used in a completely different setup than yours.
Obviously, you have Apache's mod_php5 already installed, and it is used for your PHP files automatically. That's perfectly fine! No need for mod_cgi.
However, if you really don't want to use mod_php, you should uninstall libapache2-mod-php5 before further debugging. That way it can't confuse you. (Also, this is the reason a different php.ini is used.)
Finally, you should describe the exact behaviour instead of merely saying "it doesn't work". Does it show an Apache error? If so, which one? Or, does it show the PHP source code instead of executing it? What's happening, exactly?
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.