Report this

What is the reason for this report?

Downgrade PHP Version from 5.5 to 5.2 on Ubuntu 14.04

Posted on October 22, 2014

I´m currently migrating some pretty old clients sites (that I didn’t code) to DO and I´m facing many php error related (I guess) with the new PHP version installed by default. I didn’t found any article related to the topic and thought that maybe I could get some advise from the community. I found this article: http://askubuntu.com/questions/455614/downgrade-php-version-from-5-5-to-5-4-on-ubuntu-14-04

Should I create a new droplet with Ubuntu 12 instead? Is there an easy to follow DO article that I may read to get specific PHP versions/site?

Thanks!



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

This comment has been deleted

PHP 5.2 has been depreciated. If your code relies on abilities in 5.2 that aren’t in 5.4, you might want to ask yourself why the removed them from 5.4. They remove features (rather than provide depreciation warnings) when it’s a vulnerability/insecure.

If your code needs 5.2, you might want to downgrade your OS, but again, that’s not secure.

The best solution is to fix the code so it works on current PHP versions.

One more note on this – just in case your code can run on PHP 5.3, an easier fix is to install Ubuntu 12.04. It’s a LTS (Long Term Support) release and comes packaged with PHP 5.3.

I have an isolated Ubuntu 12.04 droplet with PHP 5.3 running for a similar purpose…a stubborn client who refuses to make the investment to update their site.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.