How to upgrade PHP on CentOS release 4.8?

PHP 5.2.1 is currently installed on a server running CentOS release 4.8 (Final).

I've tried upgrading PHP using YUM but nothing happens (see terminal output below).

Any ideas?




# yum upgrade php
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository base is listed more than once in the configuration
Setting up Upgrade Process
Setting up repositories
Reading repository metadata in from local files
primary.xml.gz            100% |=========================| 204 kB    00:00
atomic    : ################################################## 596/596
primary.xml.gz            100% |=========================| 225 kB    00:00
update    : ################################################## 713/713
primary.xml.gz            100% |=========================| 611 kB    00:01
base      : ################################################## 1599/1599
primary.xml.gz            100% |=========================| 6.6 kB    00:00
Webmin    : ################################################## 45/45
primary.xml.gz            100% |=========================| 225 kB    00:00
updates   : ################################################## 713/713
primary.xml.gz            100% |=========================|  190 B    00:00
primary.xml.gz            100% |=========================|  36 kB    00:00
extras    : ################################################## 141/141
Could not find update match for php
No Packages marked for Update/Obsoletion

Open in new window

bearclaws75Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

medveddCommented:
You have to use rpmforge repository for newer PHP versions.

http://wiki.centos.org/AdditionalResources/Repositories/RPMForge
0
medveddCommented:
Oops, looks like rpmforge is behind on php.. Better use remi repository:

http://blog.famillecollet.com/pages/Config-en

Scroll down to Enterprise Linux 4

0
bearclaws75Author Commented:
I ran these commands:
       wget http://download.fedora.redhat.com/pub/epel/4/i386/epel-release-4-9.noarch.rpm
       wget http://rpms.famillecollet.com/enterprise/remi-release-4.rpm
       rpm -Uvh remi-release-4*.rpm epel-release-4*.rpm

...but get this error:
       # rpm -Uvh remi-release-4*.rpm epel-release-4*.rpm
       warning: remi-release-4.rpm: V3 DSA signature: NOKEY, key ID 00f97f56
       warning: only V3 signatures can be verified, skipping V4 signature
       error: Failed dependencies:
       fedora-release >= 4 is needed by remi-release-4-4.fc4.remi.noarch
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

medveddCommented:
Try to disable dependencies check:

rpm -Uvh --nodeps remi-release-4*.rpm epel-release-4*.rpm
0
bearclaws75Author Commented:
I ran that command and receive the following message:

        # rpm -Uvh --nodeps remi-release-4*.rpm epel-release-4*.rpm
        warning: remi-release-4.rpm: V3 DSA signature: NOKEY, key ID 00f97f56
        warning: only V3 signatures can be verified, skipping V4 signature
        warning: only V3 signatures can be verified, skipping V4 signature
        Preparing...                ########################################### [100%]
        package epel-release-5-3 (which is newer than epel-release-4-9) is already installed
        package remi-release-5-7.el5.remi (which is newer than remi-release-4-4.fc4.remi) is already installe
0
medveddCommented:
Why do you have epel-release-5-3 and remi-release-5-7.el5.remi installed? Are you sure that you have Centos 4.8?
If yes, remove epel-release-5-3 and remi-release-5-7.el5.remi and install versions 4 of these rpms.
0
bearclaws75Author Commented:
Yes - I am running CentOS 4.8 (see below). I removed the problematic rpms and ran the installer again but now get the below error...

        # cat /etc/redhat-release
        CentOS release 4.8 (Final)

        # rpm -Uvh remi-release-4*.rpm epel-release-4*.rpm
        warning: remi-release-4.rpm: V3 DSA signature: NOKEY, key ID 00f97f56
        error: Failed dependencies:
        fedora-release >= 4 is needed by remi-release-4-4.fc4.remi.noarch
0
medveddCommented:
You forgot --nodeps option
0
bearclaws75Author Commented:
Good catch. This is what I get now:

       # rpm -Uvh --nodeps remi-release-4*.rpm epel-release-4*.rpm
       warning: remi-release-4.rpm: V3 DSA signature: NOKEY, key ID 00f97f56
       Preparing...                ########################################### [100%]
       1:epel-release           ########################################### [ 50%]
       2:remi-release           ########################################### [100%]

...after that last line is displayed, I am returned to the command prompt.
0
medveddCommented:
Now you can say

yum --enable remi list | grep php

to see what packages are available. php itself is version 5.3.2 and
a lot of other php-related stuff is on remi. You can install with a command

yum --enable remi install php
0
bearclaws75Author Commented:
When I run "yum --enable remi list | grep php" I see a number of packages. Do i need to install any specific ones?

Here's what happens when I run the following:

     # yum --enable remi install php
     Repository base is listed more than once in the configuration
     Repository updates is listed more than once in the configuration
     Repository base is listed more than once in the configuration
     Setting up Install Process
     Setting up repositories
     Reading repository metadata in from local files
     Parsing package install arguments
     Nothing to do
     
     # php -v
     PHP 5.2.1 (cgi) (built: Mar  3 2007 06:18:54)
0
medveddCommented:
If you need just basic php, you have to install only php package.

Try

yum --enable remi update php

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
bearclaws75Author Commented:
i tried that and get this...which takes us back to the beginning :)

     # yum --enable remi update php
     Repository base is listed more than once in the configuration
     Repository updates is listed more than once in the configuration
     Repository base is listed more than once in the configuration
     Setting up Update Process
     Setting up repositories
     Reading repository metadata in from local files
     Could not find update match for php
     No Packages marked for Update/Obsoletion

BTW - I'm sure this is a frustrating way to do this but I really appreciate your help!
0
bearclaws75Author Commented:
Hmm. It looks like I might be limited to PHP 5.2.1 when running CentOS 4.8.

I just erased PHP and then re-insatlled it. When I did this it only presents 5.1.6 for me to install:

=============================================================================
 Package                 Arch       Version          Repository        Size
=============================================================================
Installing:
 php                     i386       5.2.13-1.el4.art  atomic            1.2 M


....maybe I should start with upgrading CentOS? Are there major risks involved there?
0
medveddCommented:
Centos folks highly recommend fresh install when you are upgrading from 4.x to 5.x
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.