7

I'm installing PHP 5.4 with Apache 2.4 on Ubuntu 14.04. Php 5.4 is not available on apt-get so I have to install it from source. I have installed

apache2-prefork-dev
apache2-mpm-prefork

And i configured PHP with

./configure --with-apxs2=/usr/bin/apxs2 --with-mysql --with-curl

Then i build and install. I added this lines to /etc/apache2/apache2.conf:

LoadModule mpm_event_module /usr/lib/apache2/modules/mod_mpm_prefork.so
LoadModule php5_module  modules/libphp5.so
AddType application/x-http-php  .php

When I try to restart Apache I get this error:

module mpm_event_module is already loaded, skipping

I searched inside the .conf file, but the module was not loaded there before. EDIT:

As by @Andrew Schulman answer I could find it in

/etc/apache2/mods-available/mpm_event.load

When I run

a2enmod mpm_event

I get this:

Considering conflict mpm_worker for mpm_event:
Considering conflict mpm_prefork for mpm_event:
Considering conflict mpm_itk for mpm_event:

How do I solve the conflict?

EDIT2:

I used

a2dismod 

on

mpm_event_module 

and loaded the mpm_prefork_module. Apache restarts ok, but when I try to run

a2enmod mpm_prefork_module 

I get this:

ERROR: Module mpm_prefork_module does not exist! 

What does it mean?

MaPi
  • 193
  • 1
  • 1
  • 7

1 Answers1

10

You can find it by grepping through the whole Apache configuration:

grep -r mpm_event_module /etc/apache2

It's almost certainly in /etc/apache2/mods-available/mpm_event.load. In Debian/Ubuntu the standard way of enabling and disabling Apache modules is to run e.g.

a2dismod mpm_event
a2enmod mpm_prefork

See man a2enmod, and similarly man a2enconf and man a2ensite.

Andrew Schulman
  • 8,561
  • 21
  • 31
  • 47
  • Thanks @Andrew Schulman. Your solution is working. I used `a2dismod mpm_event a2enmod mpm_prefork`. Thanks. – Foysal Mar 27 '20 at 13:44