How to install old php version 5.2.17 on new gentoo system?

Tim used Ask the Experts™
I just refresh install new Gentoo system.
I did install php on it, it php 5.6.
It looks my old php code have lots of issue.
How to install old php version 5.2.17 on new gentoo system?

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
php 5.2 is EOL, so it's no longer included among the packages:

5.4 is the oldest you can install/compile automatically.

Your other option is to find the source for 5.2 somewhere and compile directly from source. Not recommended, but should work.

Most Valuable Expert 2011
Top Expert 2016
Strongly recommend that you not install a back-level version of PHP.  You should be on the most current version, and if it means a little work to refactor your old code set, just do it.  The old PHP versions contain known errors and security holes and if you choose to use the old versions, you are making yourself (and your clients) into the hackers' attractive prey.

Current versions of PHP are always listed on the upper right corner of

PHP publishes migration guides that tell you exactly what changed from release to release.  Start here and work your way up through the migration chain till you get to a current stable release:

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial