Just to be honest, this PHP 5.3 upgrade/update has been made painless by the GREAT folks at IUS Community Repo! The real magic is their repository setup and rather helpful "yum-plugin-replace" yum plugin. I have not seen any problem with this update path at all. My needs may be different than yours, so YMMV. This post is adapted from a previous post that focused on another program that just needed a PHP > 5.2 installed.
You must be the root user to execute all the stated commands.
wget http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/i386/ius-release-1.0-8.ius.el5.noarch.rpm
wget http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/i386/epel-release-5-4.noarch.rpm
rpm -Uhv ius-release-1.0-8.ius.el5.noarch.rpm epel-release-5-4.noarch.rpm
yum install yum-plugin-replace
yum replace php --replace-with php53
yum search php53
service httpd restart
service mysqld restart
service postgresql restart
Sweet. Should i be logged in a root for this. And what do i need the current directory to be when I rum these commands. sry for the newb q's.
ReplyDeleteYes, you need to be the root user to run the commands. The current directory does not matter. I have added the root user note. Thank you for your comment!
ReplyDeletehi,
ReplyDeleteGot error on:
yum replace php --replace-width php53
no package matching php53
Any ideas?
thx
Please check the note at the top regarding the 5.6 update. There is a slight name change for the php53 to php53u package.
ReplyDeleteI'm getting the following error when running "yum replace php --replace-with php53". What should I do?
ReplyDeleteReplacing packages takes time, please be patient...
WARNING: Unable to resolve all providers: ['config(php-common)', 'dbase.so()(64bit)', 'php-dbase', 'php-pcntl', 'php-readline', 'config(php)', 'config(php-devel)', 'config(php-fpm)', 'config(php-pdo)', 'config(php-mysql)', 'config(php-mbstring)', 'config(php-soap)', 'config(php-ncurses)', 'ncurses.so()(64bit)', 'php-ncurses', 'config(php-gd)', 'config(php-mcrypt)', 'config(php-mhash)', 'mhash.so()(64bit)', 'php-mhash']
This may be normal depending on the package. Continue? [y/N] n
First, please check the note at the top regarding the 5.6 update. There is a slight name change for the php53 to php53u package.
ReplyDeletei'm using centos 5.5 and also i get
ReplyDeleteWARNING: Unable to resolve all providers: ['config(php-common)', 'dbase.so()(64bit)', 'php-dbase', 'php-mime_magic', 'config(php-pdo)', 'config(php-odbc)', 'config(php-mysql)', 'config(php-gd)', 'config(php-xmlrpc)', 'php-xmlrpc', 'config(php-mbstring)', 'config(php-xml)', 'config(php-snmp)', 'config(php-pgsql)', 'config(php-imap)', 'php-pcntl', 'config(php)']
would be okay to press Y ?
thanks
Thanks very much. Painless is hard for me to achieve as a n00b when working on my server so I really appreciate your generosity and time.
ReplyDeleteWorked like a charm. Thanks.
ReplyDeleteIncredibly helpful, thank you -- dealing with a client still using RHEL. Couple of updates/notes for others, since the packages have moved on the IUS site. The two RPMs you need are here now:
ReplyDeletehttp://dl.iuscommunity.org/pub/ius/stable/Redhat/5/i386/ius-release-1.0-8.ius.el5.noarch.rpm
http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/i386/epel-release-5-4.noarch.rpm
Thank you very much Ken! Your corrections are appreciated and done.
ReplyDeleteHi:
ReplyDeleteI updated PHP to 5.3.3 from the Plesk admin control panel. No problem and new version showing correctly - however, I had to remove Mcrypt before the update could proceed.
I must have Mcrypt but came up with the php-common conflict when trying to install Mcrypt.
It seems the PHP53u replacement is the solution but is there a way of doing it without removing all the PSA packages as mentioned in the last post?
I get an error
ReplyDeleteCommand line error: no such option: --replace-with
I get the same error as boris
ReplyDeleteThe "--replace-with" option is part of the "yum install yum-plugin-replace" step. That package is from the IUS repository. Please make sure you have executed that line and/or that "rpm -q yum-plugin-replace" produces a package result.
ReplyDeleteHi, Running yum replace, when it gets to checking dependencies, it gives this error:
ReplyDeleteRunning rpm_check_debug
ERROR with rpm_check_debug vs depsolve:
php is needed by (installed) zend-optimizer-3.3.3-3.i386
Can you please help?
Thanks
You may need to temporarily remove zend-optimizer for the php upgrade. You should be able re-install after.
ReplyDeleteHi, I've run the command yum replace php --replace-with php53u
ReplyDeleteI get the following warning
WARNING: Unable to resolve all providers: ['config(php-common)', 'dbase.so()(64bit)', 'php-dbase', 'php-mime_magic', 'php-pcntl', 'config(php)', 'config(php-pdo)', 'config(php-mysql)', 'config(php-gd)']
If I say Y will this cause problems with stuff thats already working?
I am running centos5.5 64bit