[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: apache configuration



hi mathias..

2002-08-10/14h, when Mathias Palm wrote:
> Hi I have installed Apache 1.3.22. I can not get the php support to work
> properly. That is I need to put
> 
> #!/usr/bin/php4 
> 
> as the first line, else I get the error:
> 
> [Sat Aug 10 14:14:45 2002] [error] (8)Exec format error: exec of
> /usr/lib/cgi-bin/test.php failed
> [Sat Aug 10 14:14:45 2002] [error] [client 192.168.1.1] Premature end of
> script headers: /usr/lib/cgi-bin/test.php

looks like you are using php via cgi. and it seems that you do not want
that (as most people do not).

usually, everything is configured correctly after installing the packages
"apache" and "php".

you should check /etc/apache/httpd.conf for these entries:

LoadModule php4_module /usr/lib/apache/1.3/libphp4.so

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
        
you should then put your test.php into your DocumentRoot (/var/www/ is
default for the apache package). check for
/usr/lib/apache/1.3/libphp4.so as well.


btw, the current apache for testing is 1.3.26-1, perhaps you should
upgrade.

hth,
 myster sen



Reply to: