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
or
grep -R "extension=midgard2" /etc/php5/cli
Make sure that there is only one line uncommented `; line` for comment