1

I have installed all of the following packages:

  • apache2
  • php5
  • apache2-mod_php5

However, when opening a .php file in the web browser on my server, I am offered to download the file.

apache2ctl -M does not list mod_php as loaded.

Why does it not automatically load my PHP module?

1 Answer 1

1

The installation process for apache2-mod_php5 seems to be broken. It adds the module with an incorrect name to the Apache config.

Open the file /etc/sysconfig/apache2 and find the line starting with APACHE_MODULES=. At the end of this line the PHP module is added as apache2-mod_php5. This is an incorrect name, change this to mod_php5 and restart Apache with service restart apache2.

The PHP module should now cload correctly.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .