mac安装lnmp环境中php扩展遇到的问题
2017-02-24 16:30
816 查看
在装好lnmp环境之后,执行php -m命令查看php扩展时,碰到如下警告:
1.
Cannot load Xdebug - it was built with configuration API220131226,NTS, whereas running engine is API220131226,NTS,debug
2.
PHP Warning: PHP Startup: xhprof: Unable to initialize module
Module compiled with build ID=API20131226,NTS
PHP compiled with build ID=API20131226,NTS,debug
These options need to match
in Unknown on line 0
3.
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php56-gearman/gearman.so' - dlopen(/usr/local/opt/php56-gearman/gearman.so, 9): image not found in Unknown on line 0
在参考了链接 http://youlanglang.com/macxia-nmphuan-jing-de-da-jian-mnmp-2/ 之后,发现如下解决办法:
问题1:如果 php -v 后,mcrypt会有这样的问题
则用此命令重装一下
问题2:如果 php -v 后,memcached 有这样的问题:
则需要修改一下配置文件
问题3:如果 php -v 有以下问题:
则用此命令重装一下:
我直接使用了一条命令,解决了其中遇到的大部分警告:
brew reinstall php56-pdo-dblib --build-from-source php56-pdo-dblib
--build-from-source
只要将php56-pdo-dblib替换成你要安装的扩展,即可解决问题。特此记录。其中深层次原因还有待解决,也请看到的朋友可以指点迷津。
1.
Cannot load Xdebug - it was built with configuration API220131226,NTS, whereas running engine is API220131226,NTS,debug
2.
PHP Warning: PHP Startup: xhprof: Unable to initialize module
Module compiled with build ID=API20131226,NTS
PHP compiled with build ID=API20131226,NTS,debug
These options need to match
in Unknown on line 0
3.
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php56-gearman/gearman.so' - dlopen(/usr/local/opt/php56-gearman/gearman.so, 9): image not found in Unknown on line 0
在参考了链接 http://youlanglang.com/macxia-nmphuan-jing-de-da-jian-mnmp-2/ 之后,发现如下解决办法:
问题1:如果 php -v 后,mcrypt会有这样的问题
1 2 3 4 5 | PHP Warning: PHP Startup: mcrypt: Unable to initialize module Module compiled with build ID=API20151012,NTS PHP compiled with build ID=API20151012,NTS,debug These options need to match in Unknown on line 0 |
1 | brew reinstall mcrypt --build-from-source php70-mcrypt --build-from-source |
1 | PHP Deprecated: PHP Startup: memcached.sess_lock_wait and memcached.sess_lock_max_wait are deprecated. Please update your configuration to use memcached.sess_lock_wait_min, memcached.sess_lock_wait_max and memcached.sess_lock_retries in Unknown on line 0Deprecated: PHP Startup: memcached.sess_lock_wait and memcached.sess_lock_max_wait are deprecated. Please update your configuration to use memcached.sess_lock_wait_min, memcached.sess_lock_wait_max and memcached.sess_lock_retries in Unknown on line 0PHP Deprecated: PHP Startup: memcached.sess_lock_wait and memcached.sess_lock_max_wait are deprecated. Please update your configuration to use memcached.sess_lock_wait_min, memcached.sess_lock_wait_max and memcached.sess_lock_retries in Unknown on line 0Deprecated: PHP Startup: memcached.sess_lock_wait and memcached.sess_lock_max_wait are deprecated. Please update your configuration to use memcached.sess_lock_wait_min, memcached.sess_lock_wait_max and memcached.sess_lock_retries in Unknown on line 0PHP 7.0.2 (cli) (built: Jan 7 2016 10:40:26) ( NTS )Copyright (c) 1997-2015 The PHP GroupZend Engine v3.0.0, Copyright (c) 1998-2015 Zend Technologies with Xdebug v2.4.0RC3, Copyright (c) 2002-2015, by Derick Rethans |
/usr/local/etc/php/7.0/conf.d/ext-memcached.ini,将以下两句注释:
12 | ;memcached.sess_lock_wait = 150000 ;memcached.sess_lock_max_wait = 0 |
1 | Cannot load Xdebug - it was built with configuration API320151012,NTS, whereas running engine is API320151012,NTS,debug |
1 | brew install php70-xdebug --build-from-source |
brew reinstall php56-pdo-dblib --build-from-source php56-pdo-dblib
--build-from-source
只要将php56-pdo-dblib替换成你要安装的扩展,即可解决问题。特此记录。其中深层次原因还有待解决,也请看到的朋友可以指点迷津。
相关文章推荐
- Mac安装PHP开发环境遇到的问题
- Mac 下安装PHP遇到的问题
- mac下php扩展mcrypt无法安装问题
- 整理PHP_YII环境安装遇到的一些问题
- 安装PHP可能遇到的问题“无法载入mysql扩展” 的解决方法
- 升级mac中的系统之后,给PHP安装扩展常出现问题
- PHP中安装APC扩展遇到问题
- ubuntu通过apt-get方式搭建lnmp环境以及php扩展安装
- Ubuntu 安装PHP的LDAP扩展时遇到的问题以及解决方案
- 一键安装lnmp后添加php扩展问题
- 安装PHP可能遇到的问题“无法载入mysql扩展” 的解决方法
- mac 升级到mavericks 安装php扩展现问题
- Mac系统升级到10.9(mavericks)时安装php扩展问题解决
- ubuntu通过apt-get方式搭建lnmp环境以及php扩展安装
- 安装php的tokyo_tyrant扩展时遇到的问题,以及解决方法
- VMWare 7 安装Mac OS X 10.6 搭建IOS开发环境遇到的细节问题
- PHP学习笔记(9)mongodb在wamp环境下的安装过程与遇到的问题排查
- Mac系统升级到10.9(mavericks)时安装php扩展问题解决
- PHP中安装APC扩展遇到问题
- Mac下安装LNMP(Nginx+PHP5.6)环境(转)