1

I have followed the wget method here hoping it was my solution:

Howto install php 5.2.17 on centos 6 x86_64

However I get the following error when trying to install:

# rpm -ivh php-5.2.17-1.x86_64.rpm
error: Failed dependencies:
        libaspell.so.15()(64bit) is needed by php-5.2.17-1.x86_64
        libcrypto.so.6()(64bit) is needed by php-5.2.17-1.x86_64
        libcurl.so.3()(64bit) is needed by php-5.2.17-1.x86_64
        libpspell.so.15()(64bit) is needed by php-5.2.17-1.x86_64
        libssl.so.6()(64bit) is needed by php-5.2.17-1.x86_64
        php-cli = 5.2.17-1 is needed by php-5.2.17-1.x86_64

Would be awesome if someone could help.

UPDATE:

I have now installed an instance of CentOS 5 and am attempting to install php 5.2.17 yet again...anyone know the best way to deal with the following dependencies:

 libaspell.so.15()(64bit) is needed by php-5.2.17-1.x86_64
    libgmp.so.3()(64bit) is needed by php-5.2.17-1.x86_64
    libpspell.so.15()(64bit) is needed by php-5.2.17-1.x86_64
    php-cli = 5.2.17-1 is needed by php-5.2.17-1.x86_64
    php-common = 5.2.17-1 is needed by php-5.2.17-1.x86_64

Wondering what libgmp, libaspell, php-cli and php-common are and where to get the proper versions for php 5.2.17.

Any help is most appreciated.

Thank you!

user1114330
  • 173
  • 1
  • 3
  • 11
  • 1
    Why do you want to run an old version of PHP? – voretaq7 Feb 08 '12 at 21:06
  • 1
    where did you get this rpm? is it actually patched for any of the recently discovered vulnerabilities which have been discovered in php? Since support for 5.2 is dropped upstream, do you have any plan to incorporate future security fixes? or is security just going out the window here? Moving your application to a current version of php is probably a better plan. – stew Feb 08 '12 at 21:34
  • I am 100% in the know that this site needs to be made recent in regards to many things...especially php. However I have to set up a dev environment first...I mean I cant just start upgrading php on a production server right? Where should I download the best rpm for php 5.2.17? – user1114330 Feb 08 '12 at 22:17

2 Answers2

1

php-cli 5.2.17-1 is required. That's available on the site that you found in the earlier ServerFault posting, http://www6.atomicorp.com/channels/atomic/centos/6/x86_64/RPMS/ so you should get that RPM file also.

You are going to have bad problems with the other dependencies, however. For example, libssl.so.6 belongs to an older openssl package compared to what's standard on CentOS6. I'm not sure what the best way to handle this would be: you can go back to a CentOS5 box, and it'll be a lot easier dealing with those other dependencies there because they match with the CentOS5 version of, say, openssl.

If you can't do that, you will be in for some amount of pain and suffering. You can build PHP packages from source, which should work (make sure you get, say, libcurl-dev installed and so on), but that opens up a different can of worms. If you go down that path, it looks like that atomicorp.com site has the php 5.2 spec file at http://www6.atomicorp.com/channels/source/php/php-5.2.16.spec

But it should be noted that building your own packages may not be the best idea, since you may miss the frequent PHP security updates in the not too distant future.

cjc
  • 24,533
  • 2
  • 49
  • 69
  • Ok I get it..starting with CentOS 5 is not a problem. Wondering if downgrading is a better option? This is already starting to hurt...need to move this site to another server badly. Had no clue this would be as much of a hold up as it is. – user1114330 Feb 08 '12 at 22:08
  • You don't want to downgrade things like openssl. That would be an even worse path to take. Arguably, the best option would be to get the application to run on PHP 5.3. – cjc Feb 08 '12 at 22:26
  • I am in the process of doing that..I have to set up a dev environment first for some minor changes the client wants before upgrading to php 5.3. – user1114330 Feb 08 '12 at 22:30
  • Attempting this from CentOS 5 now...still dealing with dependencies...any thoughts? – user1114330 Feb 08 '12 at 23:37
  • Following your update: libgmp.so.3 is in gmp-4.1.4-10.el5 and the other two are aspell-0.60.3-7.1. Those are standard CentOS5 packages. So, "yum install gmp aspell". The php-cli and php-common should be available from the same site you downloaded the 5.2 RPM. So, after downloading the two rpms, do "rpm -ihv php*" (assuming the 3 php rpms are the only thing named php* in the directory). – cjc Feb 09 '12 at 00:50
  • when attempting to install php-cli the following dependencies are needed and missing: php-common, libc.so.6, libcurl.so.4, rpmlib (PayloadIsXz) and when trying to install php-common these are reported as missing: php-common, libc.so.6, libcurl.so.4, rpmlib (PayloadIsXz) and rpm(FileDigests) – user1114330 Feb 09 '12 at 01:23
  • OK, glibc-devel for the libc.so.6, but the libcurl.so.4 is wrong for CentOS5. The rpmlib and rpm(FileDigests) are going to be problematic. I know the last one has to do with package build options, so there's no easy way to address it. Hmm. You may have to build the package from spec file locally. Sorry. – cjc Feb 09 '12 at 01:38
  • One other idea: Fedora11 comes with php 5.2: http://distrowatch.com/table.php?distribution=fedora. I know you're targeting RHEL, but Fedora is possibly not that far off. That may or may not work for your purposes. – cjc Feb 09 '12 at 01:44
  • err..Fedora 11 would have been nice except rackspace doesnt offer it. – user1114330 Feb 09 '12 at 18:32
  • "The rpmlib and rpm(FileDigests) are going to be problematic. I know the last one has to do with package build options, so there's no easy way to address it. Hmm. You may have to build the package from spec file locally"....you lost me on this one. – user1114330 Feb 09 '12 at 18:35
  • What about debian 5?? Looks like it runs php 5.2.6? – user1114330 Feb 09 '12 at 18:52
  • Oh, I thought you had to use a RHEL-derived or related operating system. Sure, go Debian. Should be fine. – cjc Feb 09 '12 at 18:55
0

I might suggest that you get the latest version of php available on Centos 6.x which is php-5.3.3-3....you can do this and grab all the dependencies automagically using:

 yum update php\*

or

 yum install php\*

as the root user. I put the * at the end so that you can get all the php packages if you desire to be complete.

mdpc
  • 11,698
  • 28
  • 51
  • 65