Hi everyone, I looked for an answer to this problem, but couldn't find it anywhere. If I've missed another post with the solution, please direct me there.
I recently upgraded from Ubuntu 10.04LTS (lucid) to 12.04 LTS (Precise) following the instructions found here: http://www.virtualmin.com/documentation/system/os/ubuntu-lucid-to-precise
Now, however, I cannot get php pages to serve up correctly using mod_php. Here is a copy of my php5.conf file:
<IfModule mod_php5.c> <FilesMatch ".ph(p3?|tml)$"> # SetHandler application/x-httpd-php </FilesMatch> <FilesMatch ".phps$"> # SetHandler application/x-httpd-php-source </FilesMatch> # 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. <IfModule mod_userdir.c> <Directory /home/*/public_html> php_admin_value engine Off </Directory> </IfModule> </IfModule>
As you can see, I've commented out the SetHandler lines as instructed. However, if I do this, and set my site to use mod_php (via Server Configuration -> Website Options) my php files do not get shown in the browser, but instead they want to be downloaded, as I am prompted with a save file box. If I change my site to use CGI Wrapper or FCGId, they are served fine.
If I leave the SetHandler lines uncommented, then my site is forced to use mod_php, no matter how I set things in Website Options.
Does anyone have any idea why this might be? It's not a big deal, as it's a private server, hosting only my sites, so I can choose just to leave the SetHandler lines uncommented for the time being. But I would like to try to figure out what's going on and how to fix it so it works correctly.