For Programmers: Free Programming Magazines  


Home > Archive > PHP Installation > June 2004 > Re: [PHP-INSTALL] internal server error









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PHP-INSTALL] internal server error
Chris Hewitt

2004-06-19, 3:56 pm

Bob Lockie wrote:

> 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'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've just tried coping my phpinfo.php over to be under cgi-bin and I get
an internal server error too.

Regards

Chris
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com