apache Mcrypt 已安装但未显示在 PHPINFO 上
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1450686/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Mcrypt installed but doesn't show up on PHPINFO
提问by Tomer Lichtash
I think I managed to install mcrypt lib. The files are in place, but it looks like the library doesn't run at all.
我想我设法安装了 mcrypt lib。文件就位,但看起来库根本没有运行。
Tried to add:
尝试添加:
extension=mcrypt.so
to PHP.INI; no good. Any help?
到 PHP.INI; 不好。有什么帮助吗?
回答by kalikid021
Anyone actually looking for an answer to this on Ubuntu OS greater than 13, you have to run
任何在 Ubuntu OS 大于 13 上真正寻找答案的人,你必须运行
php5enmod mcrypt
and then restart apache. This is new and follows the same route you would use to enable apache modules as well.
然后重启apache。这是新的,并遵循您用于启用 apache 模块的相同路线。
回答by richsage
Have you tried restarting Apache? It won't recognise the new installed module until you do so AFAIK. Also, you've written you "think" you've installed it - did you use eg apt-get or yum to install it (eg apt-get install php-mcrypt) or just download it?
您是否尝试过重新启动 Apache?除非您这样做 AFAIK,否则它不会识别新安装的模块。另外,你写过你“认为”你已经安装了它 - 你是使用例如 apt-get 或 yum 来安装它(例如apt-get install php-mcrypt)还是只是下载它?
回答by Randeep
I also had this same problem.
我也有同样的问题。
Sometimes it doesn't work when you add in /etc/php.d/mcrypt.ini
有时添加 /etc/php.d/mcrypt.ini 时不起作用
add it in /etc/php.ini , the main php config file
将它添加到 /etc/php.ini ,主要的 php 配置文件
Restart apache
重启apache
You are done.
你完成了。

