If you’re using php + apache in Lucid Lynx (Ubuntu 10.04), you’ll notice that the php is disabled when you’re using userdir module (http://localhost/~yourusername). To enable it, open /etc/apache2/mods-enabled/php5.conf (alt+F2, then type gksudo gedit /etc/apache2/mods-enabled/php5.conf) and comment this part (add ‘#’ character in every line):

php_admin_value engine Off

The result should be like this:

#
#
# php_admin_value engine Off
#
#

Save the file, then restart the apache by typing sudo /etc/init.d/apache2 restart in terminal.