PHP recently stopped interpreting PHP scripts in public_html after a (Lucid) Ubuntu update: instead of displaying the generated HTML, it was just offering to download the script — the kind of “new” behaviour that leaves you baffled for a few minutes…

After reinstalling apache and PHP without any luck, I looked into Apache configuration, and in the PHP5 mod, here is what I found:

<IfModule mod_userdir.c>
    <Directory /home/*/public_html>
        php_admin_value engine Off
    </Directory>
</IfModule>

The PHP engine is explicitly disabled in public_html, yes sir. Comment out the bit above using hashes, restart your Apache server (sudo service apache2 force-reload), and you’re sorted.

Not sure why this change has been made, though.