store | blogs | forums | twitter | facebook | wiki | mailing lists | downloads | support portal
Atomic Secure Linux
It is currently Mon May 20, 2013 11:48 am

» Feed - Atomicorp

All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic Share/Bookmark  [ 6 posts ] 
Author Message
 Post subject: Downgrade from PHP 5.3 to 5.2 without breaking Plesk
Unread postPosted: Mon Jun 13, 2011 5:00 am 
Offline
Forum Regular
Forum Regular

Joined: Tue Nov 23, 2010 7:30 am
Posts: 247
Location: Glasgow, UK
Hi,

I (blindly) updated PHP to 5.3 without checking changelogs and newly deprecated features - causing a few sites on my Plesk managed CentOS box to behave slightly strange.

I'm looking for some advice on the best and cleanest way to downgrade to 5.2.


I have tried:
Code:
yum downgrade php

With the allowdowngrade plugin for Yum, but it gives errors:
Code:
Transaction Check Error:
  file /usr/bin/phar.phar from install of php-cli-5.3.6-2.el5.art.i386 conflicts with file from package php-cli-5.3.6-3.el5.art.x86_64
  file /usr/bin/phpize from install of php-cli-5.3.6-2.el5.art.i386 conflicts with file from package php-cli-5.3.6-3.el5.art.x86_64


I'd rather not "tinker" with this - as it is a live system and hope that someone can offer advice on the correct way to do it?



Thanks


Top
 Profile  
 
 Post subject: Re: Downgrade from PHP 5.3 to 5.2 without breaking Plesk
Unread postPosted: Mon Jun 13, 2011 5:25 am 
Offline
Forum Regular
Forum Regular

Joined: Tue Nov 23, 2010 7:30 am
Posts: 247
Location: Glasgow, UK
Apologies, I eventually found a similar thread on the forum.

http://www.atomicorp.com/forums/viewtopic.php?f=2&t=4902

After reading between the lines, I eventually downgraded by performing the following steps:

  1. Go to the ART repository for your system (mine was: http://www6.atomicorp.com/channels/atomic/centos/5/x86_64/RPMS/)
  2. Download the version of PHP you want to install into a new directory on the server using wget
  3. Run the command
    Code:
    rpm --oldpackage -Uvh php*
    (which gave me some dependency errors)
  4. Download all the packages that the errors list from the ART repository, in my case:
    • php-5.2.17-1.el5.art.x86_64.rpm
    • php-cli-5.2.17-1.el5.art.x86_64.rpm
    • php-common-5.2.17-1.el5.art.x86_64.rpm
    • php-devel-5.2.17-1.el5.art.x86_64.rpm
    • php-gd-5.2.17-1.el5.art.x86_64.rpm
    • php-imap-5.2.17-1.el5.art.x86_64.rpm
    • php-mbstring-5.2.17-1.el5.art.x86_64.rpm
    • php-mysql-5.2.17-1.el5.art.x86_64.rpm
    • php-pdo-5.2.17-1.el5.art.x86_64.rpm
    • php-xml-5.2.17-1.el5.art.x86_64.rpm
  5. Keep running the command
    Code:
    rpm --oldpackage -Uvh php*
    , until it accepts it and reverts back with success
  6. Restart Apache with
    Code:
    /sbin/service httpd restart
  7. Check your PHP version with
    Code:
    php -v

    • Mine is now:
      Code:
      PHP 5.2.17 (cli) (built: Jan  7 2011 10:39:29)
      Copyright (c) 1997-2010 The PHP Group
  8. Set yum to ignore PHP updates by editing /etc/yum.conf and including the line:
    Code:
    exclude=php*


Hope that helps someone!


Top
 Profile  
 
 Post subject: Re: Downgrade from PHP 5.3 to 5.2 without breaking Plesk
Unread postPosted: Fri Jul 01, 2011 5:03 pm 
Offline
New Forum User
New Forum User

Joined: Fri Jul 01, 2011 4:48 pm
Posts: 1
Location: USA
I cannot thank you enough for these clear instructions. I have been working on this for almost 24 hours straight and your post finally got me up and running again.

I did things slightly differently to get it to actually work, but your steps helped me to get there.

Code:
wget http://www6.atomicorp.com/channels/atomic/centos/5/x86_64/RPMS/php-5.2.17-1.el5.art.i386.rpm
yum downgrade php*


at the end, under Transaction Summary, I took note of everything it said would need to be removed because of dependencies and used wget to grab those packages. Eventually your transaction summary should say to remove 0 packages and reinstall 0 packages, and downgrade several packages, for me it was

php
php-cli
php-common
php-devel
php-gd
php-imap
php-mbstring
php-mysql
php-pdo
php-pgsql
php-xml

At this point I said yes to the downgrade and it went through and did its thing. Then apache stopped working and I was getting PHP Fatal errors regarding the ioncube loader, the zendguard loader, and loading zend optimizer more than once.

I had to go into the php.d and I commented out everything in

ioncube.ini
zend.ini
zendguard.ini

I then copied the original contents of ioncube.ini and copied that line to load before zend in your etc/php.ini file

Code:
zend_extension=/usr/lib64/php/ioncube/ioncube_loader_lin_5.2.so
[Zend]
zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-3.3.3
zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.3
zend_optimizer.version=3.3.3
zend_extension=/usr/local/Zend/lib/ZendExtensionManager.so
zend_extension_ts=/usr/local/Zend/lib/ZendExtensionManager_TS.so


finally I started apache up with success and everything seems to be in order so far


Top
 Profile  
 
 Post subject: Re: Downgrade from PHP 5.3 to 5.2 without breaking Plesk
Unread postPosted: Mon Jul 04, 2011 7:02 am 
Offline
Long Time Forum Regular
Long Time Forum Regular

Joined: Sat Aug 20, 2005 9:30 am
Posts: 2812
Location: The Netherlands
Please know that PHP 5.2 is no longer supported and there won't be any PHP 5.2.x (security) updates.

_________________
Lemonbit Internet Dedicated Server Management


Top
 Profile  
 
 Post subject: Re: Downgrade from PHP 5.3 to 5.2 without breaking Plesk
Unread postPosted: Mon Sep 19, 2011 6:17 am 
Offline
New Forum User
New Forum User

Joined: Mon Sep 19, 2011 5:41 am
Posts: 1
Location: Chicago
I am trying to do the same thing. I upgraded mysql and php to latest version, then realized zend guard loader will not load my files encoded for zend optimizer. I tried "yum downgrade php*" two times and it did downgrade my php, but it also made apache stop running and I could not start it until I upgraded back to newer php version.


Top
 Profile  
 
 Post subject: Re: Downgrade from PHP 5.3 to 5.2 without breaking Plesk
Unread postPosted: Tue Sep 27, 2011 5:36 pm 
Offline
Forum Regular
Forum Regular

Joined: Mon Oct 29, 2007 6:51 pm
Posts: 606
whats with the shameless spam posting for ged?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic Share/Bookmark  [ 6 posts ] 

» Feed - Atomicorp

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group