( ! ) Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/lib/menu/GKBase.class.php on line 114
Call Stack
#TimeMemoryFunctionLocation
10.0010415672{main}( ).../index.php:0
20.08734720800Joomla\CMS\Application\SiteApplication->execute( ).../index.php:49
30.403117233840Joomla\CMS\Application\SiteApplication->render( ).../CMSApplication.php:202
40.403317233896Joomla\CMS\Application\SiteApplication->render( ).../SiteApplication.php:778
50.403317234272Joomla\CMS\Document\HtmlDocument->parse( ).../CMSApplication.php:1030
60.403317234272Joomla\CMS\Document\HtmlDocument->_fetchTemplate( ).../HtmlDocument.php:545
70.403417234368Joomla\CMS\Document\HtmlDocument->_loadTemplate( ).../HtmlDocument.php:730
80.404217274288require( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/component.php' ).../HtmlDocument.php:668
90.408217571560GKTemplate->__construct( ).../component.php:31
100.415917755944GKTemplateMenu->getMenuType( ).../gk.framework.php:84
110.416717800800require_once( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/lib/menu/GKMenu.php' ).../helper.menu.php:19

( ! ) Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/lib/menu/GKHandheld.php on line 76
Call Stack
#TimeMemoryFunctionLocation
10.0010415672{main}( ).../index.php:0
20.08734720800Joomla\CMS\Application\SiteApplication->execute( ).../index.php:49
30.403117233840Joomla\CMS\Application\SiteApplication->render( ).../CMSApplication.php:202
40.403317233896Joomla\CMS\Application\SiteApplication->render( ).../SiteApplication.php:778
50.403317234272Joomla\CMS\Document\HtmlDocument->parse( ).../CMSApplication.php:1030
60.403317234272Joomla\CMS\Document\HtmlDocument->_fetchTemplate( ).../HtmlDocument.php:545
70.403417234368Joomla\CMS\Document\HtmlDocument->_loadTemplate( ).../HtmlDocument.php:730
80.404217274288require( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/component.php' ).../HtmlDocument.php:668
90.408217571560GKTemplate->__construct( ).../component.php:31
100.419017929128GKTemplateMenu->getMenuType( ).../gk.framework.php:85
centos 5.8 安装 php 5.2 mysql 5.1
Logo
Print this page

centos 5.8 安装 php 5.2 mysql 5.1

方法3  IUS

http://iuscommunity.org/Docs/ClientUsageGuide

http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/x86_64/
http://wiki.iuscommunity.org/Repos

打开
http://dl.iuscommunity.org/pub/ius/stable/
查找

文件 /Redhat/5/x86_64/
查找最新
epel-release-5-xxx.noarch.rpm
ius-release-xxxxxxx.ius.el5.noarch.rpm

安装
wget http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/x86_64/ius-release-xxxxx.ius.el5.noarch.rpm

wget http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/x86_64/epel-release-xxxxxx.ius.el5.noarch.rpm

rpm -Uvh ius-release*.rpm epel-release*.rpm


列表可以安装的包
yum list | grep -w \.ius\.


安装 replace 插件
$ sudo yum install yum-plugin-replace

查看 php
[root@linuxbox ~]# rpm -qa | grep php


替换新版 php

yum replace php --replace-with php52

安装几个插件
yum install -y php52-xml php52-dom php52-mcrypt php52-gd php52-mbstring php52-mhash

替换后查看
[root@linuxbox ~]# php -v

重启 apache
[root@el5-i386 ~]# httpd -t
Syntax OK

[root@el5-i386 ~]# /etc/init.d/httpd restart
Stopping httpd: [ OK ]
Starting httpd: [ OK ]

替换 mysql
yum replace mysql --replace-with mysql51

 

 

命令列表如下

 

wget http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/x86_64/epel-release-5-4.noarch.rpm
wget http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/x86_64/ius-release-1.0-10.ius.el5.noarch.rpm
rpm -Uvh ius-release*.rpm epel-release*.rpm
yum install yum-plugin-replace
yum replace php --replace-with php52
yum install -y php52-xml php52-dom php52-mcrypt php52-gd php52-mbstring php52-mhash
yum remove mysql.i386
yum replace mysql --replace-with mysql51
/etc/init.d/httpd restart
httpd -v
php -v
mysql -v

mysql 升级了 需要修复权限 否则 virtualmin 会出错

mysql_fix_privilege_tables --user=root --password= --verbose

 

1and1 需要修复 quotas

repquota -uga

关闭 quotas

System Settings
 

Virtualmin Configuration

 

Set quotas for domain and mail users?   

 

 


如果需要重设mysql root 密码
方法如下
service mysqld stop
建立文件
/home/mysql-init
内容如下
UPDATE mysql.user SET Password=PASSWORD('') WHERE User='root';
FLUSH PRIVILEGES;
运行
mysqld_safe --init-file=/home/mysql-init &
运行结果 密码为空

如需改变密码 方法如下
mysql -u root -pxxxx
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('MyPW');
exit

 

还需要设置开机启动 mysql

chkconfig mysqld on

#vi /etc/rc.d/rc.local

#/etc/rc.d/init.d/mysqld start

 

 

2. php.ini  修改 /etc/php.ini

 

upload_max_filesize = 100M

 

post_max_size = 10M

 

max_execution_time = 60 ; Maximum execution time of each script, in seconds
max_input_time = -1 ; Maximum amount of time each script may spend parsing request data
memory_limit = 256M ; Maximum amount of memory a script may consume (16MB)

 

--------------------------------------------------------------------------------------------------------------------------------------------

方法1

www.CTOHome.com/linux-vps-pack/php5.2.sh

 

 

yum 设置 源 关闭

xxxx.repo 设置 enabled=0

 

然后使用 yum --enablerepo=xxxx install 来安装

#!/bin/bash
rpm --import http://repo.webtatic.com/yum/RPM-GPG-KEY-webtatic-andy
wget -P /etc/yum.repos.d/ http://repo.webtatic.com/yum/webtatic.repo
echo 'exclude=php*5.3*' >> /etc/yum.conf
yum --enablerepo=webtatic --exclude=php*5.3* update -y php
yum --enablerepo=webtatic --exclude=php*5.3* install -y php-xml php-dom php-mcrypt php-gd php-mbstring php-mhash
yum --enablerepo=webtatic --exclude=php*5.3* upgrade -y php-xml php-dom php-mcrypt php-gd php-mbstring php-mhash

service httpd restart
echo '';
echo '';
echo " ==========   www.CTOHome.com   ============"
echo " ==========      PHP Version    ============"
php -v
echo '';
echo '';

 

 

 

 

方法2

rpm --import http://www.jasonlitka.com/media/RPM-GPG-KEY-jlitka

 

[utterramblings]
name=Jason's Utter Ramblings Repo
baseurl=http://www.jasonlitka.com/media/EL$releasever/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://www.jasonlitka.com/media/RPM-GPG-KEY-jlitka

 

 

vi /etc/yum.conf

最后一行增加

exclude=php*5.3*

 

 

Last modified onTuesday, 12 April 2016 22:48

( ! ) Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php on line 169
Call Stack
#TimeMemoryFunctionLocation
10.0010415672{main}( ).../index.php:0
20.08734720800Joomla\CMS\Application\SiteApplication->execute( ).../index.php:49
30.08734720800Joomla\CMS\Application\SiteApplication->doExecute( ).../CMSApplication.php:196
40.292112449000Joomla\CMS\Application\SiteApplication->dispatch( ).../SiteApplication.php:233
50.292812473360Joomla\CMS\Component\ComponentHelper::renderComponent( ).../SiteApplication.php:194
60.293512528688Joomla\CMS\Component\ComponentHelper::executeComponent( ).../ComponentHelper.php:377
70.293812557512require_once( '/var/www/vhosts/shan.info/httpdocs/components/com_k2/k2.php' ).../ComponentHelper.php:402
80.301712992920K2ControllerItem->execute( ).../k2.php:64
90.301712992920K2ControllerItem->display( ).../BaseController.php:710
100.310913718120K2ControllerItem->display( ).../item.php:78
110.311013718120K2ControllerItem->display( ).../controller.php:19
120.315214114488Joomla\CMS\Cache\Controller\ViewController->get( ).../BaseController.php:663
130.317014134856K2ViewItem->display( ).../ViewController.php:102
140.396417149832K2ViewItem->display( ).../view.html.php:742
150.396417149832K2ViewItem->loadTemplate( ).../HtmlView.php:230
160.398717330032include( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php' ).../HtmlView.php:701

( ! ) Notice: Only variables should be assigned by reference in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php on line 478
Call Stack
#TimeMemoryFunctionLocation
10.0010415672{main}( ).../index.php:0
20.08734720800Joomla\CMS\Application\SiteApplication->execute( ).../index.php:49
30.08734720800Joomla\CMS\Application\SiteApplication->doExecute( ).../CMSApplication.php:196
40.292112449000Joomla\CMS\Application\SiteApplication->dispatch( ).../SiteApplication.php:233
50.292812473360Joomla\CMS\Component\ComponentHelper::renderComponent( ).../SiteApplication.php:194
60.293512528688Joomla\CMS\Component\ComponentHelper::executeComponent( ).../ComponentHelper.php:377
70.293812557512require_once( '/var/www/vhosts/shan.info/httpdocs/components/com_k2/k2.php' ).../ComponentHelper.php:402
80.301712992920K2ControllerItem->execute( ).../k2.php:64
90.301712992920K2ControllerItem->display( ).../BaseController.php:710
100.310913718120K2ControllerItem->display( ).../item.php:78
110.311013718120K2ControllerItem->display( ).../controller.php:19
120.315214114488Joomla\CMS\Cache\Controller\ViewController->get( ).../BaseController.php:663
130.317014134856K2ViewItem->display( ).../ViewController.php:102
140.396417149832K2ViewItem->display( ).../view.html.php:742
150.396417149832K2ViewItem->loadTemplate( ).../HtmlView.php:230
160.398717330032include( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php' ).../HtmlView.php:701
Template Design © Joomla Templates | GavickPro. All rights reserved.