downgrade PHP 5.3 to 5.2 on lenny

8,999

Solution 1

Apt won't downgrade packages by default. What you want to do is for each of the packages you want to downgrade, run apt-get install <package>=<version to downgrade to>, so something like apt-get install php5-mysql=5.2.6.dfsg.1-1+lenny3 for example.

Solution 2

Check your /var/cache/apt/archives directory. If you haven't done an apt-get clean recently, you will have the original .deb files on your system.

ls -al *5.2.12*deb

if that contains libapache2-mod-php5 and all of the php5 modules that you normally use, you can either dpkg -i the entire list of them, or, if there aren't any extras,

dpkg -i *5.2.12*deb
Share:
8,999

Related videos on Youtube

Admin
Author by

Admin

Updated on September 17, 2022

Comments

  • Admin
    Admin almost 2 years

    Unfortunately I did upgrade PHP to version 5.3, but it end up breaking up some web apps, now I'm trying to go back to 5.2. I removed both sources php53.dotdeb.org from /etc/apt/sources.list and I did apt-get update && apt-get upgrade, but it didn't downgrade anything.

    Any ideas on how to go back will be appreciated

    Thanks

  • womble
    womble over 14 years
    Probably everything relating to PHP; Most good repos tag their package versions with a unique tag, like 'dotdeb'; I expect that dpkg -l |grep dotdeb will probably list all of the relevant packages; you'll need to apt-cache policy <package> to get the version you want to downgrade to.