Apologies for the cross-post but it took me a couple of hours to find
out what had happened and I felt it would be of use to people in both
lists.

This tip may be of use to people running Ubuntu or Kubuntu desktops
who can't always be bothered setting up a full virtual server for each
domain. It may also be useful for users of Debian and other Debian
derived operating systems.

On my desktop PC I often test out php scripts from my public_html
directory. Over the weekend I upgraded Kubuntu to 10.04 and suddenly
php scripts stopped running.

The problem turned out to be a "security" fix Ubuntu had inherited
from Debian who had decided to block the running of php from home
directories.

The fix is fairly simple: The file /etc/apache2/mods-enabled/php5.conf
contains these lines:

    # 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>

As the instruction says, just comment out the affected lines with your
favourite editor, restart apache2, and all is well.

Bruce
-- 
Bruce Clement

Home:   http://www.clement.co.nz/
Twitter:        http://twitter.com/Bruce_Clement
Google Buzz: http://www.google.com/profiles/aotearoanz

"Before attempting to create something new, it is vital to have a good
appreciation of everything that already exists in this field." Mikhail
Kalashnikov

-- 
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected]
To unsubscribe, send email to
[email protected]

Reply via email to