500内部服务器错误时显示
我访问http://mysite.com/cgi-bin/test.php
test.php的
<p> title here</p> <?php echo "hi"; ?>
错误日志显示
(8)Exec format error: exec of '/var/www/cgi-bin/test.php' failed'. Premature end of script headers: test.php.
通过添加解决它
AddHandler application/x-httpd-php .php
您需要AddHandler语句,否则脚本将作为CGI执行,而不是PHP。