mcrypt is not loading (even after installing)

萝らか妹 提交于 2019-12-25 09:31:35

问题


I have changed mac's builtin version 5.6 of php to 7.0 which works fine but my mcrypt is not working. I have installed it using brew install mcrypt php70-mcrypt. How I can fix this issue? I am using MacOS Sierra.


回答1:


First, make sure you restarted PHP. Then, at the command line, type php -v and make sure you're actually using 7.0.

If it still doesn't work make a php file and run phpinfo() and see if the extension is loading. If not, please provide any further information you can.




回答2:


Have you turned on the mcrypt after installing it? You can use the following command to activate the mcrypt.

PHP5

php5enmod mcrypt

PHP7+

phpenmod mcrypt

Also, You can do this by uncommenting the line for mcrypt in php.ini.

Let me know if that helps!




回答3:


You need to enable the extension by editing /etc/php.ini. If this file is not present, copy /etc/php.ini.default and rename it:

sudo cp /etc/php.ini.default /etc/php.ini

Edit the /etc/php.ini file and add the following:

extension=mcrypt.so

and Restart apache

sudo apachectl restart


来源:https://stackoverflow.com/questions/43361239/mcrypt-is-not-loading-even-after-installing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!