500 internal server error running php file in cgi-bin

Posted by vvvvvvv on Server Fault See other posts from Server Fault or by vvvvvvv
Published on 2010-01-31T06:56:04Z Indexed on 2010/05/03 1:08 UTC
Read the original article Hit count: 426

Filed under:

500 internal server error is shown when

i access http://mysite.com/cgi-bin/test.php

test.php

<p> title here</p>
<?php 

echo "hi";

?>

error log shows

(8)Exec format error: exec of '/var/www/cgi-bin/test.php' failed'. 
Premature end of script headers: test.php.

solved it by adding

            AddHandler application/x-httpd-php .php

© Server Fault or respective owner

Related posts about httpd