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?

3
  • You need to disable mpm_event, then enable mpm_prefork. – Andrew Schulman Apr 13 '15 at 9:10
  • Look again at the commands I wrote in my answer. You want mpm_prefork, not mpm_prefork_module. – Andrew Schulman Apr 13 '15 at 12:21
  • Hint: If you type a2enmod mpm_pre and press TAB, the shell will take care of the rest for you. – Andrew Schulman Apr 13 '15 at 12:23
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.

1
  • Thanks @Andrew Schulman. Your solution is working. I used a2dismod mpm_event a2enmod mpm_prefork. Thanks. – Foysal Mar 27 '20 at 13:44

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.