[SOLVED] Centos 5.6 - updating from PHP 5.1.6 to PHP 5.3

Issues related to software problems.
igorb
Posts: 4
Joined: 2011/04/09 12:52:10
Location: Rotterdam, Netherlands
Contact:

[SOLVED] Centos 5.6 - updating from PHP 5.1.6 to PHP 5.3

Post by igorb » 2011/04/09 13:10:02

I've just updated my Linux VPS succesfully from Centos 5.5 to 5.6
An important step for me is to upgrade from PHP 5.1.6 to PHP 5.3

"rpm -q centos-release" returns "centos-release-5-6.el5.centos.1". Looks good!

Next step, update PHP using "yum update php", this returned "No packages marked for Update"
"Yum list php" returns "php.i386" - "5.1.6-27.el5_5.3". Looks like 5.1.6 is still installed.

Ok, try out "yum update php53", this returned "Package(s) php53 available, but not installed".
Let's install it then! "yum install php53" returns:

--> Running transaction check
---> Package php53.i386 0:5.3.3-1.el5_6.1 set to be updated
--> Processing Dependency: php53-cli = 5.3.3-1.el5_6.1 for package: php53
--> Processing Dependency: php53-common = 5.3.3-1.el5_6.1 for package: php53
--> Running transaction check
---> Package php53-cli.i386 0:5.3.3-1.el5_6.1 set to be updated
---> Package php53-common.i386 0:5.3.3-1.el5_6.1 set to be updated
--> Processing Conflict: php53-common conflicts php-common
--> Finished Dependency Resolution php53-common-5.3.3-1.el5_6.1.i386 from updates has depsolving problems
--> php53-common conflicts with php-common
Error: php53-common conflicts with php-common
You could try using --skip-broken to work around the problem
You could try running: package-cleanup --problems
package-cleanup --dupes
rpm -Va --nofiles --nodigest

Seems like there is a conflict with php-common, probably the already installed PHP 5.1.6.

As many folks (and I) want to upgrade to PHP 5.3 in the next few days, I hope we can kickstart this topic with a good procedure for us somewhat less experienced users. Thank you in advance!

addw
Posts: 32
Joined: 2005/10/23 14:11:29
Location: England
Contact:

[SOLVED] Centos 5.6 - updating from PHP 5.1.6 to PHP 5.3

Post by addw » 2011/04/09 13:41:41

The trouble is that the php53 RPMs provide php53 and NOT php. This causes all sorts of problems.

I uninstalled all sorts of stuff, thinking that I could just install again later: php-cli php-pdo php-soap php-mcrypt php-odbc php-common php-ldap php php-gd php-mbstring php-mysql php-xml php-devel php-pear php-pear-db squirrelmail nagios UpdateBrowsCap php-PHlib piranha php-pear-Mail-Mime php-pear-Net-URL php-pear-HTTP-Request php-pear-MDB2 php-pear-Log php-pear-Net-Socket nagios-nsca (a couple of those are my own RPMs)

I then can't install things like squirrelmail since they need php.

This is a CentOS supplied set of packages so it should be easy for them to fix. They need to provide php as well as php53 capabilities.

Look at [url=http://mirror.centos.org/centos/5.6/updates/SRPMS/php53-5.3.3-1.el5_6.1.src.rpm]Centos source for php53[/url]

In [font=Courier]php53.spec[/font] the provides line is:
[font=Courier]Provides: mod_php = %{version}-%{release}[/font]
But I think that it also needs:
[font=Courier]Provides: php = %{version}-%{release}[/font]

Although if they do that then anyone with PHP installed who does
[font=Courier]yum update[/font]
might get updated to PHP5.3 automatically -- which they might not want, hmmmmm

wolfy
QA Team
Posts: 80
Joined: 2008/02/09 19:40:31
Location: Bucharest, Romania
Contact:

Re: Centos 5.6 - updating from PHP 5.1.6 to PHP 5.3

Post by wolfy » 2011/04/09 13:57:24

[quote]
addw wrote:
The trouble is that the php53 RPMs provide php53 and NOT php. This causes all sorts of problems.

I uninstalled all sorts of stuff, thinking that I could just install again later: php-cli php-pdo php-soap php-mcrypt php-odbc php-common php-ldap php php-gd php-mbstring php-mysql php-xml php-devel php-pear php-pear-db squirrelmail nagios UpdateBrowsCap php-PHlib piranha php-pear-Mail-Mime php-pear-Net-URL php-pear-HTTP-Request php-pear-MDB2 php-pear-Log php-pear-Net-Socket nagios-nsca (a couple of those are my own RPMs)

I then can't install things like squirrelmail since they need php.

This is a CentOS supplied set of packages so it should be easy for them to fix. They need to provide php as well as php53 capabilities.
[/quote]

Feel free to raise your concerns via http://bugzilla.redhat.com . EVERYTHING shipped by the CentOS project in the base and updates repositories respects bug per bug the packages shipped by the upstream commercial vendor.
But before doing that, read their release notes first. You can start at http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5/html/5.6_Release_Notes/ar01s04.html



[quote]
Where are the centos 5.6 source RPMs ?[/quote]

As always, they will be made available in the same place as the binaries are, but below the SRPMS directory. They were delayed in order to minimize the impact of the new release on mirrors.

addw
Posts: 32
Joined: 2005/10/23 14:11:29
Location: England
Contact:

Re: Centos 5.6 - updating from PHP 5.1.6 to PHP 5.3

Post by addw » 2011/04/09 14:14:02

If you look at [url=https://bugzilla.redhat.com/show_bug.cgi?id=673521]Redhat bugzilla[/url] this has been a [b]high[/b] severity bug since 28 January.
Given that it has taken that long I suspect that fixing it is harder than we think.

I might make myself a small RPM that provides php - that way I will be able to install the other stuff that I need.
A bad bodge, but if anyone has a better idea -- please let me know.

It is more than just pear, but the other packages that depend on php (like some of my own stuff).

wolfy
QA Team
Posts: 80
Joined: 2008/02/09 19:40:31
Location: Bucharest, Romania
Contact:

Re: Centos 5.6 - updating from PHP 5.1.6 to PHP 5.3

Post by wolfy » 2011/04/09 14:35:59

[quote]
addw wrote:
If you look at [url=https://bugzilla.redhat.com/show_bug.cgi?id=673521]Redhat bugzilla[/url] this has been a [b]high[/b] severity bug since 28 January.
Given that it has taken that long I suspect that fixing it is harder than we think.

I might make myself a small RPM that provides php - that way I will be able to install the other stuff that I need.
A bad bodge, but if anyone has a better idea -- please let me know.

It is more than just pear, but the other packages that depend on php (like some of my own stuff).
[/quote]


I am pretty sure that ALL packages which depend on php ( via all the variants of Requires: php and/or soname ) will ( or already do ) have issues. First because of the different name and second because php 5.3 is not fully compatible with php 5.1

Assuming that your company policy allows that, rather than creating your own rpm you'd better use the stack provided by the IUS repository.

addw
Posts: 32
Joined: 2005/10/23 14:11:29
Location: England
Contact:

Re: Centos 5.6 - updating from PHP 5.1.6 to PHP 5.3

Post by addw » 2011/04/09 14:44:13

[quote]
php 5.3 is not fully compatible with php 5.1
[/quote]
It is close enough compatible, and any things that did not work could be fixed easily enough. Yes: it is something that we would be happy to do - it be using the latest version of PHP -- there are some nasties in PHP 5.1, but I also need PHP-PEAR, yes you do get warnings out of some of pear, but those are mainly due to the change between PHP 4 & PHP 5.

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: Centos 5.6 - updating from PHP 5.1.6 to PHP 5.3

Post by pschaff » 2011/04/09 14:49:56

[quote]
addw wrote:
...
I might make myself a small RPM that provides php - that way I will be able to install the other stuff that I need.
[/quote]
That won't work as php53 conflicts with php, and because packages such as squirrelmail will not work with php53; can't speak to yours.

See [url=http://bugs.centos.org/view.php?id=4792]CentOS bug #4792: squirrelmail conflicts with php53[/url]. If you need php-5.3 and squirrelmail then waiting for CentOS-6 (or trying SL6) and using the one from EPEL may be the best bet.

addw
Posts: 32
Joined: 2005/10/23 14:11:29
Location: England
Contact:

Re: Centos 5.6 - updating from PHP 5.1.6 to PHP 5.3

Post by addw » 2011/04/09 16:04:10

That is exactly what my RPM would do. It would DEPEND on php53 and PROVIDE php (and prob a coupe of other dependencies and provides).

The reason why squirrelmail conflicts is because of a packaging issue, not a technical issue (ie scripting/... issue). There are many more packages than
squirrelmail that depend on php -- eg nagios.

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: Centos 5.6 - updating from PHP 5.1.6 to PHP 5.3

Post by pschaff » 2011/04/10 00:06:54

[quote]
addw wrote:
That is exactly what my RPM would do. It would DEPEND on php53 and PROVIDE php[/quote]
But php53 conflicts with php. [url=http://en.wikipedia.org/wiki/Catch-22]Catch-22[/url].

igorb
Posts: 4
Joined: 2011/04/09 12:52:10
Location: Rotterdam, Netherlands
Contact:

Re: Centos 5.6 - updating from PHP 5.1.6 to PHP 5.3

Post by igorb » 2011/04/10 19:02:35

[quote]A quote from pschaff from another topic:
Key word "replacement". If you want to replace php with this new and rather incompatible version you must first remove all the old php packages - not recommended unless you need php-5.3.[/quote]

In my case I really need 5.3 in order to run Magento (ecommerce platform).
After some browsing I've found following [url=http://www.how2centos.com/installing-php-5-3-3-on-centos-5-5-tutorial/]tutorial[/url]. Would this be useful?

> service httpd stop
Remove previously installed version of PHP:
> yum remove php php-*

Install PHP 5.3 (looks weird, note the "u" in php53u)
> yum install yum install php53u-pear php53u php53u-cli php53u-common php53u-devel php53u-gd php53u-mbstring php53u-mcrypt php53u-mysql php53u-pdo php53u-soap php53u-xml php53u-xmlrpc php53u-bcmath php53u-pecl-apc php53u-pecl-memcache php53u-snmp

> chkconfig httpd on
> service httpd start

Anyone here familiar with this approach?

Post Reply

Return to “CentOS 5 - Software Support”