unable to get any php script to work on public_html but they work in /var/www

Asked by Mike Higgins

Problems with LAMP since installing Ubuntu 13.10

I am unable to get any php script to work on my public_html since I upgraded. I have installed the test php (<?php phpinfo(); ?) in /var/www/ and that works fine but the same script in localhost/~mike/public_html/ just displays a blank screen.

Further testing in calling other php scripts usually displays the script it's self from the 16th line onwards.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Laszlo Smajda
Solved:
Last query:
Last reply:
Revision history for this message
Best Laszlo Smajda (leoamros-5) said :
#1

Hi,

you need to edit /etc/apache2/apache2.conf and add this lines

<Directory /home/leoamros/public_html/>
        Options Indexes FollowSymLinks
        AllowOverride None
        Require all granted
</Directory>

then you need to edit /etc/apache2/mods-available/php5.conf and comment the lines after:
# To re-enable php in user directories comment the following lines ......

then restart your apache :)

Revision history for this message
Mike Higgins (mike-higgins) said :
#2

Thanks Laszlo Smajda, that solved my question.