Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: How to upgrade Plesk OS vendor PHP version from 5.4 to 5.6  (Read 4632 times)

0 Members and 1 Guest are viewing this topic.

santhilalk

  • Guest
How to upgrade Plesk OS vendor PHP version from 5.4 to 5.6
« on: December 04, 2017, 02:41:58 pm »
The upgrade of PHP version provided by OS vendor is a slightly risky Job. Please find herewith an example of an upgrade of OS PHP version from 5.4 to 5.6. 
When we execute the command "**yum remove php**" through command line, we will get following package removal information,

=============================================
Removing:
php x86_64 5.4.45-56.el6.art @atomic 35 M
Removing for dependencies:
php-ioncube-loader x86_64 1:4.7.1-4.el6.art @atomic 7.3 M
psa-horde noarch 5.2.13-cos6.build1705170314.14 @PLESK_17_5_3-dist 68 M
psa-imp noarch 6.2.17-cos6.build1705170314.14 @PLESK_17_5_3-dist 18 M
psa-ingo noarch 3.2.13-cos6.build1705170314.14 @PLESK_17_5_3-dist 4.5 M
psa-kronolith noarch 4.2.19-cos6.build1705170314.14 @PLESK_17_5_3-dist 8.9 M
psa-mnemo noarch 4.2.12-cos6.build1705170314.14 @PLESK_17_5_3-dist 3.3 M
psa-passwd noarch 5.0.6-cos6.build1705170314.14 @PLESK_17_5_3-dist 2.9 M
psa-php5-configurator x86_64 1.7.0-cos6.build1705170314.14 @PLESK_17_5_3-dist 55 k
psa-phpfpm-configurator x86_64 1.0.0-cos6.build1705170314.14 @PLESK_17_5_3-dist 138
psa-turba noarch 4.2.18-cos6.build1705170314.14 @PLESK_17_5_3-dist 6.2 M
=============================================

You need to note down which packages are being removed. Once the packages are removed, you need to install the PHP 5.6 version through the command:

    yum install php56u

After the installation of PHP56, make sure that the server PHP version has changed through command

    php -v

During this upgrade process, there will be some downtime with Apache and mail service, this is due to the lack of PHP56 dependencies with reference to Plesk. Apache service will end up with following error message:

    Wrapper /var/www/cgi-bin/cgi_wrapper/cgi_wrapper cannot be accessed: (2)No such file or directory

This message is received due to the absence of the package "psa-php5-configurator". This package will have to be installed with reference to your server OS version.

In this case, the server OS is Centos 6.9. Download the RPM package of "**psa-php5-configurator**" from the link

    http://autoinstall.plesk.com/PSA_12.5.30/dist-rpm-CentOS-6-x86_64/opt/php5/psa-php5-configurator-1.7.0-cos6.build1205150820.19.x86_64.rpm

You can also  download the "**psa-php5-configurator**" for different OS versions from the link

    http://autoinstall.plesk.com/PSA_12.5.30/

Before installing the psa-php5-configurator package you will need to install missing dependencies with reference to the PHP version PHP56

yum install php-pdo php-gd php-imap php-mbstring php-mysql php-xml php-ioncube-loader

Next, install the psa-php5-configurator from the RPM package using the command

rpm -Uhv psa-php5-configurator-1.7.0-cos6.build1705170314.14.x86_64.rpm

After the installation of "psa-php5-configurator" package start the Apache service by

service httpd start

You will face issue with Apache and Nginx proxy, for this install the PHP-FPM

 Plesk > Tools & Settings > Updates & Upgrades> Add/Remove componants> Web hosting> Nginx web server and reverse proxy server> PHP-FPM from OS vendor


This will solve the issue with the web services

In webmail service, we need to reinstall both Horde and Roundcube using the

Plesk > Tools & Settings > Updates & Upgrades > Add/Remove componants > Webmail services

After the installation chooses appropriate SSL certificate for the webmail service.