將centos6的php5.3升級爲5.6

在阿里雲主機上,操做系統是Centos6,php版本是5.3。由於安裝Yii2.0的須要,我要升級php爲5.4。由於還有5.5和5.6,固然要升到高版本了。我決定升到5.6。php

 
首先,按照這裏的步驟
 
只有php-fpm沒有正確安裝,因此沒法啓動之。下面試圖單獨安裝。
 
[root@AY14022011465274454aZ ~]# yum install php-fpm
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.tuna.tsinghua.edu.cn
* updates: mirrors.aliyun.com
* webtatic: uk.repo.webtatic.com
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php-fpm.x86_64 0:5.3.3-48.el6_8 will be installed
--> Processing Dependency: php-common(x86-64) = 5.3.3-48.el6_8 for package: php-fpm-5.3.3-48.el6_8.x86_64
--> Running transaction check
---> Package php-common.x86_64 0:5.3.3-48.el6_8 will be installed
--> Processing Conflict: php56w-common-5.6.26-1.w6.x86_64 conflicts php-common < 5.6
--> Finished Dependency Resolution
Error: php56w-common conflicts with php-common
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
# yum install php56w-fpm
# service php-fpm start
Starting php-fpm: Failed loading /usr/lib64/php/modules/ZendGuardLoader.so: /usr/lib64/php/modules/ZendGuardLoader.so: undefined symbol: zend_get_hash_value
[ OK ]
(這個錯誤信息是怎麼回事?此後一直伴隨,好在沒有其它影響,先無論它) 
============
後續:
一、執行數據庫操做時,找不到PDO模塊
試着用下面指令
# yum install -y libxml2-devel openssl-devel libcurl-devel libjpeg-devel libpng-devel libicu-devel openldap-devel freetype freetype-devel # --沒用
 
# yum install php56w.x86_64 php56w-cli.x86_64 php56w-common.x86_64 php56w-gd.x86_64 php56w-ldap.x86_64 php56w-mbstring.x86_64 php56w-mcrypt.x86_64 php56w-mysql.x86_64 php56w-pdo.x86_64 #--出錯
 
# yum install php56w-pdo #--成功
重啓php-fpm服務,此次yii出現新的錯誤
CDbConnection failed to open the DB connection: could not find driver
 
# yum install php56w-mysql
重啓服務,此次yii不出錯了,但渲染一小塊內容,確切地說,只渲染action本身的view的那一塊東西,layout/main.php的沒過來。
 
# yum install php56w-mbstring
此次渲染正確了。
 
發如今飯店查詢時出現錯誤:
include(DOMDocument.php): failed to open stream: No such file or directory
 
# yum install php56w-dom
成功了。(估計是在解析xml的時候出錯了。)
 
====================================
以上是爲記錄。留做備忘。
相關文章
相關標籤/搜索