PHP 5.6升级编译的旧扩展 [英] PHP 5.6 upgrade compiled old extensions

查看:93
本文介绍了PHP 5.6升级编译的旧扩展的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚使用brew(我在OSX 10.10 Yosemite上)将PHP版本从5.5升级到5.6,经过一些配置后,除了我的某些PHP扩展之外,其他一切都正常。我正在尝试解决此问题,但是当我运行php -v时,出现以下PHP警告:

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. I am trying to fix this but when I run php -v, I get the following PHP warning:


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

Rethans联系api rel = nofollow> http://xdebug.org/docs/faq#api 用于
Xdebug的更高版本。

Rethans at http://xdebug.org/docs/faq#api for a later version of Xdebug.

PHP警告:PHP启动:igbinary:无法初始化模块
使用模块API = 20121212编译的模块使用模块
API = 20131226编译的PHP这些选项需要在第0行的Unknown中进行匹配

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启动:igbinary:无法初始化模块模块
使用模块API = 20121212编译的PHP模块
API = 20131226这些选项需要在Unknown中进行匹配在线0 PHP
警告:PHP启动:Intl:无法初始化使用模块API = 20121212编译的模块
模块使用模块
API = 20131226编译的PHP这些选项需要在线匹配0

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启动:intl:无法初始化使用模块API = 20121212 PHP编译的模块
使用模块
API编译的API = 20131226这些选项需要在第0行上的Unknown中匹配PHP
警告:PHP启动:mcrypt:无法初始化使用模块API = 20121212编译的模块模块
module
API = 20131226这些选项需要在第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启动:mcrypt:无法初始化已编译模块Module
使用模块API = 20121212用模块
编译的PHP API = 20131226这些选项需要在第0行的Unknown中进行匹配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

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-config并更改以下内容:

I thought then that if I edit my php-config and change the following:


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

然后也许可以解决问题,但是我在/ usr / lib / php / extensions /下没有20131226文件夹。

Then perhaps that would resolve the issue however I don't have a 20131226 folder under /usr/lib/php/extensions/.

我只是想知道如何升级zend引擎或添加此文件夹,因为我的扩展似乎仍在针对旧的PHP 5.5安装运行,但我没有看到任何扩展对于PHP 5.6,并不太确定如何在这种情况下添加它们。

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.

还要注意,我使用brew进行安装:

Also just to note, I installed using brew namely:


简单安装--without-apache --with-fpm --with-mysql php56

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

谢谢

推荐答案

我的错误,为了解决此问题,我必须删除所有旧的有冲突的扩展,例如因此:

My mistake, in order to fix this, I had to remove all the old conflicting extensions like so:


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

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

,然后使用以下方法重新安装它们并从源代码构建:

and then reinstall them and build from source using:


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

brew reinstall php56-xdebug php56-intl php56-igbinary php56-mcrypt --build-from-source

这篇关于PHP 5.6升级编译的旧扩展的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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