2015-05-04
Keeping PHP to a minimum
I noticed the recent upgrades left some PHP scripts non-working. The default is now to disable PHP in userdirs, via:# To re-enable php in user directories comment the following lines # (fromI decided I want some PHP in userdirs, but while I was working on this configuration I want to turn the default around: disable the PHP engine in the global configuration and only enable it on those sites where I need it for the site. So now /etc/php5/apache2/php.ini has:to .) 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>; Enable the PHP scripting language engine under Apache. engine = OffAnd some sites that need it have in the VirtualHost config:# enable php php_flag engine 1 <FilesMatch "\.ph(p3?|tml)$"> SetHandler application/x-httpd-php </FilesMatch>