How I could install an old PHP version on Ubuntu 13.04 (Raring Ringtail) -preferably version 5.3.3?
-
Just out of curiosity, why are you wanting to force your system to use such an old version?– ShaunaJun 10, 2013 at 15:07
-
1Because before me was used Spreadsheet_Excel_Writer, wich couldn't work with new PHP version. I get many error like "Non-static method System::tmpdir() should not be called statically" and "Call-time pass-by-reference has been removed"– BlazeJun 10, 2013 at 15:16
-
Thanks for all. I install PHP 5.4.9 and rewrite old script, witch made errors.– BlazeJun 11, 2013 at 6:29
-
1@Blaze - please click the tick button next to the answer that helped you to close the thread. Alternatively answer this yourself with full instructions how you installed an old PHP version.– fossfreedom ♦Jun 11, 2013 at 7:19
4 Answers
You can install php as usual, which will install 5.4, then use this script to downgrade it to 5.3:
http://www.ubuntugeek.com/how-to-downgrade-php-version-from-5-4-to-5-3-in-ubuntu-12-10-quantal.html
Procedure to follow
First you need to download the shell script from above link.
Once you have php5_4_downgrade_5.3.sh file you need to change the permissions using the following command
sudo chmod 755 php5_4_downgrade_5.3.sh
Now you can run the script using the following command
sudo sh php5_4_downgrade_5.3.sh
Follow the on screen instructions It worked on Rackspace cloud Ubuntu 13.04 today!
Unless you do a full recompile from sources on the 13.04 platform, I'd recommend NOT installing any pre-packaged version of an older PHP version on a later OS. The reason is that there are many incompatibilities between major releases and you'll be UNpleasently surprised when things do not work.
In any event, its going to be a hassle taking time and effort. You'll probably be forced into recompilation and reinstallation of a number of dependent packages as well to make this work. It could require a lot of effort to keep the old version as newer support packages are released and updated by the vendor as well (i.e. more recompiles and reinstalls).
Also, keep in mind that there are problems fixed in the newer version of PHP (security issues) that are not worth backtracking to an older version.
One other suggestion might be to reinstall an OS that supports the PHP version you desire as part of the distribution.
I would propose to just run older Ubuntu release - especially Ubuntu precise still contains PHP 5.3 and it's also LTS.
There is a page with unsupported previous PHP versions here. I suppose that there is a README in the tarball with instructions.