Redhat – Installing PHP 5.2 on RHEL 7.1

downgradephp5redhatrhel5rhel7

We are planning to move to Amazon EC2 server. Our current server version RHEL 5.5 and PHP 5.2. We are planning to configure Amazon RHEL 7.1. Does RHEL 7.1 support downgrading PHP version to 5.2. I'm worried about downgrading all dependent packages.

Anyone tried downgrading PHP version?. OR do we need to setup RHEL 5.5 version only?

what are the alternative option available related to OS since currently upgrading PHP is not possible.

Best Answer

If you're going to use PHP 5.2, you could be facing a security risk as Michael noted. To help hedge against this risk, you could go with a vendor that backports security fixes into past PHP versions. For example, I think CloudLinux either does currently or is slated to backport security fixes into PHP 5.2 (CloudLinux is a RHEL / CentOS derivative).

If you want to improve security more on top of that, you could also use a good mod_security ruleset like GotRoot or Trustwave.

If you don't want to do any of that, you could compile PHP 5.2 from source - it's actually not that difficult to do, but I wouldn't recommend it as compared to the above.

Best case is you'd update the application like Michael suggested (I understand sometimes PHP apps are encoded and you don't have access to the source code, but if that's not the case, you should definitely consider it).