CGI Script not running in PHP file
Posted
by
Unykvis
on Server Fault
See other posts from Server Fault
or by Unykvis
Published on 2014-05-30T20:39:04Z
Indexed on
2014/05/30
21:32 UTC
Read the original article
Hit count: 198
I have a CGI script in the server called script.cgi and I have added the following code to the domain vhost:
Action add-footer /cgi-bin/script.cgi
AddHandler add-footer .htm .html
I have change it to:
Action add-footer /cgi-bin/script.cgi
AddHandler add-footer .htm .html .php
If the page is HTML the code will run but if the page is PHP the code will not run. Is there any code I need to add to the vhost so that PHP files can run this script?
**EDITED:**
I want to "inject" an HTML code in every possible page of the server this includes HTML and PHP files.
The code only works for html files and I don't know why.
© Server Fault or respective owner