简体   繁体   English

PHP 5.6升级编译的旧扩展

[英]PHP 5.6 upgrade compiled old extensions

I have just upgraded my PHP version from 5.5 to 5.6 using brew (I am on OSX 10.10 Yosemite) and after some configuration everything works fine except for some of my PHP extensions. 我刚刚使用brew(我在OSX 10.10 Yosemite上)将PHP版本从5.5升级到5.6,经过一些配置后,除了我的某些PHP扩展之外,其他一切都正常。 I am trying to fix this but when I run php -v, I get the following PHP warning: 我正在尝试解决此问题,但是当我运行php -v时,出现以下PHP警告:

 Xdebug requires Zend Engine API version 220121212. The Zend Engine API version 220131226 which is installed, is newer. Contact Derick 

Rethans at http://xdebug.org/docs/faq#api for a later version of Xdebug. 请访问http://xdebug.org/docs/faq#api ,以获取更高版本的Xdebug。

PHP Warning: PHP Startup: igbinary: Unable to initialize module Module compiled with module API=20121212 PHP compiled with module API=20131226 These options need to match in Unknown on line 0 PHP警告:PHP启动:igbinary:无法初始化模块使用模块API = 20121212编译的模块使用模块API = 20131226编译的PHP这些选项需要在第0行的Unknown中进行匹配

Warning: PHP Startup: igbinary: Unable to initialize module Module compiled with module API=20121212 PHP compiled with module API=20131226 These options need to match in Unknown on line 0 PHP Warning: PHP Startup: intl: Unable to initialize module Module compiled with module API=20121212 PHP compiled with module API=20131226 These options need to match in Unknown on line 0 警告:PHP启动:igbinary:无法初始化使用模块API = 20121212编译的模块模块使用模块API = 20131226编译的PHP这些选项需要在行0的“未知”中匹配PHP警告:PHP启动:intl:无法初始化使用以下模块编译的模块模块API = 20121212用模块API = 20131226编译的PHP这些选项需要在第0行的Unknown中进行匹配

Warning: PHP Startup: intl: Unable to initialize module Module compiled with module API=20121212 PHP compiled with module API=20131226 These options need to match in Unknown on line 0 PHP Warning: PHP Startup: mcrypt: Unable to initialize module Module compiled with module API=20121212 PHP compiled with module API=20131226 These options need to match in Unknown on line 0 警告:PHP启动:intl:无法初始化模块使用模块API = 20121212编译的模块PHP使用模块API = 20131226编译的PHP这些选项需要在第0行PHP中的Unknown中进行匹配警告:PHP启动:mcrypt:无法初始化使用模块API编译的模块模块API = 20121212用模块API = 20131226编译的PHP这些选项需要在第0行的Unknown中进行匹配

Warning: PHP Startup: mcrypt: Unable to initialize module Module compiled with module API=20121212 PHP compiled with module API=20131226 These options need to match in Unknown on line 0 PHP 5.6.22 (cli) (built: Sep 15 2016 18:47:34) Copyright (c) 1997-2016 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies 警告:PHP启动:mcrypt:无法初始化模块使用模块API = 20121212编译的模块使用模块API = 20131226编译的PHP这些选项需要在行0 PHP 5.6.22(cli)的“未知”中匹配(内置:2016年9月15日18: 47:34)版权所有(c)1997-2016 The PHP Group Zend Engine v2.6.0,版权所有(c)1998-2016 Zend Technologies

I thought then that if I edit my php-config and change the following: 我当时想,如果我编辑我的php-config并更改以下内容:

extension_dir='/usr/lib/php/extensions/no-debug-non-zts-20121212' extension_dir ='/ usr / lib / php / extensions / no-debug-non-zts-20121212'

To

20131226 20131226

Then perhaps that would resolve the issue however I don't have a 20131226 folder under /usr/lib/php/extensions/. 然后也许可以解决问题,但是我在/ usr / lib / php / extensions /下没有20131226文件夹。

I am just wondering as to what I can do to upgrade my zend engine or add this folder as it seems my extensions are still running against my old PHP 5.5 install but I don't see any extension for PHP 5.6 and am not too sure how to add them in this case. 我只是想知道我该怎么做才能升级zend引擎或添加此文件夹,因为看来我的扩展仍在针对旧的PHP 5.5安装运行,但是我没有看到PHP 5.6的任何扩展,也不太确定如何在这种情况下添加它们。

Also just to note, I installed using brew namely: 还要注意,我使用brew进行安装:

brew install --without-apache --with-fpm --with-mysql php56 brew install --without-apache --with-fpm --with-mysql php56

Thanks 谢谢

My mistake, in order to fix this, I had to remove all the old conflicting extensions like so: 我的错误,为了解决此问题,我必须删除所有旧的有冲突的扩展,例如:

brew uninstall php55-mcrypt php55-xdebug php55-intl php55-igbinary brew卸载php55-mcrypt php55-xdebug php55-intl php55-igbinary

and then reinstall them and build from source using: 然后使用以下命令重新安装它们并从源代码进行构建:

brew reinstall php56-xdebug php56-intl php56-igbinary php56-mcrypt --build-from-source brew重新安装php56-xdebug php56-intl php56-igbinary php56-mcrypt --build-from-source

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

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