• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Cannot downgrade PHP 5.3 > 5.2

FirstPoint

Basic Pleskian
Hi all,

We've accidentaly migrated from PHP 5.2 to PHP 5.2 with the autoinstaller.

We cannot stay on PHP 5.3 for the moment as too much functions that our customers use are deprecated.

We've tried downgrading via the autoinstaller but we get the following error:
ERROR: Can't find solution for 'obsolete_mode_solution for php53-cli' of dummy_masterpackage_for_dependency-1.2.3.
Not all packages were installed.
Please resolve this issue and try installing the packages again.
If you cannot resolve the issue on your own, contact product technical support for assistance.

We've searched the forums and found some threads where it was advised to install manually via Atomic, but this is not a standard for parallels and our Plesk provider strictly does not allow that, or we would take the risk of not having their support anymore... What to do ?

Thanks for your help !
 
We've already tried doing that a few days ago and Plesk was a direct dependency of PHP53 so it completely uninstalled Plesk... and we had to fix everything manually to get Plesk back on the road...
 
Wil this help?:

#yum install yum-allowdowngrade

Now add a line to your yum.conf file, its located in /etc/yum.conf
#vi /etc/yum.conf
showdupesfromrepos=1


After that list all php packages:

yum list php

If php 5.2.8 is available, remove new one:

yum remove php

and install an old one:

yum --allow-downgrade install php-5.2.8
 
Hi.

I had tried that yesterday also. But when I typed yum remove php it would also remove dependencies, and Plesk because it is directly dependent to PHP. So I didn't go ahead.

But I tried again this morning and now, very wired, when typing yum remove php I get: No Match for argument: php. Incredible, since we do have PHP running on the websites ! I tried yum clean all but doesn't fix anything.

By the way, when I do yum list php I don't have php-5.2.8 but only the following:
php.i386 5.3.6-4.el5.art atomic
php.i386 5.2.17-1.el5.art atomic
php.i386 5.3.6-5.el5.art atomic
php.i386 5.3.8-1.el5.art atomic
php.i386 5.1.6-27.el5_5.3 base
php.i386 5.3.6-2.el5.art atomic
php.i386 5.3.6-3.el5.art atomic
 
Try that:

rpm -qa | grep php53-*

The output in my test server is that (ufficial packaged of centos):

php53-mysql-5.3.3-1.el5_6.1
php53-xml-5.3.3-1.el5_6.1
php53-common-5.3.3-1.el5_6.1
php53-pdo-5.3.3-1.el5_6.1
php53-mbstring-5.3.3-1.el5_6.1
php53-5.3.3-1.el5_6.1
php53-imap-5.3.3-1.el5_6.1
psa-php53-configurator-1.6.1-cos5.build1012110525.15
php53-devel-5.3.3-1.el5_6.1
php53-cli-5.3.3-1.el5_6.1
php53-gd-5.3.3-1.el5_6.1
php53-sqlite2-5.3.2-11041315

After that do

rpm -e all_package_name_that_you_find_with_rpm_qa --nodeps

Now you have remove all php53 packaged and I think you can switch again to php52 (i'm not responsable of that, use it at your own risk)
 
Howto upgrade to php53u with plesk

I was pointed to this thread by parallels as a solution for "plesk not recognizing my upgrade to php53 from the IUS Repository (php53u)" ... this was NOT helpful at all so I'm posting my workaround and temporary fix until parallels can come up with something better. Their solution was to DOWNGRADE php on my production server which left a large number of my customers with broken sites!

However - here is the workaround for installing/upgrading php to the IUS Repository version php53u:

*Prerequisite: make sure you have enable php53 support and upgraded php to 5.3 in plesk
1) remove php53 packages without removing dependencies (plesk)
a) rpm -qa |grep php
b) copy /etc/php.ini to safe location
c) rpm -e --nodeps (list of php packages from the above command - with the exception of "psa-php53-configurator")
2) install IUS Repository for YUM
a) wget http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/x86_64/ius-release-1.0-8.ius.el5.noarch.rpm
b) wget http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/x86_64/epel-release-5-4.noarch.rpm
c) rpm -Uvh ius-release*.rpm epel-release*.rpm
3) install php53u from the IUS Repository
a) yum install list of packages from [1.a] changing the php53 to php53u
b) copy saved php.ini file to /etc/php.ini
c) /etc/init.d/httpd restart
*At this point php should be successfully upgraded. However, plesk will not see it as an installed component.
*The fix for this at the moment is:

1) install the following script:
<BEGIN BASH SCRIPT>
#!/bin/bash
MYSQLPASS=$(cat /etc/psa/.psa.shadow)

mysql -Ns -uadmin -p$MYSQLPASS -Dpsa -e 'update Components set version="5.3.8-2.ius.el5" where name="php" limit 1;'
<END BASH SCRIPT>

*MAKE SURE TO CHANGE "VERSION" TO WHATEVER THE CURRENT VERSION YOU INSTALLED IS!
*Create a crontab to run this script every 5/10/15/30 minutes (whatever you think is reasonable)

This is a temporary fix that will register the new php version as a component in the plesk. The reason for the cronjob is because whenever plesk restarts or you refresh the component list or upgrade/install anything via the plesk installer, the DB field for php version will be overwritten and plesk will no longer see php as an installed component.

Hope this helps out someone. Let me know if you need any more info or if this is not clear.
 
Last edited:
another fix

<BEGIN BASH SCRIPT>
#!/bin/bash
MYSQLPASS=$(cat /etc/psa/.psa.shadow)

mysql -Ns -uadmin -p$MYSQLPASS -Dpsa -e 'update Components set version="5.3.8-2.ius.el5" where name="php" limit 1;'
<END BASH SCRIPT>

*MAKE SURE TO CHANGE "VERSION" TO WHATEVER THE CURRENT VERSION YOU INSTALLED IS!
*Create a crontab to run this script every 5/10/15/30 minutes (whatever you think is reasonable)

This is a temporary fix that will register the new php version as a component in the plesk. The reason for the cronjob is because whenever plesk restarts or you refresh the component list or upgrade/install anything via the plesk installer, the DB field for php version will be overwritten and plesk will no longer see php as an installed component.

Hope this helps out someone. Let me know if you need any more info or if this is not clear.

Thanks a lot. I've made a little modification to your script in order to not having to bother with PHP-Updates.

Code:
#!/bin/bash
MYSQLPASS=$(cat /etc/psa/.psa.shadow)
PHP=$(rpm -q php53u | sed 's/php53u-//g;s/.x86_64//g')
mysql -Ns -uadmin -p$MYSQLPASS -Dpsa -e'update Components set version="'$PHP'" where name="php" limit 1;'

exchange .x86_64 for .i686 if you are on a 32-bit system.
 
Back
Top