webtatic php mbstring add module to centos6.6


webtatic php mbstring add module to centos6.6

我一直在使用webtatic php 5.4.34版本来开发Facebook应用程序,但因此错误而突然停止—————————-PHP 致命错误:调用/var/www/html/facebook/src/Facebook/HttpClients/FacebookCurlHttpClient.php 中的未定义函数 Facebook''HttpClients''mb_strlen(( 在第 306 行—————————-

它需要 mbstring 模块(这是添加到 facebook php 函数中以解决 http 标头问题,并且无法注释掉我希望这样做(

Webtatic 说明提到了安装中的一个点,我可能有机会选择要安装的 php 模块,但已经安装了 php54w,我决定升级到 php56w,希望出现这个使用 mbstring 的选项。

所以我现在已经升级到 centos 6.6,然后尝试安装 php56w,但得到这个众所周知的错误:php56w-common与 php54w-common-5.4.34-1.w6.x86_64 的常见冲突。

该解决方案适用于 php54w,但正如您所看到的,这次没有,您能否建议修复

另外,有没有更好的方法来解决丢失的mbstring模块

[root@SECURE21 html]# rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm
Retrieving https://mirror.webtatic.com/yum/el6/latest.rpm
Preparing… ########################################### [100%]
package webtatic-release-6-5.noarch is already installed
[root@SECURE21 html]#
[root@SECURE21 html]#
[root@SECURE21 html]# yum install php56w php56w-opcache
Loaded plugins: fastestmirror, replace
Setting up Install Process
Loading mirror speeds from cached hostfile
* base: anorien.csc.warwick.ac.uk
* extras: mirror.econdc.com
* updates: centos.openitc.uk
* webtatic: uk.repo.webtatic.com
Resolving Dependencies
–> Running transaction check
—> Package php56w.x86_64 0:5.6.2-1.w6 will be installed
–> Processing Dependency: php56w-common(x86-64) = 5.6.2-1.w6 for package: php56w-5.6.2-1.w6.x86_64
–> Processing Dependency: php56w-cli(x86-64) = 5.6.2-1.w6 for package: php56w-5.6.2-1.w6.x86_64
–> Processing Dependency: php56w-cli = 5.6.2-1.w6 for package: php56w-5.6.2-1.w6.x86_64
—> Package php56w-opcache.x86_64 0:5.6.2-1.w6 will be installed
–> Running transaction check
—> Package php56w-cli.x86_64 0:5.6.2-1.w6 will be installed
—> Package php56w-common.x86_64 0:5.6.2-1.w6 will be installed
–> Processing Conflict: php56w-common-5.6.2-1.w6.x86_64 conflicts php-common Finished Dependency Resolution
Error: php56w-common conflicts with php54w-common-5.4.34-1.w6.x86_64
You could try using –skip-broken to work around the problem
You could try running: rpm -Va –nofiles –nodigest
[root@SECURE21 html]#
[root@SECURE21 html]#
[root@SECURE21 html]# yum install yum-plugin-replace
Loaded plugins: fastestmirror, replace
Setting up Install Process
Loading mirror speeds from cached hostfile
* base: anorien.csc.warwick.ac.uk
* extras: mirror.econdc.com
* updates: mirror.for.me.uk
* webtatic: uk.repo.webtatic.com
Package yum-plugin-replace-0.2.7-1.ius.el6.noarch already installed and latest version
Nothing to do
[root@SECURE21 html]# yum replace –enablerepo=webtatic-testing php-common –replace-with=php56w-common
Loaded plugins: fastestmirror, replace
Replacing packages takes time, please be patient…
Error: Package ‘php-common’ is not installed.
[root@SECURE21 html]#

我修复了它,因为yum安装php54w-mbstring。现在Facebook代码运行良好。经过几个小时的深入观察,这一切都太明显了!