Php – Getting PHP to work with apache to run .php files through browser

apache-2.2PHP

I have VPS running Debian 5.0 (I think) and I would like to get it to run PHP files. I was told it needed to be configured with Apache. I tried entering the command apt-get install apache2 php5 libapache2-mod-php5. But there was no change. Console output: http://pastebin.com/sVMWq6mA

This is everything in my /etc/apache2/mods-enabled:
http://img35.imageshack.us/img35/6474/modsb.jpg

My webserver can be accessed here:
http://206.217.223.136/test/
In my test.php file I have the code :

<?php
 phpinfo();
?>

but instead of displaying the page, it tries to download it. How can I fix this?

Best Answer

Have you tried "a2enmod php" or "a2enmod php5" on your console to enable the php module?

Your command line is correct and it seems that everything is installed correct.

Edit: I have looked its

a2enmod php5
apache2ctl restart

Edit2: Ok i have looked on the server for the problem. There were different problems with the apt-get installer. Then were httpd running on port 80 so apache2 could'nt start on the port and the test.php file was not in a correct file encoding this was the main problem. After checking all of them and create a new file with vi it was running.