Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

im trying to upgrade php from 5.1.6 to 5.2.1. When invoking the yum update php i get this message:

--> Finished Dependency Resolution php-eaccelerator-5.1.6_0.9.5.2-4.el5.rf.x86_64 from installed has depsolving problems

--> Missing Dependency: php = 5.1.6 is needed by package php-eaccelerator-5.1.6_0.9.5.2-4.el5.rf.x86_64 (installed) Error: Missing Dependency: php = 5.1.6 is needed by package php-eaccelerator-5.1.6_0.9.5.2-4.el5.rf.x86_64 (installed) 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

The program package-cleanup is found in the yum-utils package.

The message is giving instructions but i really don't know how to proceed. This is a production server and it cannot be down for more than 1 minute.

Thanks for any ideas.

I only needed PHP 5.2.1 for the new json_decode() function. I added this and the upgrade was not longer necessary: http://snipplr.com/view/4964/emulate-php-5-for-backwards-compatibility/

share|improve this question
add comment

2 Answers

The RPMforge repo does not have a version of php-eaccelerator built against php 5.2.1.

In fact 5.1.6 is the latest it has. See http://packages.sw.be/php-eaccelerator/

Your options:

  1. Don't update php.
  2. Try to rebuild the php-eaccelerator RPM against php 5.2.1. If you are not comfortable editing rpm spec files and compiling from source you shouldn't attempt this.
  3. Look for a php-eaccelerator RPM that is build for php 5.2.1 http://www.atoomnet.net/centos_updated_php.php may work but I cannot attest to its quality.

Bigger-picture questions:

  • Why are you upgrading to a version of php that isn't the latest (far from it)? Is that the latest in the CentOS/RHEL repo?
  • Why has your environment been engineered such that this one server cannot be down for more than 1 minute? That's bad.
share|improve this answer
    
i need to update php to have json_decode() support. That is the only actual reason :s –  andufo Dec 16 '10 at 1:07
    
also, i can't have it more than 1 minute down because of the high traffic hehe. –  andufo Dec 16 '10 at 1:08
    
He means why do you have a single point of failure, rather you should have another server ready to take over if one goes down. –  Martin Fjordvald Dec 18 '10 at 22:27
add comment

For PHP 5.1 the json extension is available via pecl. No need to upgrade PHP just for this (although now both PHP 5.1 and 5.2 are end of line)

You need both php-devel and php-pear installed:

yum install php-devel php-pear

then:

pecl install json
echo "extension=json.so" > /etc/php.d/json.ini

Since you've already upgraded PHP however, it may be easiest to either compile eAccelerator yourself (its not available via pecl):

http://eaccelerator.net/wiki/InstallFromSource

or switch to a repository that supplies eAccelerator rpm for the PHP version installed. I provide eaccelerator for PHP 5.3, along with PHP 5.3 itself if you need it. I don't supply eaccelerator for PHP 5.2 though.

http://www.webtatic.com/blog/2009/06/php-530-on-centos-5/

then

yum install php-eaccelerator --enablerepo=webtatic
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.