Categories
php

How To – Activate PHP in public_html for Ubuntu 10

It seems it is a bug (I didn’t investigate too much) in Ubuntu 10.x related to PHP files in userdirs.

On my box I have Ubuntu 10.10, Apache/2.2.16 (Ubuntu) and PHP 5.3.3-1. Everything worked fine except the PHP files from ~userdir. Instead to parse these files, the web server send them directly to the browser which open the “save as” window.

The problem is in /etc/apache2/mods-enabled/php5.conf file.

[sourcecode language=”xml”]
<ifmodule mod_userdir.c>
<directory /home/*/public_html>
php_admin_value engine Off
</directory>
</ifmodule>
[/sourcecode]

These lines should be commented:

[sourcecode language=”xml”]
# <ifmodule mod_userdir.c>
# <directory /home/*/public_html>
# php_admin_value engine Off
# </directory>
# </ifmodule>
[/sourcecode]

Leave a Reply

Your email address will not be published. Required fields are marked *