• php5.3升级到5.5


    在网站中发布中:

    / 开启调试模式 建议开发阶段开启 部署阶段注释或者设为false
    define('APP_DEBUG',true);

    true没问题,改为:false就报错 报错如下:

     PHP Fatal error:  Class 'Think\Log' not found in /var/www/html/yzxx-v.2.0/ThinkPHP/Library/Think/Think.class.php on line 335, referer: http://xxx.xxx.xxx.xxx/login.html

    php版本为5.3.3  后来有童鞋说改成 php5.5就好了。修改过程记录如下。

    1.检查当前安装的PHP包 删除
    yum list installed | grep php
    如果有安装的PHP包,先删除他们
    yum remove php.x86_64 php-cli.x86_64 php-common.x86_64 php-gd.x86_64 php-ldap.x86_64 php-mbstring.x86_64 php-mcrypt.x86_64 php-mysql.x86_64 php-pdo.x86_64

    我的操作如下:

    [root@bogon webuser]# yum list installed | grep php*
    php.x86_64              5.3.3-46.el6_6  @updates                                
    php-cli.x86_64          5.3.3-46.el6_6  @updates                                
    php-common.x86_64       5.3.3-46.el6_6  @updates                                
    php-devel.x86_64        5.3.3-46.el6_6  @updates                                
    php-gd.x86_64           5.3.3-46.el6_6  @updates                                
    php-mbstring.x86_64     5.3.3-46.el6_6  @updates                                
    php-mysql.x86_64        5.3.3-46.el6_6  @updates                                
    php-pdo.x86_64          5.3.3-46.el6_6  @updates                                
    php-pgsql.x86_64        5.3.3-46.el6_6  @updates                                
    [root@bogon webuser]# yum remove php*
    或者:
    [root@bogon html]# yum remove php.x86_64 php-cli.x86_64 php-common.x86_64 php-devel.x86_64 php-gd.x86_64  php-mbstring.x86_64  php-mysql.x86_64 php-pdo.x86_64 php-pgsql.x86_64

    2.更新源

    Centos 5.X
      rpm -Uvh http://mirror.webtatic.com/yum/el5/latest.rpm
    CentOs 6.x
      rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm
    CentOs 7.X
    rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm
    rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
    3.运行yum install 安装php5.5
     yum install php55w.x86_64 php55w-cli.x86_64 php55w-common.x86_64 php55w-gd.x86_64 php55w-ldap.x86_64 php55w-mbstring.x86_64 php55w-mcrypt.x86_64 php55w-mysql.x86_64 php55w-pdo.x86_64
    注:如果想升级到5.6把上面的55w换成56w就可以了
    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

    4、系统用到  redis 和 postgresql  :

    yum install php-redis   php55w-pgsql.x86_64

     注意:若php版本为5.6   则安装:php56w-pgsql.x86_64

  • 相关阅读:
    You are not late! You are not early!
    在同一个服务器(同一个IP)为不同域名绑定的免费SSL证书
    Vue.js Is Good, but Is It Better Than Angular or React?
    It was not possible to find any compatible framework version
    VS增加插件 Supercharger破解教程
    Git使用ssh key
    Disconnected: No supported authentication methods available (server sent: publickey)
    VS 2013打开.edmx文件时报类型转换异常
    asp.net MVC4 框架揭秘 读书笔记系列3
    asp.net MVC4 框架揭秘 读书笔记系列2
  • 原文地址:https://www.cnblogs.com/wuling129/p/4992037.html
Copyright © 2020-2023  润新知