0

Default Vesta CP 0.9.8 comes with PHP5.4 which causes me problems on my Laravel 4.2 website. How can i upgrade php version of self hosted Vesta CP from 5.4 to latest 5.6 ?

Mr. Crowley
  • 3,225
  • 4
  • 25
  • 28

2 Answers2

5

Default PHP version of vesta CP 0.9.8 is PHP5.4

First stop your web server

If NGINX

service nginx stop

If Apache

service httpd stop

Then remove php

yum remove php -y

Add related repositories

wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm

enabling remi for 'remi' and 'remi-php56'

nano /etc/yum.repos.d/remi.repo and change the enabled value from 0 to 1

Install php56

yum install php php-bcmath php-cli php-common php-gd php-imap php-mbstring php-mcrypt php-mysql php-pdo php-soap php-tidy php-xml php-xmlrpc php-pecl-apc phpMyAdmin roundcubemail php-opcache php-xdebug -y

reset the links

mv -f /etc/roundcubemail/db.inc.php.rpmsave /etc/roundcubemail/db.inc.php mv -f /etc/roundcubemail/main.inc.php.rpmsave /etc/roundcubemail/main.inc.php mv -f /etc/phpMyAdmin/config.inc.php.rpmsave /etc/phpMyAdmin/config.inc.php Start your web server.

This worked on my server.

Originally taken from here.

Mr. Crowley
  • 3,225
  • 4
  • 25
  • 28
  • Actually you don't need to remove php. So you can skip the `yum remove php -y` step and after enabling remi repo run `yum update php` to upgrade the installed php 5.4 with php 5.6. – alamaby Apr 09 '17 at 12:17
1

I use this command and it's working fine on centos 6

rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm
yum install yum-plugin-replace
yum replace php-common --replace-with=php56w-common
Opal
  • 81,889
  • 28
  • 189
  • 210
maszd
  • 15
  • 5