5

Does anyone know how to install php 5.2.17 on a 64bit centos 6 install? I've got a old legacy system that requires php 5.2.17, but centos 6 only supports php 5.3.

I've installed repo's such as webtatic, but had no luck at all.

Should I rather revert back to centos 5 and install it there? Any ideas, I am out?

3 Answers 3

1

Do the following:

wget http://www.atoomnet.net/php/php-5.2.17/php-5.2.17-1.x86_64.rpm 

Then:

rpm -ivh php-5.2.17-1.x86_64.rpm 

Then:

vi /etc/yum.conf 

Add the following under [main]:

exclude=php* 

If you do all that it should work fine.

But, I warn you, you should really run the latest version of PHP to insure that your server is secure.

4
  • Unfortunately I've tried this already, got too many dependency problems when I want to follow this method. Commented Sep 7, 2011 at 21:09
  • Okay, are you having problems with dependencies when installing the rpm package I provided? Or, after excluding php from updates? Commented Sep 7, 2011 at 21:23
  • That is correct, you see it's not just installing php, extra extensions is also required such as gd, curl, json ect. The best would be to have a yum repo where one can install these extra extensions as well. Commented Sep 7, 2011 at 21:46
  • This should contain all of the extensions: atoomnet.net/centos_updated_php.php Commented Sep 7, 2011 at 22:14
1

If centos 6 does not support legacy PHP, you are better off running v5 because if you have to mod the OS to trick it into running it, it could open up a security hole. Recommend you use the latest PHP and OS. If that's not possible, then make sure you have very tight security when using old PHP. That's why they update their software. I'm looking for a way to get this to work right for you.

EDIT: I was beaten to it. Refer to the other poster's wget method. EDIT2: removed useless text.

3
  • 1
    I'd recommend waiting to submit an answer until you have good content to offer. Doing so will gain you many more upvotes than you would if you post a half-baked answer. Commented Sep 7, 2011 at 20:47
  • Even though it can be edited? Okay, sounds like good advice. Commented Sep 7, 2011 at 20:50
  • Agree with the updated answer, and Centos 5 will still receive maintenance updates until Spring 14'. Commented Sep 8, 2011 at 0:55
1

The atomicturtle repo contains php 5.2.17 x64 rpms for centos 6. Download the necessary packages and install it.

http://www6.atomicorp.com/channels/atomic/centos/6/x86_64/RPMS/

Updated link: http://www6.atomicorp.com/channels/atomic/centos/6/x86_64/drpms/

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.