简体   繁体   English

PHP-5 mcrypt将无法在nginx服务器ubuntu 14.04上启用

[英]PHP-5 mcrypt won't enable on nginx server ubuntu 14.04

I've been trying to install mcrypt extension for php5 on Ubuntu 14.04 ARM server running nginx. 我一直在尝试在运行nginx的Ubuntu 14.04 ARM服务器上安装php5的mcrypt扩展。

PROBLEM 问题

In phpinfo() I can only see the authors of mcrypt but the module itself is missing. phpinfo()我只能看到mcrypt的作者,但模块本身却缺失了。 I can't use mcrypt functionalities anywhere on that server. 我无法在该服务器上的任何位置使用mcrypt功能。

WHAT I TRIED 我做了什么

Running php5 -m shows that mcrypt is installed. 运行php5 -m显示已安装mcrypt

In /etc/php5/fpm/php.ini I have the following extension = /usr/lib/php5/20121212+lfs/mcrypt.so . 在/etc/php5/fpm/php.ini中我有以下extension = /usr/lib/php5/20121212+lfs/mcrypt.so This I read in google after I tried only with extension = mcrypt.so . 在我尝试使用extension = mcrypt.so后,我在google中读到了这个extension = mcrypt.so Neither gave result. 都没有给出结果。

In /etc/php5/fpm/conf.d/20-mcrypt.ini I have this extension=/usr/lib/php5/20121212+lfs/mcrypt.so as well. 在/etc/php5/fpm/conf.d/20-mcrypt.ini中我有这个extension=/usr/lib/php5/20121212+lfs/mcrypt.so

I restarted php5-fpm and nginx multiple times, I also tried php5enmod mcrypt which doesn't show any warnings or errors. 我多次重启php5-fpmnginx ,我也尝试了php5enmod mcrypt ,它没有显示任何警告或错误。

I created symlink between the .so and .ini file. 我在.so和.ini文件之间创建了符号链接。

Any ideas? 有任何想法吗?

Ok so it turns out that my only escape was to purge php5-fpm , reboot the server, then apt-get install php5-fpm , now everything is loaded correctly. 好吧事实证明,我唯一的逃脱是purge php5-fpm ,重新启动服务器,然后apt-get install php5-fpm ,现在一切都正确加载。 I have no idea why this happens. 我不知道为什么会这样。 If anyone has explaination I'll be happy to update my answer with it. 如果有人有解释,我会很乐意用它来更新我的答案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM