LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-09-2007, 08:14 AM   #1
carstos
LQ Newbie
 
Registered: Sep 2007
Posts: 13

Rep: Reputation: 0
Upgrade PHP4 to PHP5 on CentOS


Hello,

I am quite new to Linux and I though it would be better to ask here before making something wrong.

I have a CentOS Linux server with preinstalled PHP4. I read some documents on www and finally I decided to uninstall this PHP and install PHP5.

I noticed that my existing php verion was installed from a RPM.
When I try to uninstall it I get this:

rpm -e php-4.3.9-3.22.5
error: Failed dependencies:
php = 4.3.9-3.22.5 is needed by (installed) php-mbstring-4.3.9-3.22.5.i386
php = 4.3.9-3.22.5 is needed by (installed) php-snmp-4.3.9-3.22.5.i386
php = 4.3.9-3.22.5 is needed by (installed) php-devel-4.3.9-3.22.5.i386
php = 4.3.9-3.22.5 is needed by (installed) php-xmlrpc-4.3.9-3.22.5.i386
php = 4.3.9-3.22.5 is needed by (installed) php-imap-4.3.9-3.22.5.i386
php = 4.3.9-3.22.5 is needed by (installed) php-gd-4.3.9-3.22.5.i386
php = 4.3.9-3.22.5 is needed by (installed) php-ncurses-4.3.9-3.22.5.i386
php = 4.3.9-3.22.5 is needed by (installed) php-pear-4.3.9-3.22.5.i386
php = 4.3.9-3.22.5 is needed by (installed) php-domxml-4.3.9-3.22.5.i386
php = 4.3.9-3.22.5 is needed by (installed) php-odbc-4.3.9-3.22.5.i386
php = 4.3.9-3.22.5 is needed by (installed) php-ldap-4.3.9-3.22.5.i386
php >= 4.0.4 is needed by (installed) squirrelmail-1.4.8-4.0.1.el4.centos.noarch
php = 4.3.9-3.22.5 is needed by (installed) php-pgsql-4.3.9-3.22.5.i386
php >= 4.2.0 is needed by (installed) phpPgAdmin-4.1.3-1.gdg.noarch
php = 4.3.9-3.22.5 is needed by (installed) php-mysql-4.3.9-3.22.5.i386
php >= 4.1.0 is needed by (installed) phpMyAdmin-2.10.3-1.gdg.noarch
/usr/bin/php is needed by (installed) phpPgAdmin-4.1.3-1.gdg.noarch


I don't want to uninstall all these. Which is the best course of action? For PHP5 I found a rpm file. Is it ok or should I compile the sources?

Thanks to all.
 
Old 09-09-2007, 08:58 AM   #2
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
Hi and welcome to LQ.

Those packages won't work with php5, so you probably should uninstall them and install their php5 equivalents. PHP5 is in the centosplus repo, so you could do
Code:
#yum --enablerepo=centosplus update
 
Old 09-09-2007, 09:32 AM   #3
carstos
LQ Newbie
 
Registered: Sep 2007
Posts: 13

Original Poster
Rep: Reputation: 0
Thanks for info.

So I should uninstall all packages them install the new ones. Will I install them using yum or download the rpms and install each of them manually? What was that yum command for?
 
Old 09-10-2007, 02:43 AM   #4
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
Quote:
What was that yum command for?
That would update the packages on your system including php to the latest ones which are in the centos plus repository. PHP5 is in the centos plus repository.
 
Old 09-10-2007, 02:47 AM   #5
carstos
LQ Newbie
 
Registered: Sep 2007
Posts: 13

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by reddazz View Post
That would update the packages on your system including php to the latest ones which are in the centos plus repository. PHP5 is in the centos plus repository.
I tried that and it seems the entire system is updated. I really don't see why should I update gcc and httpd when I only need php. How can I update only php?
 
Old 09-10-2007, 03:00 AM   #6
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
Code:
#yum --enablerepo=centosplus update php*
 
Old 09-10-2007, 03:05 AM   #7
carstos
LQ Newbie
 
Registered: Sep 2007
Posts: 13

Original Poster
Rep: Reputation: 0
This is what I've tried and among dependencies was gcc and httpd. Maybe they really need to be updated.
But the real problem was that from 44 dependencies, only one failed to download from repository (libpng ... ). Is there a way to search it myself and then add the path to YUM config ? As a mirror site I mean.
 
Old 09-10-2007, 03:11 AM   #8
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
You can search for individual rpms here.
 
Old 09-10-2007, 03:19 AM   #9
carstos
LQ Newbie
 
Registered: Sep 2007
Posts: 13

Original Poster
Rep: Reputation: 0
Thanks for the link. But let's say I find that missing dependency, how can I use it and still let YUM update all dependencies. Should I modify some config file to update the mirror sites?
 
Old 09-10-2007, 05:33 PM   #10
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
You could try using the localinstall option in YUM e.g.
[code]yum localinstall somerpm[code]
If the package has any dependencies, yum will search for them in the online repos.
 
Old 09-10-2007, 05:34 PM   #11
carstos
LQ Newbie
 
Registered: Sep 2007
Posts: 13

Original Poster
Rep: Reputation: 0
Thanks all. I managed to do it. I uninstalled all php and dependencies and then installed php5 with YUM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
switch between php4 and php5 cooljai Linux - Software 1 06-11-2007 07:15 AM
PHP5 to PHP4 on FC4? kz26 Fedora 5 10-24-2005 05:09 AM
Php5 >> Php4 Eric45008 Slackware 22 04-25-2005 07:37 PM
Slack 10.0 PHP4 -> PHP5 update pdxluddite Slackware 2 03-29-2005 01:37 AM
upgradeing from php4 to php5 mgarcia001 Debian 0 09-30-2004 07:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration