PDA

View Full Version : [ubuntu] Apache2 and PHP5 ?



alket
April 14th, 2009, 06:03 PM
I installed Apache2 and PHP5, but when i load a PHP file from loaclhost firefox doesn't recognize it

Iowan
April 15th, 2009, 01:56 AM
What do you mean by "doesn't recognize it"? Does it try to download it, or does it generate another error message?
Check the Troubleshooting PHP5 section in this (https://help.ubuntu.com/community/ApacheMySQLPHP) help page.

alket
April 15th, 2009, 12:46 PM
it tries to download.

Arndt
April 15th, 2009, 03:04 PM
it tries to download.

Did you change the apache2.conf file? In my /etc/apache2/apache2.conf, I added the line


AddType application/x-httpd-php .php

CryptiniteDemon
April 15th, 2009, 03:11 PM
trying opening it as localhost/filename.php instead of file:///var/www/filename.php in the web browser.

You're requesting files from your machine instead of actually requesting it through a port over tcp, which means apache won't be used & the php file won't be sent through the php processor.

alket
April 15th, 2009, 03:22 PM
i run it from localhost, but i played a little bit with apache.conf file now it is not working.

freak42
April 15th, 2009, 03:27 PM
try one of the tutorials to get it installed correctly:

http://www.google.ch/search?q=apache+php+ubuntu+8.10