HOWTO: Downgrade ART 5.3 or 5.4 to Centos 6.x stock php5.3

Support/Development for PHP
faris
Long Time Forum Regular
Long Time Forum Regular
Posts: 2321
Joined: Thu Dec 09, 2004 11:19 am

HOWTO: Downgrade ART 5.3 or 5.4 to Centos 6.x stock php5.3

Unread post by faris »

Here are some step by step instructions on how to downgrade from the Atomic (ART) php 5.3 or 5.4 to the stock Centos 6.x php 5.3. It is painless and there are no kludges.

SERIOUS WARNING: Use the following instructions at your own risk. You have been warned.
All I can say is that on a Cento 6.4 (64bit) install with Plesk 11.5.30 installed and Atomic MySQL 5.5, downgrading from either Atomic php5.3 and php5.4 to stock Centos 6 php5.3 appeared to work and all appears to be well afterwards.

1) add: exclude=php* to the first section in the /etc/yum.repos.d/atomic.repo
2) yum remove php-mcrypt (if you have it installed)
3) yum remove php-eaccelerator (if you have it installed)
4) yum downgrade php php-*
5) You are finished. Tada!

** If you see any errors at step 4 related to unresolvable package dependencies (for example php-zend-guard-loader), check that they exist in the Centos base repo. If they do not then just "yum remove" them and try again. Note that by removing these packages you are removing the appropriate feature/functionality from php and may need to restore it (e.g. via the EPEL repo for mcrypt) in some way. Thanks to lvalics for the heads-up about php-zend-guard-loader.

Some notes for those who are interested:
1) If you run "yum downgrade php" instead of "yum downgrade php php-*" you'll get some annoying dependency errors that yum can't resolve.
2) You HAVE to remove php-mcrypt because there's no such package in the stock Centos base repo. If you need this you can, apparently, use the EPEL repo to get it installed. I've not tested.
3) You HAVE to remove php-eaccelerator because this is Scott's special package that he created for those of us who wanted it, and no such package exists in the Centos base repo.

ALSO, please be aware that my testing was for an installation that only had the following php rpms installed (after mcrypt and eaccelerator removed):

php, php-cli, php-common, php-devel, php-gd, php-imap, php-ldap, php-mbstring, php-mysql, php-pdo, php-soap, php-xml, php-xmlrpc.


That's all folks! Elvis has left the building.

REMINDER OF MY SERIOUS WARNING: Use the instructions above at your own risk. You have been warned.

POLITE REQUEST: If you follow these instructions and it works fine for you, please do let us know by posting here so that others can be more confident that it will work for them as well.

ADDITIONAL NOTE: If you have upgraded to php 5.4 and are having compatibility problems or other issues with it and want to downgrade to php5.3, I strongly recommend you downgrade to the php5.3 in the Nucleus repo instead of stock Centos. Yes, you have to pay for access, but Scott's php5.3 is better than the stock Centos php 5.3, and you don't have to remove mcrypt/eaccelerator etc etc either. Scott has added his recommended procedure for this here, which is sort of the same but different to mine: http://www.atomicorp.com/forum/viewtopic.php?f=2&t=7046
Last edited by faris on Tue Aug 13, 2013 6:24 am, edited 3 times in total.
--------------------------------
<advert>
If you want to rent a UK-based VPS that comes with friendly advice and support from a fellow ART fan, please get in touch.
</advert>
lvalics
Forum User
Forum User
Posts: 38
Joined: Thu Feb 22, 2007 3:49 pm
Location: Romania
Contact:

Re: HOWTO: Downgrade ART 5.3 or 5.4 to Centos 6.x stock php5

Unread post by lvalics »

I add to this as a small addon, yum remove php-zend-guard-loader(if you have it)
Best regards,
Valics Lehel

Power Toys for PLESK
HOW TO: Setup a new box with PLESK
PLESK Crash Recovery Service
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Re: HOWTO: Downgrade ART 5.3 or 5.4 to Centos 6.x stock php5

Unread post by scott »

Modded this thread up to sticky, great work!
dsoundmn
Forum User
Forum User
Posts: 8
Joined: Tue Oct 18, 2011 10:18 am
Location: New York

Re: HOWTO: Downgrade ART 5.3 or 5.4 to Centos 6.x stock php5

Unread post by dsoundmn »

thanks for these tips - made reverting quick and simple. I ended up using an alternate repo - and I strongly suggest using the Nucleus Repo - https://www.atomicorp.com/products/nucleus.html
vectorsites
New Forum User
New Forum User
Posts: 3
Joined: Wed Aug 28, 2013 8:26 am
Location: Melbourne, FL USA

Re: HOWTO: Downgrade ART 5.3 or 5.4 to Centos 6.x stock php5

Unread post by vectorsites »

I tried to downgrade to 5.3.* from 5.4.18 and all it did was take me back to 5.4.17, When I tried it a second time it wants to install php5.1.* Any suggestions?
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Re: HOWTO: Downgrade ART 5.3 or 5.4 to Centos 6.x stock php5

Unread post by scott »

Did you exclude the packages from the atomic channel?
prupert
Forum Regular
Forum Regular
Posts: 573
Joined: Tue Aug 01, 2006 2:45 pm
Location: Netherlands

Re: HOWTO: Downgrade ART 5.3 or 5.4 to Centos 6.x stock php5

Unread post by prupert »

vectorsites wrote:I tried to downgrade to 5.3.* from 5.4.18 and all it did was take me back to 5.4.17, When I tried it a second time it wants to install php5.1.* Any suggestions?
This thread applies to machines with CentOS 6, if the yumdowngrade suggests PHP 5.1 you probably have CentOS 5. On CentOS 5 the PHP 5.3 packages are called php53* and you cannot use yumdowngrade because of that.
Lemonbit Internet Dedicated Server Management
Post Reply