Call to undefined function mcrypt_decrypt() - even when php5-mcrypt installed

*爱你&永不变心* 提交于 2019-11-28 23:44:43

Installing is one thing. Enabling is another. Please make sure your /etc/php.ini file contains the following line :

extension=mcrypt.so

If you can't find your php.ini, create a test.php file containing :

<?php phpinfo(); ?>

Execute it with php test.php | grep ".ini", and you'll find the paths to your ini files. One of them must include the extension= line above.

You may have to enable the module. On Ubuntu systems this can most easily be done by linking the ini file that ships with php5-mcrypt into your conf.d for each PHP binary you want to use:

sudo ln -s /etc/php5/conf.d/mcrypt.ini /etc/php5/cli/conf.d/mcrypt.ini
sudo ln -s /etc/php5/conf.d/mcrypt.ini /etc/php5/cgi/conf.d/mcrypt.ini
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!