Bob Lockie wrote:
I'm assuming that you have PHP either compiled into Apache httpd or as a module. In this case, PHP is intended to be regarded as a web page rather than a CGI. This means that php files should be under e.g. /usr/local/apache2/html (or whatever you document root is) rather than /usr/local/apache2/cgi-bin.I'm getting an 'Internal Server Error' when I run: http://216.15.235.3/cgi-bin/testphp.php
The log says:
[Fri Jun 18 12:31:05 2004] [error] [client 216.168.107.70] Premature end of script headers: testphp.php
[Fri Jun 18 12:31:05 2004] [error] [client 216.168.107.70] (8)Exec format error: exec of '/usr/local/apache2/cgi-bin/testphp.php' failed
http://216.15.235.3/cgi-bin/test-cgi that came with Apache works fine.
I am using Apache-2.0.49 and PHP-4.3.7. The command line PHP works fine.
testphp.php is:
<?php phpinfo(); ?>
I've just tried coping my phpinfo.php over to be under cgi-bin and I get an internal server error too.
Regards
Chris