I"m running Mint Debian 64 bit and trying to install the PHP5 package to run on apache2. After running the following apache installs and I can get to http://localhost/

sudo aptitude install apache2

Then I install PHP5 using the following and php installs.

sudo aptitude install php5

I then proceed to go to /var/www and create a test.php file filling it with

<?php phpinfo(); ?>

and then I go to http://localhost/test.php, and a php file downloads instead of opening.

I look into the following directory and can't find the php5.conf nor php5.load files that are supposed to be there.


Also running a2enmod doesn't list php in the list. aptitude does confirm that libapache2-mod-php5 is indeed installed.

Extracing the php5.conf and php5.load from


and dumping them into the following and restarting produces the same results


then running a2enmod displays php in the list now, however even with it enabled, I still get the same result.

I have completely purged using "aptitude purge" all PHP and apache packages, rebooted and then reinstalled only to come to the same result. I'm almost ready to download and compile the stuff by hand. I am however trying to avoid this as I do like Debians packaging model

UPDATE: I have noticed that when you remove libapache2-mod-php5 package, libapache2-mod-php5filter takes its place.

  • Did you restart Apache? Did you try to clear the web browser cache or attempt with another?
    – quanta
    Aug 13, 2011 at 2:26
  • doing so gives the same result Aug 13, 2011 at 2:34

2 Answers 2


Did you install libapache2-mod-php5? php5 alone does not provide the apache module.

  • yes, I put in my post that "aptitude does confirm that libapache2-mod-php5 is indeed installed." Aug 12, 2011 at 23:57

ok it works. I used Synaptic Package Manager to completely uninstall ibapache2-mod-php5 package, which installed libapache2-mod-php5filter.

Than I completely uninstalled , libapache2-mod-php5filter which installed ibapache2-mod-php5 package.

sudo /etc/init.d/apache2 graceful

and it worked. Weird!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.