PHP扩展未在phpinfo中加载 [英] PHP extensions not loading in phpinfo

查看:386
本文介绍了PHP扩展未在phpinfo中加载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,我在Mountain Lion上运行MAMP,并使用pecl安装了gmagick和imagick,它们都是候选版本(主要是因为gmagick没有稳定的发行版,而imagick 3.0.0没有安装,它提供了制造错误).当我在终端中运行php -i而不是phpinfo()时出现模块,我检查了php.ini两者是否相同,所以这不是问题.但是我安装了bitset(这是一个稳定的版本),它出现在phpinfo()和php -i中.所以我的问题是,PHP是否具有任何配置选项,如果它们不稳定,它们不会加载扩展?顺便说一句,更改ini文件后,我确实重新启动了服务器.

So I'm running MAMP on Mountain Lion and I've installed gmagick and imagick using pecl, both are relase candidates (mainly because gmagick doesn't have a stable release and imagick 3.0.0 doesn't install, it gives a make error). The modules appear when I run php -i in the terminal but not in phpinfo(), I have checked the php.ini it is the same for both so that is not the issue.However I have installed bitset(which is a stable release) and it appears in phpinfo() and php -i. So my question is does PHP have any configuration option that does not load extensions if they are not stable? Btw, I did restart my server after the changes to the ini file.

推荐答案

我在php-fpm和nginx服务器上遇到了类似的问题.问题是由于以下事实:更新的php配置未反映在当前活动的php-fpm工作进程中.我必须手动 kill fpm进程,然后再次将其重新启动,以获取更新的扩展程序信息.

I faced a similar problem with php-fpm and nginx server. The problem was due to the fact that the updated php configuration was not reflected in the current active php-fpm worker processes. I have to manually kill the fpm process and restart it again to have the updated extensions info.

对我有用的步骤:

1)寻找活动的php-fpm进程

1) Look for active php-fpm process

 ps ax | grep "fpm"

通常,这将列出多个进程

mostly this will list more than one process

2)手动终止进程

kill -9 [pid_got_from_previous_command]

3)重新启动php-fpm进程

3) restart php-fpm process

sudo service php5-fpm start

注意:尝试使用sudo service php-fpm reloadsudo service php-fpm restart之类的方法无效,因为旧的子进程保留了旧的配置.杀死活动进程并重新启动php fpm会为我更新phpinfo.

Note: Trying something like sudo service php-fpm reload or sudo service php-fpm restart didn't work since the old child processes retained the old configuration. Killing the active processes and restarting php fpm what updated the phpinfo for me.

这篇关于PHP扩展未在phpinfo中加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆