I'm wondering if any linux/php gurus out there could help. Long story short, i've been tasked with creating a mirror/backup of a website which is made in PHP 5.3.29 to mitigate any risks if the existing server fails for any reason.

The app is huge and legacy and written in PHP 5.3.29. I have tried to download it locally and get it running on my local MAMP instance using the most up to date version of PHP, but due to the difference between 5.3.29 and the current version, the app fails all over the place. I have suggested that the app be re-written going forward but for the interim solution I need to get this working.

I have got a CentOS 7 server set up with the latest version of PHP installed, but obviously I know this is going to fail, I have had a look online and haven't been able to find a good solution.

Does anyone have any recommendations (I have only been working directly with Linux servers for a few months so i'm still new to some areas). on how I can get PHP 5.3.29 running on CentOS 7?

Thanks for any help/advice.

  • Try to replicate the old environment (which base OS?) inside a VM, and check if your app works with the (heavily patched) PHP 5.3.3 as supplied by CentOS 6.
    – Sven
    Jun 14 '15 at 10:31
  • It's a WHM server running RHEL 5.11! I'll spin up a Centos 6 VM and see if it helps. Just wasn't sure if there was a way of getting a version that old on CentOS 7
    – rosey85uk
    Jun 14 '15 at 11:20
  • Your app may currently be running on PHP 5.3.29, but if it "fails all over the place" on a current version, then it was written for an even older version of PHP, 5.2 or even older, and never maintained. For many years. If this app is even marginally important to your business, then the company needs to address this problem. Jun 14 '15 at 14:16
  • Hi Michael, it works perfectly on 5.3.29, I just want to mimic the environment in a backup server with the same versions. My idea is to have a load balancer (HA Proxy) which switches over to the back up if the original server fails.
    – rosey85uk
    Jun 14 '15 at 14:19

You could also use the IUS archives and install the RPM's manually on CentOS 6. https://dl.iuscommunity.org/pub/ius/archive/CentOS/6/x86_64/

Download them all and installing with yum will solve any dependencies you might need.


In case anyone was wondering, I ended up setting up a CentOS 7 cloud server and installing PHP 5.4 through:

yum install php

However I could also set up a CentOS 5 server and then install php 5.3.29 using the Webtatic repo here

I had some problems at first but it was mainly down to the default apache config not having mod rewrite enabled.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.