View Full Version : [ubuntu] [SOLVED] Apache2 w/php not working

November 27th, 2008, 06:02 PM

I've just setup a new server using ubuntu server.
Apache is running and I've installed php5 and reloaded the server.
however when i try to load a php file from the server it prompts me to download the file.

hope someone here might have an idea as to what I've done wrong, or If i need to install some additional software to make this run?

thanks in advance for your time!

November 27th, 2008, 06:27 PM
Try running

sudo a2enmod php5

and then verify that

ls /etc/apache2/mods-enabled/

has the php5 modules enabled.

You might need to restart apache and check the log files

sudo /etc/init.d/apache2 restart
more /var/log/apache2/error.log
more /var/log/apache2/access.log

November 27th, 2008, 06:37 PM
nice! your the man! running:

a2enmod php5

what exactly does this do?

November 27th, 2008, 09:34 PM
It's a perl script that basically creates links from the /etc/apache2/mods-available/ to the /etc/apache2/mods-enabled/ directory.

You can use the ln -s command yourself but it's easier.

November 27th, 2008, 09:36 PM
ah i see.
thanks again!