/var/log/apache2/error.log should show a line like the below if PHP was succesfully loaded:
[Tue Aug 30 12:53:36 2011] [notice] Apache/2.2.14 (Ubuntu) PHP/5.3.2-1ubuntu4.9 with Suhosin-Patch configured -- resuming normal operations
Pay attention to the date, if it's something from 2009, you've misconfigured something.
AddType is useless, you need to use:
See also the installation instructions on php.net for Apache 2.x.
You should not have a need to add that manually, the package
# To re-enable php in user directories comment the following lines
# (from <IfModule ...> to </IfModule>.) Do NOT set it to On as it
# prevents .htaccess files from disabling it.
php_admin_value engine Off
Since it's a conffile, it's possible that it's not installed with the upgrade. To fix that purge it and then install it again:
sudo apt-get purge libapache2-mod-php5
sudo apt-get install libapache2-mod-php5
To enable PHP, you have to run:
sudo a2enmod php5
Restart the webserver after:
sudo /etc/init.d/apache2 restart
Other things to do:
- check for conflicting settings in
- have you built Apache from source?
sudo apache2ctl configtest to check your configuration for syntax errors
- Open http://localhost/server-info to check the loaded configuration and modules. The
status module must be loaded for that. If you're running a remote server, you need to add yourself to the
Allow from list in
/etc/apache2/mods-enabled/status.conf and restart the server afterwards