Re: Apache / PHP4 config problem (newbee on PHP)
On wo, 2003-01-15 at 17:32, Gregoire Hostettler wrote:
> I moved the script to its original location (/var/www) but I get a strange
> - Using IE6, the browser asks me if I want to download the test.php script
bartjan@trillian:~$ grep php4 /etc/apache/mime.types
I think that you don't have the correct mime type set for php files in
the /etc/apache/mime.types or Apache is not using this file.
> - If I rename the .php script to .html, it displays just the header, nothing
> else, which is correct imho
Yes. What you could do now is to add .html to the line in srm.conf
(newer Apache versions have all options in httpd.conf) that already has:
AddType application/x-httpd-php .php
So that you get:
AddType application/x-httpd-php .php .html
This adds php-support for .html files in adition to .php files.
> - If I try to access test.php via lynx, it just displays the html text.
> There is a tmp html file created, althought
> It seems to me that the php4 engine never starts to generate pages...
> Any other idea ?
Yes. Please do not top-post and learn to strip what you are quoting.
> > On wo, 2003-01-15 at 13:50, Gregoire Hostettler wrote:
> > > Got a (supposed) config problem with PHP4/Apache.
> > [Wed Jan 15 14:29:55 2003] [notice] Apache/1.3.9 (Unix) Debian/GNU
> PHP/4.0.3pl1 mod_perl/1.21_03-dev configured -- resuming normal operations
> > [Wed Jan 15 14:29:55 2003] [notice] suEXEC mechanism enabled (wrapper:
> > [Wed Jan 15 14:31:49 2003] [error] (8)Exec format error: exec of
> /usr/lib/cgi-bin/test.php failed
> > [Wed Jan 15 14:31:49 2003] [error] [client 192.168.124.1] Premature end of
> script headers: /usr/lib/cgi-bin/test.php
> > You are placing html files in cgi-bin directories. Don't do that,
> > because cgi-bin directories are reserved only for cgi scripts, not html
> > or php files. Just place the .php file in /var/www and I think it should
> > work.