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

Bug #305254 reported by Krenar Qehaja
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
php5 (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

Binary package hint: php5

php from cli (only) throws a warning: "PHP Warning: Module 'mcrypt' already loaded in Unknown on line 0", it started to happen after my upgrade to intrepid.

kedadi@kedadi-laptop:~$ php -v
PHP Warning: Module 'mcrypt' already loaded in Unknown on line 0
PHP 5.2.6-2ubuntu4 with Suhosin-Patch 0.9.6.2 (cli) (built: Oct 14 2008 20:06:32)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies

a simple workaround (until it gets fixed): comment line "extension=mcrypt.so" (with #) @ /etc/php5/conf.d/mcrypt.ini or the same line (with ;) @ /etc/php5/cli/php.ini

Revision history for this message
Andreas Olsson (andol) wrote :

What version of Ubuntu did you upgrade from? How did you go about the upgrade? Did you have php5-mcrypt and php5-cli already installed before the upgrade?

Changed in php5:
status: New → Incomplete
Revision history for this message
Krenar Qehaja (kedadi) wrote :

@Andreas Olsson

I upgraded from hardy to intrepid, the upgrade process went smooth as it should, and yes i had already installed php5-mcrypt and php5-cli.

Revision history for this message
Andreas Olsson (andol) wrote :

@Krenar Qehaja

When you did the upgrade, I assume you choose to keep your php.ini:s instead of installing new versions of it/them?

The problem arises from the fact that Hardy loads mcrypt.so directly from php.ini while Intrepid has it included from conf.d/. Keeping the original php.ini from Hardy, while the php5-mcrypt of intrepid adds itself to conf.d/ causes the situation you describe.

Actually, this affects mod_php the same way. The warning shows up, by default, in /var/log/apache/error

Not sure whatever to classify this as an upgrade-bug or not.

Revision history for this message
Krenar Qehaja (kedadi) wrote :

@Andreas Olsson

Probably I've kept the old php.ini during the upgrade.

Looks like an upgrade-bug, thanks for clarification.

Revision history for this message
Andreas Olsson (andol) wrote :

Note sure if keeping old php.ini:s thru upgrades are supported.

Anyway, the manual fix is definitely to remove "extension=mcrypt.so" from your php.ini:s.

Changed in php5:
status: Incomplete → Confirmed
Andreas Olsson (andol)
Changed in php5:
assignee: nobody → andol
assignee: andol → nobody
Revision history for this message
Mathias Gug (mathiaz) wrote :

Keeping the old config files may well break your system. There is a workaround outlined in the bug. Marking as won't fix.

Changed in php5:
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.