I have problem in setting up PHP as cgi executable.I am using apache sever. I have followed the steps for installing PHP as cgi executable (i.e., installing without the -- with-apxs option).The PHP programs work fine through apache server when referenced in the htdocs directory,but fails when referenced to php files in cgi-bin directory.
It gives the following errors in error log file :
Exec format error : exec of /usr/local/apache/cgi-bin/<filename>.php
Premature end of script headers : /usr/local/apache/cgi-bin/<filename>.php
It gives the following errors in error log file :
Exec format error : exec of /usr/local/apache/cgi-bin/<filename>.php
Premature end of script headers : /usr/local/apache/cgi-bin/<filename>.php