Keeping PHP to a minimum / 2015-05-04

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
    # (from  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>
I 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:
; Enable the PHP scripting language engine under Apache.
engine = Off
And 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>

Tags: , ,

IPv6 check

Running test...
, reachable as koos+website@idefix.net. PGP encrypted e-mail preferred. PGP key 5BA9 368B E6F3 34E4 local copy PGP key 5BA9 368B E6F3 34E4 via keyservers

RSS
Meningen zijn die van mezelf, wat ik schrijf is beschermd door auteursrecht. Sommige publicaties bevatten een expliciete vermelding dat ze ongevraagd gedeeld mogen worden.
My opinions are my own, what I write is protected by copyrights. Some publications contain an explicit license statement which allows sharing without asking permission.
Other webprojects: Camp Wireless, wireless Internet access at campsites, The Virtual Bookcase, book reviews
This page generated by $Id: newsitem.cgi,v 1.57 2022/02/15 21:48:18 koos Exp $ in 0.006362 seconds.