Like in the title, PHP Warning: Module ‘mcrypt’ already loaded in Unknown on line 0.
When we launch whatever a command PHP, for example php -v, we will see the warning :
# php -v PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/mcrypt.ini on line 1 in Unknown on line 0 PHP Warning: Module 'mcrypt' already loaded in Unknown on line 0 ...
This warning was caused by the duplicated configuration of the mcrypt extension.
To check it, we can use this command (the path could be changed depends on the local configuration):
grep "extension=mcrypt.so" /etc/php5/cli/php.ini
grep "extension=mcrypt.so" /etc/php5/cli/conf.d/mcrypt.ini
If the two command return the same thing : “extension=mcrypt.so”, this means the extension is included two times.
The solution is simple, juste remove one of these configuration, that will be ok.