# an example on how to use Debian Snapshot
# this example will install PHP version 5.3.10-2
# ====================
# make sure /etc/apt/sources.list already got these lines in it :
## PHP 5.3.10-2 packages
# deb http://snapshot.debian.org/archive/debian/20120221T041601Z/ unstable main
## Apache 2.22.2-1 packages
# deb http://snapshot.debian.org/archive/debian/20120202T040408Z/ unstable main
# why these lines ? see "Usage" on http://snapshot.debian.org for info
# more info : http://mstd.eu/index.php/2016/07/04/install-old-versions-of-software-on-debian-like-php-5-3/
# ===================
# remove current PHP packages
sudo apt-get remove --purge `dpkg -l | grep php | grep -w 5.5 | awk '{print $2}' | xargs`
# remove current Apache packages
sudo apt-get remove --purge `dpkg -l | grep apache | grep -w 2 | awk '{print $2}' | xargs`
# update package database
apt-get update
# this is the setting required to be able to use Debian Snapshot
apt-get -o Acquire::Check-Valid-Until=false update
# now we can specify the exact version
apt-get install php5=5.3.10-2 libapache2-mod-php5=5.3.10-2 php5-cli=5.3.10-2 php5-common=5.3.10-2 php5-gd=5.3.10-2 php5-mcrypt=5.3.10-2 php5-mysql=5.3.10-2 php5-pgsql=5.3.10-2 apache2=2.2.22-1 apache2-mpm-prefork=2.2.22-1 apache2-suexec=2.2.22-1 apache2-utils=2.2.22-1 apache2.2-common=2.2.22-1 apache2.2-bin=2.2.22-1
/etc/init.d/apache2 restart
Comments