Upgrading PHP4 to PHP5 on CentOS the smooth way

Installing, Configuring, Troubleshooting server daemons such as Web and Mail
mrpbjnance
Posts: 4
Joined: 2007/07/13 04:38:08

Re: Upgrading PHP4 to PHP5 on CentOS the smooth way

Post by mrpbjnance » 2007/07/13 04:59:54

-------------------------
php-5.x.x-x.centos4
-------------------------
This is php-5 for CentOS-4. It replaces the php-4.3.9 that is currently
in CentOS-4. In order to upgrade a current php-4 install, you must
remove php-domxml first and then do:

yum --enablerepo=centosplus upgrade php*

or to do and install, use this command:

yum --enablerepo=centosplus --exclude=php-domxml install php*

(or install individually the files that you need)



Sorry newbiew question

Can someone tell me where php-domxml would be.

We want to upgrade from php 4.3.9 to php5 I am from old unix days and VERY confused.
If anyone would be will to show me steps I would be greatful

saina2k5
Posts: 1
Joined: 2007/07/16 10:12:42
Location: baga toirog, ub city, mongolia
Contact:

Re: Upgrading PHP4 to PHP5 on CentOS the smooth way

Post by saina2k5 » 2007/07/16 12:30:37

# yum remove php
Error: Bad repository file ///etc/yum.repos.d/freshrpms.repo. Skipping
Setting up Remove Process
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Package php.i386 0:5.1.6-3.el4s1.7 set to be erased
--> Running transaction check
Setting up Repos
dries 100% |=========================| 951 B 00:00
update 100% |=========================| 951 B 00:00
http://archive.cs.uu.nl/mirror/dag.wieers/dries/fedora/fc4/i386/dries/RPMS/repodata/repomd.xml: [Errno 4] IOError: HTTP Error 404: Not Found
Trying other mirror.
rpmforge 100% |=========================| 951 B 00:00
base 100% |=========================| 1.1 kB 00:00
newrpms.sunsite.dk 100% |=========================| 951 B 00:00
centosplus 100% |=========================| 951 B 00:00
addons 100% |=========================| 951 B 00:00
extras 100% |=========================| 1.1 kB 00:00
Reading repository metadata in from local files
dries : ################################################## 4407/4407
update : ################################################## 252/252
rpmforge : ################################################## 4407/4407
base : ################################################## 1517/1517
newrpms.su: ################################################## 258/258
centosplus: ################################################## 356/356
extras : ################################################## 162/162
--> Processing Dependency: php >= 5.1.0-1 for package: php-pear
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Package php-pear.noarch 1:1.4.11-1.el4s1.1 set to be erased
--> Running transaction check

Dependencies Resolved
Transaction Listing:
Remove: php.i386 0:5.1.6-3.el4s1.7

Performing the following to resolve dependencies:
Remove: php-pear.noarch 1:1.4.11-1.el4s1.1
Total download size: 0
Is this ok [y/N]: y
Downloading Packages:
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Erasing: php-pear 1/2
Erasing: php 2/2

Removed: php.i386 0:5.1.6-3.el4s1.7
Dependency Removed: php-pear.noarch 1:1.4.11-1.el4s1.1
Complete!



# yum install php5

Error: Bad repository file ///etc/yum.repos.d/freshrpms.repo. Skipping
Setting up Install Process
Setting up Repos
dries 100% |=========================| 951 B 00:00
update 100% |=========================| 951 B 00:00
rpmforge 100% |=========================| 951 B 00:00
base 100% |=========================| 1.1 kB 00:00
newrpms.sunsite.dk 100% |=========================| 951 B 00:00
centosplus 100% |=========================| 951 B 00:00
addons 100% |=========================| 951 B 00:00
extras 100% |=========================| 1.1 kB 00:00
Reading repository metadata in from local files
dries : ################################################## 4407/4407
update : ################################################## 252/252
rpmforge : ################################################## 4407/4407
base : ################################################## 1517/1517
newrpms.su: ################################################## 258/258
centosplus: ################################################## 356/356
extras : ################################################## 162/162
Parsing package install arguments
No Match for argument: php5
Nothing to do
#

How do install php ( with php-mysql )? need help?

what shoud i do? please


thank you

nbourdeau
Posts: 1
Joined: 2007/07/18 14:32:32

Re: Upgrading PHP4 to PHP5 on CentOS the smooth way

Post by nbourdeau » 2007/07/18 14:37:19

[quote]
breun wrote:
The [url=http://mirror.centos.org/centos-4/4.4/centosplus/Readme.txt]CentOS Plus repo readme[/url] is pretty clear on this:

[quote]-------------------------
php-5.x.x-x.centos4
-------------------------
This is php-5 for CentOS-4. It replaces the php-4.3.9 that is currently
in CentOS-4. In order to upgrade a current php-4 install, you must
remove php-domxml first and then do:

yum --enablerepo=centosplus upgrade php*

or to do and install, use this command:

yum --enablerepo=centosplus --exclude=php-domxml install php*

(or install individually the files that you need)[/quote][/quote]

I've correctly installed php5 with these instructions...
But what about installing Pear for php5 ? (php-pear package complains about dependency to php4...)
please help!

sruckh
Posts: 18
Joined: 2006/03/31 03:14:48

Re: Upgrading PHP4 to PHP5 on CentOS the smooth way

Post by sruckh » 2007/08/01 19:30:14

I ran the suggested commands and end up with this:

Dependencies Resolved

=============================================================================
Package Arch Version Repository Size
=============================================================================
Updating:
mysql x86_64 5.0.46-1.el4.centos centosplus 2.1 M
php x86_64 5.1.6-3.el4s1.7 centosplus 1.2 M
Installing for dependencies:
mysql-libs x86_64 5.0.46-1.el4.centos centosplus 1.5 M
mysqlclient14 x86_64 4.1.22-1.el4s1.1 centosplus 1.2 M
php-cli x86_64 5.1.6-3.el4s1.7 centosplus 2.3 M
php-common x86_64 5.1.6-3.el4s1.7 centosplus 135 k
php-pdo x86_64 5.1.6-3.el4s1.7 centosplus 228 k
Updating for dependencies:
mod_auth_mysql x86_64 1:3.0.0-2.el4s1.3 centosplus 22 k
mysql-server x86_64 5.0.46-1.el4.centos centosplus 10 M
perl x86_64 4:5.8.8-4.el4s1 centosplus 12 M
perl-DBD-MySQL x86_64 3.0008-1.el4.centos centosplus 147 k
php-gd x86_64 5.1.6-3.el4s1.7 centosplus 108 k
php-imap x86_64 5.1.6-3.el4s1.7 centosplus 50 k
php-ldap x86_64 5.1.6-3.el4s1.7 centosplus 33 k
php-mbstring x86_64 5.1.6-3.el4s1.7 centosplus 990 k
php-mysql x86_64 5.1.6-3.el4s1.7 centosplus 85 k

Transaction Summary
=============================================================================
Install 5 Package(s)
Update 11 Package(s)
Remove 0 Package(s)
Total download size: 33 M
Is this ok [y/N]:
This looks OK, but after answering YES, these errors immediately follow:

Downloading Packages:
Running Transaction Test
Finished Transaction Test


Transaction Check Error: file /usr/bin/mysqldumpslow from install of mysql-server-5.0.46-1.el4.centos conflicts with file from package mysql-4.1.20-2.RHEL4.1
file /etc/my.cnf from install of mysql-libs-5.0.46-1.el4.centos conflicts with file from package mysql-4.1.20-2.RHEL4.1
file /usr/share/mysql/charsets/Index.xml from install of mysql-libs-5.0.46-1.el4.centos conflicts with file from package mysql-4.1.20-2.RHEL4.1
file /usr/share/mysql/charsets/armscii8.xml from install of mysql-libs-5.0.46-1.el4.centos conflicts with file from package mysql-4.1.20-2.RHEL4.1
file /usr/share/mysql/charsets/ascii.xml from install of mysql-libs-5.0.46-1.el4.centos conflicts with file from package mysql-4.1.20-2.RHEL4.1
file /usr/share/mysql/charsets/cp1250.xml from install of mysql-libs-5.0.46-1.el4.centos conflicts with file from package mysql-4.1.20-2.RHEL4.1
file /usr/share/mysql/charsets/cp1251.xml from install of mysql-libs-5.0.46-1.el4.centos conflicts with file from package mysql-4.1.20-2.RHEL4.1
file /usr/share/mysql/charsets/cp1256.xml from install of mysql-libs-5.0.46-1.el4.centos conflicts with file from package mysql-4.1.20-2.RHEL4.1
file /usr/share/mysql/charsets/cp1257.xml from install of mysql-libs-5.0.46-1.el4.centos conflicts with file from package mysql-4.1.20-2.RHEL4.1
file /usr/share/mysql/charsets/cp850.xml from install of mysql-libs-5.0.46-1.el4.centos conflicts with file from package mysql-4.1.20-2.RHEL4.1
file /usr/share/mysql/charsets/cp852.xml from install of mysql-libs-5.0.46-1.el4.centos conflicts with file from package mysql-4.1.20-2.RHEL4.1
file /usr/share/mysql/charsets/cp866.xml from install of mysql-libs-5.0.46-1.el4.centos conflicts with file from package mysql-4.1.20-2.RHEL4.1
file /usr/share/mysql/charsets/dec8.xml from install of mysql-libs-5.0.46-1.el4.centos conflicts with file from package mysql-4.1.20-2.RHEL4.1
file /usr/share/mysql/charsets/geostd8.xml from install of mysql-libs-5.0.46-1.el4.centos conflicts with file from package mysql-4.1.20-2.RHEL4.1
file /usr/share/mysql/charsets/greek.xml from install of mysql-libs-5.0.46-1.el4.centos conflicts with file from package mysql-4.1.20-2.RHEL4.1
file /usr/share/mysql/charsets/hebrew.xml from install of mysql-libs-5.0.46-1.el4.centos conflicts with file from package mysql-4.1.20-2.RHEL4.1
file /usr/share/mysql/charsets/hp8.xml from install of mysql-libs-5.0.46-1.el4.centos conflicts with file from package mysql-4.1.20-2.RHEL4.1
file /usr/share/mysql/charsets/keybcs2.xml from install of mysql-libs-5.0.46-1.el4.centos conflicts with file from package mysql-4.1.20-2.RHEL4.1
file /usr/share/mysql/charsets/koi8r.xml from install of mysql-libs-5.0.46-1.el4.centos conflicts with file from package mysql-4.1.20-2.RHEL4.1
file /usr/share/mysql/charsets/koi8u.xml from install of mysql-libs-5.0.46-1.el4.centos conflicts with file from package mysql-4.1.20-2.RHEL4.1
file /usr/share/mysql/charsets/latin1.xml from install of mysql-libs-5.0.46-1.el4.centos conflicts with file from package mysql-4.1.20-2.RHEL4.1
file /usr/share/mysql/charsets/latin2.xml from install of mysql-libs-5.0.46-1.el4.centos conflicts with file from package mysql-4.1.20-2.RHEL4.1
file /usr/share/mysql/charsets/latin5.xml from install of mysql-libs-5.0.46-1.el4.centos conflicts with file from package mysql-4.1.20-2.RHEL4.1
file /usr/share/mysql/charsets/latin7.xml from install of mysql-libs-5.0.46-1.el4.centos conflicts with file from package mysql-4.1.20-2.RHEL4.1
file /usr/share/mysql/charsets/macce.xml from install of mysql-libs-5.0.46-1.el4.centos conflicts with file from package mysql-4.1.20-2.RHEL4.1
file /usr/share/mysql/charsets/macroman.xml from install of mysql-libs-5.0.46-1.el4.centos conflicts with file from package mysql-4.1.20-2.RHEL4.1
file /usr/share/mysql/charsets/swe7.xml from install of mysql-libs-5.0.46-1.el4.centos conflicts with file from package mysql-4.1.20-2.RHEL4.1
file /usr/share/mysql/czech/errmsg.sys from install of mysql-libs-5.0.46-1.el4.centos conflicts with file from package mysql-4.1.20-2.RHEL4.1
file /usr/share/mysql/danish/errmsg.sys from install of mysql-libs-5.0.46-1.el4.centos conflicts with file from package mysql-4.1.20-2.RHEL4.1
file /usr/share/mysql/dutch/errmsg.sys from install of mysql-libs-5.0.46-1.el4.centos conflicts with file from package mysql-4.1.20-2.RHEL4.1
file /usr/share/mysql/english/errmsg.sys from install of mysql-libs-5.0.46-1.el4.centos conflicts with file from package mysql-4.1.20-2.RHEL4.1
file /usr/share/mysql/estonian/errmsg.sys from install of mysql-libs-5.0.46-1.el4.centos conflicts with file from package mysql-4.1.20-2.RHEL4.1
file /usr/share/mysql/french/errmsg.sys from install of mysql-libs-5.0.46-1.el4.centos conflicts with file from package mysql-4.1.20-2.RHEL4.1
file /usr/share/mysql/german/errmsg.sys from install of mysql-libs-5.0.46-1.el4.centos conflicts with file from package mysql-4.1.20-2.RHEL4.1
file /usr/share/mysql/greek/errmsg.sys from install of mysql-libs-5.0.46-1.el4.centos conflicts with file from package mysql-4.1.20-2.RHEL4.1
file /usr/share/mysql/hungarian/errmsg.sys from install of mysql-libs-5.0.46-1.el4.centos conflicts with file from package mysql-4.1.20-2.RHEL4.1
file /usr/share/mysql/italian/errmsg.sys from install of mysql-libs-5.0.46-1.el4.centos conflicts with file from package mysql-4.1.20-2.RHEL4.1
file /usr/share/mysql/japanese/errmsg.sys from install of mysql-libs-5.0.46-1.el4.centos conflicts with file from package mysql-4.1.20-2.RHEL4.1
file /usr/share/mysql/korean/errmsg.sys from install of mysql-libs-5.0.46-1.el4.centos conflicts with file from package mysql-4.1.20-2.RHEL4.1
file /usr/share/mysql/norwegian-ny/errmsg.sys from install of mysql-libs-5.0.46-1.el4.centos conflicts with file from package mysql-4.1.20-2.RHEL4.1
file /usr/share/mysql/norwegian/errmsg.sys from install of mysql-libs-5.0.46-1.el4.centos conflicts with file from package mysql-4.1.20-2.RHEL4.1
file /usr/share/mysql/polish/errmsg.sys from install of mysql-libs-5.0.46-1.el4.centos conflicts with file from package mysql-4.1.20-2.RHEL4.1
file /usr/share/mysql/portuguese/errmsg.sys from install of mysql-libs-5.0.46-1.el4.centos conflicts with file from package mysql-4.1.20-2.RHEL4.1
file /usr/share/mysql/romanian/errmsg.sys from install of mysql-libs-5.0.46-1.el4.centos conflicts with file from package mysql-4.1.20-2.RHEL4.1
file /usr/share/mysql/russian/errmsg.sys from install of mysql-libs-5.0.46-1.el4.centos conflicts with file from package mysql-4.1.20-2.RHEL4.1
file /usr/share/mysql/serbian/errmsg.sys from install of mysql-libs-5.0.46-1.el4.centos conflicts with file from package mysql-4.1.20-2.RHEL4.1
file /usr/share/mysql/slovak/errmsg.sys from install of mysql-libs-5.0.46-1.el4.centos conflicts with file from package mysql-4.1.20-2.RHEL4.1
file /usr/share/mysql/spanish/errmsg.sys from install of mysql-libs-5.0.46-1.el4.centos conflicts with file from package mysql-4.1.20-2.RHEL4.1
file /usr/share/mysql/swedish/errmsg.sys from install of mysql-libs-5.0.46-1.el4.centos conflicts with file from package mysql-4.1.20-2.RHEL4.1
file /usr/share/mysql/ukrainian/errmsg.sys from install of mysql-libs-5.0.46-1.el4.centos conflicts with file from package mysql-4.1.20-2.RHEL4.1
file /usr/bin/msql2mysql from install of mysql-5.0.46-1.el4.centos conflicts with file from package mysql-4.1.20-2.RHEL4.1
file /usr/bin/mysql_find_rows from install of mysql-5.0.46-1.el4.centos conflicts with file from package mysql-4.1.20-2.RHEL4.1
file /usr/bin/mysql_tableinfo from install of mysql-5.0.46-1.el4.centos conflicts with file from package mysql-4.1.20-2.RHEL4.1
file /usr/bin/mysqlaccess from install of mysql-5.0.46-1.el4.centos conflicts with file from package mysql-4.1.20-2.RHEL4.1
file /usr/share/info/mysql.info.gz from install of mysql-5.0.46-1.el4.centos conflicts with file from package mysql-4.1.20-2.RHEL4.1
file /usr/share/man/man1/mysql.1.gz from install of mysql-5.0.46-1.el4.centos conflicts with file from package mysql-4.1.20-2.RHEL4.1
file /usr/share/man/man1/mysqlaccess.1.gz from install of mysql-5.0.46-1.el4.centos conflicts with file from package mysql-4.1.20-2.RHEL4.1
file /usr/share/man/man1/mysqladmin.1.gz from install of mysql-5.0.46-1.el4.centos conflicts with file from package mysql-4.1.20-2.RHEL4.1
file /usr/share/man/man1/mysqldump.1.gz from install of mysql-5.0.46-1.el4.centos conflicts with file from package mysql-4.1.20-2.RHEL4.1
file /usr/share/man/man1/mysqlshow.1.gz from install of mysql-5.0.46-1.el4.centos conflicts with file from package mysql-4.1.20-2.RHEL4.1

Are there any switches I need to add to get around this?

Thanks.

Evelio
Posts: 1
Joined: 2008/03/08 09:07:43
Contact:

Re: Upgrading PHP4 to PHP5 on CentOS the smooth way

Post by Evelio » 2008/03/08 09:14:25

As per ur post:

PHP4 was upgraded to PHP5 from the CentOS plus repository. To use this repo, edit:

/etc/yum.repos.d/Centos-base.repo

and in the CentOS plus section change

enabled=0

to

enabled=1

Then run:

yum update php*

So far so good.. worked great But......

Now, to enable mysql support simply change the following files:

/etc/my.cnf.rpmnew
to
/etc/my.cnf

and

/etc/php.ini.rpmnew
to
/etc/php.ini

using vi, mc, nano or whatever you prefer.

What do u mean change the files using Vim?? Do you mean rename those files?? I dont have the files in my system.

Please tell me what you mean :-?

hackerdiabolico
Posts: 1
Joined: 2009/08/04 14:52:02
Contact:

Re: Upgrading PHP4 to PHP5 on CentOS the smooth way

Post by hackerdiabolico » 2009/08/04 14:54:18

But what if I updated to php5 and I NEED to have domxml? Is there a way to install it on the centos build of php5?

firebus
Posts: 2
Joined: 2009/09/08 21:49:05

Re: Upgrading PHP4 to PHP5 on CentOS the smooth way

Post by firebus » 2009/10/21 21:05:27

[quote]
hackerdiabolico wrote:
But what if I updated to php5 and I NEED to have domxml? Is there a way to install it on the centos build of php5?[/quote]

try installing php-xml from the centosplus repo - it might provide the functionality you're looking for

Post Reply

Return to “CentOS 4 - Server Support”