500 internal server error running php file in cgi-bin
- by vvvvvvv
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