downgrade php from 5.6.9 to 5.3.3 debian jessie

user3620514 picture user3620514 · Jul 7, 2015 · Viewed 12.8k times · Source

We have a php application which running on debian squeeze server.

When i install it on the new server (debian jessie), it doesn't run properly.

how can i downgrade php from 5.6.9 to 5.3.3?

Thanks

Answer

Leahkim picture Leahkim · Mar 31, 2016

The latest version of PHP used in Squeeze is 5.3.3.

Add the Squeeze repos in your source list:

deb http://archive.debian.org/debian/ squeeze main contrib non-free
deb http://archive.debian.org/debian/ squeeze-lts main contrib non-free

Update package list:

apt-get -o Acquire::Check-Valid-Until=false update

Uninstall current PHP version:

dpkg -r --force-depends $(dpkg -l | grep php | awk '{print $2}')

Install same PHP packages using squeeze repo:

apt-get install -t "squeeze" $(dpkg -l | grep php | awk '{print $2}')

Note: I use this to downgrade PHP from Squeeze-s PHP 5.3 to Lenny's PHP 5.2, it should works from Jessie to Squeeze.