I am having an issue with Apache 2.4 configuration with PHP5. I have got this:
<Directory / >
Options +ExecCGI
AddHandler cgi-script .cgi
Action backButton /backButton.cgi
AddHandler backButton .html .htm .php
</Directory>
It works for both .html
and .htm
files (i.e. backButton.cgi
runs) but not for .php
. I have tried everything I can find on the topic including just having .php
(i.e AddHandler backButton .php
).
If there is any extra information required please ask.
Best Answer
You have this set:
Which seems odd to me. What is
add-footer
? What isscript.pl
? That seems to be an example from the Apache site that would cause requests for files with the html extension to trigger the launch of the footer.pl CGI script. Why would you need that?Seems like that should be:
So your whole
Directory
directive should be:EDIT: Since the original poster does want the
add-footer
functionality—now calledbackButton
—it seems that this configuration would be the best way to handle; combine what I am doing above with with the original poster posted to begin with:ANOTHER EDIT: Seems like there was a typo the first time with me setting
php
instead of.php
forAddHandler php5-script .php
. But also, try this instead usingapplication/x-httpd-php5
instead ofphp5-script
: