eskp.net


Downgrade PHP from 5.3 to 5.2

$ cat /etc/apt/preferences

Package: libapache2-mod-php5
Pin: release a=lenny
Pin-Priority: 991

Package: php5
Pin: release a=lenny
Pin-Priority: 991

Package: php5-cgi
Pin: release a=lenny
Pin-Priority: 991

Package: php5-cli
Pin: release a=lenny
Pin-Priority: 991

Package: php5-common
Pin: release a=lenny
Pin-Priority: 991

Package: php5-gd
Pin: release a=lenny
Pin-Priority: 991

Package: php5-mcrypt
Pin: release a=lenny
Pin-Priority: 991

Package: php5-mysql
Pin: release a=lenny
Pin-Priority: 991

Package: php5-suhosin
Pin: release a=lenny
Pin-Priority: 991

$ cat /etc/apt/sources.list.d/lenny.list

deb http://archive.debian.org/debian/ lenny main non-free contrib
deb-src http://archive.debian.org/debian/ lenny main non-free contrib
# Volatile:
deb http://archive.debian.org/debian-volatile lenny/volatile main contrib non-free
deb-src http://archive.debian.org/debian-volatile lenny/volatile main contrib non-free

Remove currently installed PHP packages then replace them from 'lenny' release:

PKG=`dpkg -l | grep ^ii | grep php5 | awk '{print $2}'`
sudo aptitude purge $PKG
sudo aptitude install -t lenny -y $PKG