Apache, mod userdir and PHP (or Allow PHP scripts in user directory)

23Oct10

I know this is an old news but this is the first time I’ve ever would like to do this, allow users to have PHP scripts installed in user directory (via mod_userdir) [and must be executable by visitors]. Initially I could not have PHP executed until found this forum:  http://ubuntuforums.org/showthread.php?t=1521010&page=1  which the valuable reply from patjenk said:

I am using 10.4 server and recently ran into this problem. In /etc/apache2/mods-enabled/php5.conf check to see if PHP is explicitly turned off in user directories. The configuration will look like this:

<IfModule mod_userdir.c>

    <Directory /home/*/public_html>

        php_admin_value engine Off

    </Directory>

</IfModule>

Commenting this out and restarting the apache server fixed the problem for me.

And I found it works for me as well. Thank you Google and patjenk.

Advertisements


No Responses Yet to “Apache, mod userdir and PHP (or Allow PHP scripts in user directory)”

  1. Leave a Comment

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: