Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When running PHP on my Ubuntu 13.04 machine I get the following warning:

 PHP Warning:  Module 'midgard2' already loaded in Unknown on line 0

This tells me exactly nothing. How could I resolve this issue?

I tried purging all components having midgard in their name and reinstalling php5-midgard2 -- the error remains.

share|improve this question
up vote 1 down vote accepted

You have enabled midgard2.so twice. To find files where it's enables, try this one for apache2 :

grep -R "extension=midgard2" /etc/php5/apache2


grep -R "extension=midgard2" /etc/php5/cli

Make sure that there is only one line uncommented ; line for comment

share|improve this answer
The files in my case were /etc/php5/apache2/conf.d/20-midgard2.ini and /etc/php5/apache2/conf.d/midgard2.ini. – k0pernikus Apr 2 '13 at 15:10
Comment /etc/php5/apache2/conf.d/midgard2.ini, it's appear that now (I don't know since when), php extensions from aptitude is handled by php5enmod (who use 20-midgard2.ini. – GHugo Apr 2 '13 at 15:14

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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