Cant get PHP to work - it is trying to download .php

Derek Broughton news at
Wed Mar 5 13:11:41 UTC 2008

Philippe Didier wrote:

> Ben Edwards wrote:
>> I have installed lamp through synaptic (Edit->Mark Packages by
>> task...).  When I go to a .php file (e.g. localhost/test.php) the
>> browser downloads the file.  There is no reference to php in
>> apache2.config.  What have I missed?
> You will find a lot of answers in Google. The first thing and mst easy
> things to do is to clean Firefox cache. Close all tabs and clean using
> the menu Tools/Clear private datas... assuming you are using Firefox.
> Then try again,

But he still needs _some_ reference to php in his apache configs.  I don't
use php, so I can't say what the required parts are but I'd expect you need
the libapache2-mod-php5 package, make sure there's a symlink
in /etc/apache2/mods-enabled/ to whatever the php module is
in /etc/apache2/mods-available/, and then you would probably need an
AddOutputFilterByType instruction in the config files.

More information about the ubuntu-users mailing list