I had to do a Debian dist-upgrade on my server... in the process, PHP got upgraded to 5.4. We use ioncube which only supports up to 5.3 atm, and I'm having some trouble finding how to downgrade to 5.3 from 5.4. Anyone know how?
migrated from stackoverflow.com Mar 9 '12 at 2:02
This question came from our site for professional and enthusiast programmers.
Neither of the solutions above worked for me. What did work was pinning the necessary packages to the old stable such as
Add the following to
And add the packages you need downgraded such as in my case
Then run the commands
You could try this, but do it at your own risk. I didn't try it myself. ;)
The last line to prevent upgrading to 5.4. When you're ready for 5.4, run
IonCube for 5.4 is a little while out from what I've read.
Downgrading PHP 5.4 to 5.3
First check which versions are supported for php5:
Here is the script which you could find it useful (it removes PHP 5.4 and install PHP 5.3):
Where the available versions you can check by command:
After the installation, verify it by command:
Please be careful and don't install any other packages without package version specified (like php5-xcache), otherwise apt-get will replace your PHP instance with 5.4 again!
To prevent this happening, you can hold these packages.
Holding packages using dpkg
To hold packages by dpkg, you can execute the following command:
To hold all PHP packages, run the following command:
The following command will show you holding status of your php packages:
Holding packages using aptitude
You can also hold packages using aptitude e.g.:
I had to do a full upgrade to wheezy by changing my apt sources to the wheezy sources. Uninstalled php, upgraded the system with the new apt sources, installed php... everything's golden.