1

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.

rosey85uk
  • 71
  • 4
  • 11
  • 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. – Michael Hampton 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

2 Answers2

0

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.

Exsisto
  • 98
  • 2
  • 9
-1

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.

rosey85uk
  • 71
  • 4
  • 11