On the current stack i hv centos 6.5 (64 bit) , PHP 5.3 available.

I'm a linux new bee & need to perform php upgrade to PHP 5.5.

Tried following but that returned error:

wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm

then under remi-php55 section ( in /etc/yum.repos.d/remi.repo)
enabled=1 then yum clean all
yum update -y

This returned error as pasted in following pastebin http://pastebin.com/ehuHibhy

and php did not upgraded , any workaround how to achieve this?

Edit 1:

Enabling the remi repo alongwith remi-php55 resulted in stripping php repo errors.

Updated trace: http://pastebin.com/J8sN5Z9Z

However, PHP Version isn't yet upgraded.


You enabled the remi-php55 repo, but that depends on the remi repo also being enabled. You need to enable this as well.

| improve this answer | |
  • cool, so doing that reduced the errors to this pastebin.com/J8sN5Z9Z (removing php errors , and now only perl repo errors are shown) – echoashu Mar 16 '15 at 14:19
  • Well that's a whole separate issue. – Michael Hampton Mar 16 '15 at 14:21
  • but that didn't upgraded the php version yet – echoashu Mar 16 '15 at 14:22
  • You didn't do what it told you to do! – Michael Hampton Mar 16 '15 at 14:25
  • Thank you very much. so i skipped the perl dependency and the php version is upgraded. I was able to login to zpanel as well :) However there were warning regarding Php Modules - unable to initialize (module api mismatch) pastebin.com/BZ4TKJpp – echoashu Mar 16 '15 at 14:39

You really shouldn't be trying to upgrade individual components like this when you've got cPanel or Plesk installed. They control all aspects of the server and you should be upgrading PHP the way they support.

| improve this answer | |
  • Zpanel is there, but it dosn't hv any option to upgrade the php from inside it. – echoashu Mar 16 '15 at 13:16
  • Can you paste the output of yum list '*php*'? – GregL Mar 16 '15 at 13:21
  • pastebin link of output pastebin.com/ihCXGUcH – echoashu Mar 16 '15 at 13:37

If you can limit yourself at PHP 5.4, you can use the "software collection (SCL)" repository. This report will sideload newer package version (eg: php54) that you can use on process-by-process base.

In short:

  1. enable SCL repo

yum install -y centos-release-SCL.x86_64
yum install -y php54.x86_64 php54-php-mysqlnd

  1. create a PHP wrapper script in /var/www/cgi-bin/php54-wrapper

    #!/bin/bash source /opt/rh/php54/enable exec php-cgi

  2. give appropriate permission to the wrapper script

restorecon -RF /var/www/cgi-bin/php54-wrapper
chown apache:apache /var/www/cgi-bin/php54-wrapper
chmod ugo-rwx /var/www/cgi-bin/php54-wrapper
chmod ug+rx /var/www/cgi-bin/php54-wrapper

  1. configure the appropriate virtualhost to use the new php version

    AddHandler php-cgi .php Action php-cgi /cgi-bin/php54-wrapper <Location /> Options +ExecCGI </Location>

| improve this answer | |
  • Thank you for the detailed answer. This could certainly help but as of now, This box needs minimum php5.5 (web app specific requirements) :-) – echoashu Mar 16 '15 at 16:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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