On Tue, 2007-07-31 at 09:12 +0100, Richard Lewis wrote:
Make sure you have the apache2 and apache2.2-common packages installed.
Yes, they seem to both be installed and up-to-date:
root@wildebeest:~# apt-get install apache2 apache2.2-common Reading package lists... Done Building dependency tree Reading state information... Done apache2 is already the newest version. apache2.2-common is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
Also make sure that php4.load and php5.conf are in /etc/apache2/mods-available/
Yes, they seem to be:
root@wildebeest:/etc/apache2/mods-available# ls -l php* -rw-r--r-- 1 root root 133 2007-07-17 19:14 php5.conf -rw-r--r-- 1 root root 59 2007-07-17 19:14 php5.load
Then try:
$ sudo a2enmod php5
root@wildebeest:/etc/apache2/mods-available# a2enmod php5 This module is already enabled!
$ sudo apache2ctl restart
This enabled the PHP5 apache module.
root@wildebeest:/etc/apache2/mods-available# apache2ctl restart apache2: apr_sockaddr_info_get() failed for wildebeest apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
You may also need to try adding something like
AddType application/x-httpd-php .php
to your apache.conf file. This tells apache how to handle .php files.
I have added this line and now get:
root@wildebeest:/etc/apache2# grep AddType apache2.conf # AddType allows you to add to or override the MIME configuration #AddType application/x-gzip .tgz AddType application/x-compress .Z AddType application/x-gzip .gz .tgz AddType application/x-httpd-php .php AddType text/html .shtml
Cheers, Richard
Thanks for those tips Richard. I was hoping that adding the: AddType application/x-httpd-php .php line you suggested would solve the problem but even when restarted I still cannot get Firefox to display .php files as webpages.
The only strange thing I noticed as I worked my way through your suggestions is the error: apr_sockaddr_info_get() failed but I am not sure how fatal this is.
I notice some other replies have come through so will get a cup of tea and have a read before replying further.
Thanks for your help Richard, Sagr