Mautic Community Forums

2.8.2 RuntimeExeption mcrypt extension not enabled - but it is

Hello,



I installed mautic 2.8.2 and these cronjobs



*/5 * * * * php /var/www/html/app/console mautic:segments:update --env=prod

*/5 * * * * php /var/www/html/app/console mautic:campaigns:rebuild --env=prod

*/5 * * * * php /var/www/html/app/console mautic:campaigns:trigger --env=prod



and get this errors in the log:



RuntimeException: The mcrypt extension is not enabled on this server. (uncaught exception) at /var/www/html/app/bundles/CoreBundle/Helper/EncryptionHelper.php line 31 while running console command mautic:campaigns:trigger [] []



RuntimeException: The mcrypt extension is not enabled on this server. (uncaught exception) at /var/www/html/app/bundles/CoreBundle/Helper/EncryptionHelper.php line 31 while running console command mautic:segments:update [] []



The PHPinfo says, that mcrypt is enabled, the Provider also says, that mcrypt is enabled, any idea what that can be?






Hi!

Ok, random thought here but did you check php -i? The CLI version of PHP is different from the mod_php that the server runs. Usually, they have different php.ini files and enabling an extension on one doesn’t automatically enable it on the other. Your cron jobs are using the cli version of PHP.

Cheers! :slight_smile:
=C=

Thank you! Yes, I think this is the problem, no mcrypt with php -i :frowning:

Hello,

I installed mautic 2.8.2 and these cronjobs

*/5 * * * * php /var/www/html/app/console mautic:segments:update --env=prod
*/5 * * * * php /var/www/html/app/console mautic:campaigns:rebuild --env=prod
*/5 * * * * php /var/www/html/app/console mautic:campaigns:trigger --env=prod

and get this errors in the log:

RuntimeException: The mcrypt extension is not enabled on this server. (uncaught exception) at /var/www/html/app/bundles/CoreBundle/Helper/EncryptionHelper.php line 31 while running console command mautic:campaigns:trigger [] []

RuntimeException: The mcrypt extension is not enabled on this server. (uncaught exception) at /var/www/html/app/bundles/CoreBundle/Helper/EncryptionHelper.php line 31 while running console command mautic:segments:update [] []

The PHPinfo says, that mcrypt is enabled, the Provider also says, that mcrypt is enabled, any idea what that can be?