I upgraded to Ubuntu 10.04 this morning and immediately noticed I could no longer serve php applications from my home directory. When I tried to visit one of my projects, http://test.local for example, Firefox opened a download dialog with a message similar to “You have chosen to open index.phtml …”
After quite a bit of googling and forum searching, I went to Twitter asking for help. Many thanks to @sypherNL for helping me resolve this one.
It seems that something has changed in
/etc/apache2/mods-enabled/php5.conf. If you’re experiencing this same issue, check your
php5.conf and see if it matches mine.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
If your php5.conf file looks like the one above, simply comment out the
<IfModule mod_userdir.c> lines as instructed. Once that’s done, restart apache with the following command:
Clear your browser’s cache and try to visit your site again. I didn’t think the fix took at first, but after clearing cache everything worked just fine.
- Thanks again to @sypherNL for showing me how to resolve this one.
- Also see Marco Rodrigues’ post Your public_html with PHP5 isn’t working in Ubuntu 10.04 Lucid?