Lamp PHP5 not working (apache2-mod_php5)

Hello,

I have already installed a lot of time lamp in the past, but this time it does not work.

I have tryed:

  • Install LAMP all in one.
  • Install apache2, php5 and mod_php5 separately.

In both cases, php does not work:
Php files are just downloaded like it was a pdf (with all code full visible), so definitely apache is not parsing it.

Any idea of the problem?

DATA:
I am using Opensuse 13.1
I have checked that:

  • /etc/php5/apache2/php.ini has “engine = On”
  • /etc/apache2/conf.d contain a php.conf
  • apache2ctl -m has not php modules loaded

Thanks you in advance for any help.

Adrian M.

Have you actually enabled the PHP plugin?

a2enmod php5

Thanks you!

I feel stupid, but i was looking for the solution for about 4h.

Well, there was a change in the latest apache update regarding this:

* Sun Apr 27 2014 draht@suse.de
...
- removed php5 and authz_default from /etc/sysconfig/apache2 upon
  fresh install - authz_default no longer exists, and php5 should
  not be enabled by default. This reverts a change from Peter Poeml
  from March 2005: mod_php5 only runs with prefork MPM, and we
  have different ways to run php5 by now; prefork is
  default-conservative and may vanish.
...

So php5 was enabled by default before that, maybe that caused your confusion. :wink: