将centos6的php5.3升级为5.6

在阿里云主机上,操作系统是Centos6,php版本是5.3。因为安装Yii2.0的需要,我要升级php为5.4。因为还有5.5和5.6,当然要升到高版本了。我决定升到5.6。

首先,按照这里的步骤

http://zhidao.baidu.com/link?url=8w_-5AhIIWNfbenvClexBpIWD0rA1YHxWsBp89KHiyQjq9A9V5hsbcHjs1awmyOq2dgMVSx-Hpl3IO42Wpqv-JTOF_YH4jscUXDMYIDdsiO

只有php-fpm没有正确安装,所以无法启动之。下面试图单独安装。

[[email protected] ~]# 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 ]

(这个错误信息是怎么回事?此后一直伴随,好在没有其它影响,先不管它)

============

后续:

1、执行数据库操作时,找不到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的时候出错了。)

====================================

以上是为记录。留作备忘。

时间: 2024-08-26 17:08:29

将centos6的php5.3升级为5.6的相关文章

CentOS6.5的openssl升级

CentOS6.5的openssl升级:(修复心脏漏血漏洞) [[email protected] ~]# rpm -qi openssl|grep VersionVersion : 1.0.1e Vendor: CentOS openssl升级:OpenSSL 需要更新至1.0.2g或1.0.1syum update "openssl*" #没有更新版本 使用源码安装openssl:wget https://www.openssl.org/source/openssl-1.0.1g.

脚本自动化装centos6.5 python2.6升级2.7

centos6.5 python2.6升级2.7 前提: 现有的yum源, 并且能通网 脚本会自动安装python2.7.8  . pip . easy .setuptools 正文: 代码内容 #!/bin/bash # a script to install python 2.7 on CentOS 6.x system. # CentOS 6.x has python 2.6 by default, while some software (e.g. django1.7) # need p

centos6.5源码升级内核

centos6.5源码升级内核 http://www.centoscn.com/CentOS/config/2014/1124/4170.html 2014-04-18 07:11 作者: sularry 来源: 本站 浏览: 0 views 我要评论 字号: 大 中 小 摘要: 1.下载源码包 网址:http://www.kernel.org 在首页可以看到有 stable,longterm 等版本,一般选择下载 longterm 版本,因为此版本为提供长期支持的稳定版,因此我选择 3.12.

从php5.2升级到php7.1是函数的参数问题

最近在做一个系统的ID管理系统php升级,从php5.2升级到php7.1,经常会遇到一些问题.今天遇到一个小问题,拿出来分享一下.废话少说,上示例代码. SC.php <?phpclass SC { static function out($str) { echo 'input str:' . $str; } } // 有参数调用 SC::out('one param'); // 无参数调用 SC::out(); php5.2中的实行结果: input str:one param Warnin

Centos6.9中将openssh升级到到7.5

Centos6.9中将openssh升级到到7.5 一. 安装编译工具包和telnet服务: 安装telnet服务的目的是防止后期ssh服务连不上,跑机房. # yum install -y gcc gcc-c++ perl zlib-devel pam pam-devel tcp_wrappers-devel # yum -y install telnet-server* telnet 编辑/etc/xinetd.d/telnet文件,将disalble字段的yes改为no允许root用户通过

centos6.8上PHP5.3升级到PHP5.4及更高版本方法

执行命令下载.安装yum源,当前是针对Centos6并且64位版本的源: [[email protected]_249 yum.repos.d]# rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm [[email protected]_249 yum.repos.d]# rpm -ivh http://rpms.famillecollet.com/enterprise/remi-r

entos上PHP5.3升级到PHP5.4及更高版本方法

yum配置 执行命令下载.安装yum源,当前是针对Centos6并且64位版本的源: [[email protected]_249 yum.repos.d]# rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm[[email protected]_249 yum.repos.d]# rpm -ivh ht yum配置执行命令下载.安装yum源,当前是针对Centos6并且64位版本的

Centos6/Centos5下openssh升级到openssh-7.5p1

近日,国家信息安全漏洞共享平台(CNVD)收录了OpenSSH的多个漏洞(CNVD-2016-12688.CNVD-2016-12687.CNVD-2016-12686.CNVD-2016-12684,对应CVE-2016-10009.CVE-2016-10010.CVE-2016-10011.CVE-2016-10012).综合利用上述漏洞,攻击者可执行任意代码,提升权限至root权限,获取本地敏感信息泄露,绕过某些安全限制执行未经授权的操作. 目前厂商已经发布了升级补丁以修复这个安全问题,请

centos6.3环境下升级python及MySQLdb的安装

近来突然想鼓捣下linux下的python,看下Python数据库方面的东西,想着在centos下测试下.然而安装的过程有很多坑.下面对整个流程进行下记录 1.python基本库的安装 在安装python的过程中,发现其中很多的依赖库是没有包含在内的.根据我的需要,我安装了sqlite和zlib这两个依赖库.具体过程说明如下: (1)sqlite 1>下载文件sqlite-autoconf-3160100.tar.gz: http://pan.baidu.com/s/1slOw8BN 2>解压