ERROR Messages
[12-Oct-2015 16:37:21] NOTICE: PHP message: PHP Warning: Module 'mongo' already loaded in Unknown on line 0
Warning: Module 'mongo' already loaded in Unknown on line 0
[12-Oct-2015 16:37:21] NOTICE: PHP message: PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/Cellar/php56-mcrypt/5.6.3/mcrypt.so' - dlopen(/usr/local/Cellar/php56-mcrypt/5.6.3/mcrypt.so, 9): image not found in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library '/usr/local/Cellar/php56-mcrypt/5.6.3/mcrypt.so' - dlopen(/usr/local/Cellar/php56-mcrypt/5.6.3/mcrypt.so, 9): image not found in Unknown on line 0
[12-Oct-2015 16:37:21] NOTICE: PHP message: PHP Warning: Module 'mongo' already loaded in Unknown on line 0
Warning: Module 'mongo' already loaded in Unknown on line 0
[12-Oct-2015 16:37:22] NOTICE: fpm is running, pid 25539
[12-Oct-2015 16:37:22] NOTICE: ready to handle connections
原因
有两种方法可以�安装大部分的PHP扩展。
一个是直接通过编译扩展的二进制文件到PHP。
另一种是通过加载通过php.ini文件共享的动态扩展。
错误显示正在通过php.ini加载扩展,�但是他们已经编译成PHP二进制文件。
解决方法
- 注释掉php.ini下的扩展:
/usr/local/etc/php/5.6/php.ini
extension=mcrypt.so
2.修改php配置文件下的扩展路径
/usr/local/etc/php/5.6/conf.d/ext-mcrypt.ini
...
3.重新编译php-fpm