RedHat CentOS PHP 5.3

PHP 5.2 and PHP 5.3 has tons of functionalities which are not provided by PHP 5.1 and PHP 5.1 is the most recent version of PHP available in CentOS 5.1 and RHEL 5.1 via updates. Also, its difficult for people to upgrade OS(s) on production servers frequently and especially if the servers are running absolutely fine, it doesn’t really make sense to upgrade just for the heck of it. One more reason for no upgrades is the OS choices provided by many hosting companies. But a lot of CMS(s) and softwares are now recommending at least PHP 5.2 for an extended feature set.

I tried a lot of repos for CentOS including RPM Fusion, RPM Forge, EPEL etc., but none of them could provide even PHP 5.2. In some corner of my mind, I had a faint idea of Remi Collet publishing updates about Remi repository. Did a quick google search and found out that PHP 5.3 is actually available in the repository :D

So, if you are really in need of PHP5.3 on your CentOS/RHEL 5.1 or lesser, head over to Repository Configuration Page and follow the instructions.

Note: The repository is not enabled on install (enabled=0). You need to enable it in /etc/yum.repos.d/remi.repo.

Once installed and enabled, you can update PHP, MySQL from remi repository using the following command

[root@fedora ~]$ yum update php php-* mysql-*

Warning: Drupal is still not totally compatible with PHP5.3 and if you run Drupal sites, be sure to investigate things before upgrading.


  • del.icio.us
  • Digg
  • Twitter
  • StumbleUpon
  • Reddit

Related Posts

{ 1 trackback }

links for 2010-10-03 | Paul Eye
October 4, 2010 at 1:39 AM

{ 18 comments… read them below or add one }

1 Gilberto Albino October 5, 2009 at 6:13 AM

Is it correct?
/etc/yum.repos.d/remo.repo.

I guess there is a typo.

Reply

2 Kulbir Saini October 5, 2009 at 8:07 AM

Thank you :) Corrected !

Reply

3 Ian M April 9, 2010 at 1:14 PM

Some of your URLs are broken – they’ve got trailing semicolons in them

Reply

4 Ram April 14, 2010 at 6:01 PM

The above link is not working

Reply

5 Eric April 23, 2010 at 11:40 PM

I get this error when I try to install:

Could not retrieve mirrorlist http://mirrors.fedoraproject.org/mirrorlist?repo=epel-5&arch=x86_64 error 404 not found

Cannot find valid baseurl for repo: epel

Reply

6 gfinale September 20, 2010 at 7:37 AM

I would suggest the CentOS and RH teams need to wake up. Kind of a major here that the version they provide is 2-3 years old and that more and more programs are in need of a newer version!

Reply

7 Nux October 26, 2010 at 11:27 AM

gfinale, you fail to understand what Enterprise Linux is all about.

Reply

8 Karthik March 7, 2011 at 3:39 PM

your repos really helped me

Reply

9 Anggi October 5, 2010 at 4:03 AM

thank you for apache installing guide.

Reply

10 Jason November 21, 2010 at 10:01 AM

Whenever I run yum update php php-* mysql-* I get the following errors, please help!:


--> Finished Dependency Resolution
php-ncurses-5.1.6-24.el5_4.5.i386 from installed has depsolving problems
--> Missing Dependency: php-common = 5.1.6-24.el5_4.5 is needed by package php-ncurses-5.1.6-24.el5_4.5.i386 (installed)
MySQL-python-1.2.1-1.i386 from installed has depsolving problems
--> Missing Dependency: libmysqlclient_r.so.15(libmysqlclient_15) is needed by package MySQL-python-1.2.1-1.i386 (installed)
perl-DBD-MySQL-3.0007-2.el5.i386 from installed has depsolving problems
--> Missing Dependency: libmysqlclient.so.15(libmysqlclient_15) is needed by package perl-DBD-MySQL-3.0007-2.el5.i386 (installed)
1:mod_auth_mysql-3.0.0-3.2.el5_3.i386 from installed has depsolving problems
--> Missing Dependency: libmysqlclient.so.15 is needed by package 1:mod_auth_mysql-3.0.0-3.2.el5_3.i386 (installed)
MySQL-python-1.2.1-1.i386 from installed has depsolving problems
--> Missing Dependency: libmysqlclient_r.so.15 is needed by package MySQL-python-1.2.1-1.i386 (installed)
1:mod_auth_mysql-3.0.0-3.2.el5_3.i386 from installed has depsolving problems
--> Missing Dependency: libmysqlclient.so.15(libmysqlclient_15) is needed by package 1:mod_auth_mysql-3.0.0-3.2.el5_3.i386 (installed)
perl-DBD-MySQL-3.0007-2.el5.i386 from installed has depsolving problems
--> Missing Dependency: libmysqlclient.so.15 is needed by package perl-DBD-MySQL-3.0007-2.el5.i386 (installed)
Error: Missing Dependency: php-common = 5.1.6-24.el5_4.5 is needed by package php-ncurses-5.1.6-24.el5_4.5.i386 (installed)
Error: Missing Dependency: libmysqlclient.so.15 is needed by package perl-DBD-MySQL-3.0007-2.el5.i386 (installed)
Error: Missing Dependency: libmysqlclient.so.15 is needed by package 1:mod_auth_mysql-3.0.0-3.2.el5_3.i386 (installed)
Error: Missing Dependency: libmysqlclient.so.15(libmysqlclient_15) is needed by package perl-DBD-MySQL-3.0007-2.el5.i386 (installed)
Error: Missing Dependency: libmysqlclient_r.so.15 is needed by package MySQL-python-1.2.1-1.i386 (installed)
Error: Missing Dependency: libmysqlclient.so.15(libmysqlclient_15) is needed by package 1:mod_auth_mysql-3.0.0-3.2.el5_3.i386 (installed)
Error: Missing Dependency: libmysqlclient_r.so.15(libmysqlclient_15) is needed by package MySQL-python-1.2.1-1.i386 (installed)

What can I do to get php 5.3?

Reply

11 Jason November 21, 2010 at 10:19 AM

Fixed my own problems. I had to remove php-ncurses which was outdated and no longer needed

Reply

12 haberler November 29, 2010 at 11:30 AM

when i type to command prompt “yum –enablerepo=remi install mysql-libs mysql.x86_64 mysql-devel.x86_64 mysql-server php-mysql”

i saw this errors:

file /usr/share/mysql/estonian/errmsg.sys from install of mysql-libs-5.1.53-16
file /usr/share/mysql/french/errmsg.sys from install of mysql-libs-5.1.53-1.e6
file /usr/share/mysql/german/errmsg.sys from install of mysql-libs-5.1.53-1.e6
file /usr/share/mysql/greek/errmsg.sys from install of mysql-libs-5.1.53-1.el6
file /usr/share/mysql/hungarian/errmsg.sys from install of mysql-libs-5.1.53-6
file /usr/share/mysql/italian/errmsg.sys from install of mysql-libs-5.1.53-1.6
file /usr/share/mysql/japanese/errmsg.sys from install of mysql-libs-5.1.53-16
file /usr/share/mysql/korean/errmsg.sys from install of mysql-libs-5.1.53-1.e6
file /usr/share/mysql/norwegian-ny/errmsg.sys from install of mysql-libs-5.1.6
file /usr/share/mysql/norwegian/errmsg.sys from install of mysql-libs-5.1.53-6
file /usr/share/mysql/polish/errmsg.sys from install of mysql-libs-5.1.53-1.e6
file /usr/share/mysql/portuguese/errmsg.sys from install of mysql-libs-5.1.536
file /usr/share/mysql/romanian/errmsg.sys from install of mysql-libs-5.1.53-16
file /usr/share/mysql/russian/errmsg.sys from install of mysql-libs-5.1.53-1.6
file /usr/share/mysql/serbian/errmsg.sys from install of mysql-libs-5.1.53-1.6
file /usr/share/mysql/slovak/errmsg.sys from install of mysql-libs-5.1.53-1.e6
file /usr/share/mysql/spanish/errmsg.sys from install of mysql-libs-5.1.53-1.6
file /usr/share/mysql/swedish/errmsg.sys from install of mysql-libs-5.1.53-1.6
file /usr/share/mysql/ukrainian/errmsg.sys from install of mysql-libs-5.1.53-6

any solutions ?

Reply

13 Rajesh Kanuri December 14, 2010 at 9:28 PM

how to install php 5.2.8 using yum?

Reply

14 tim December 14, 2010 at 11:34 PM

A howto for upgrading to php 5.2 on Centos 5:
http://forums.quantact.com/viewtopic.php?f=29&t=1166

Reply

15 Mayur Pipaliya February 17, 2011 at 11:37 PM


$ php -v
$ rpm -qa |grep php
$ wget http://dev.centos.org/centos/5/CentOS-Testing.repo --output-document=/etc/yum.repos.d/CentOS-Testing.repo
$ fo0=/etc/yum.repos.d/CentOS-Testing.repo
$ mv $fo0 $fo0.old
$ sed 's/enabled=0/enabled=1/g' $fo0.old > $fo0
$ rm -f $fo0.old
$ yum remove php*
$ yum install php53*
$ rpm -qa |grep php
$ php -v

w00t w00t ! :)

Reply

16 Mayur Pipaliya February 18, 2011 at 5:01 AM

FYI: Its php53* and causing conflicts with php 5.2 or older if you don’t care to remove one !

so, better to remove older and get newer one..

$ yum remove php*
$ yum install php53*

via CentOS-Testing repo (:

Reply

17 Giovanni Arteaga March 12, 2011 at 4:45 PM

Great. But how do I get php-mcrypt included on the installation of yum install php53*

Thanks for the tutorial.

Reply

18 Karthik March 7, 2011 at 2:53 PM

I just did the following and it upgraded my VPS from 5.1.6 to 5.3.3

I first removed the existing php by the above method specified by Mayur Pipaliya.

Then I did the following :-

# wget http://dl.nux.ro/rpm/nux-php53.repo --output-document=/etc/yum.repos.d/php53.repo
# yum install php php-mysql php-common php-gd php-mbstring php-mcrypt php-devel php-xml
# php -v

the result was :-
PHP 5.3.3 (cli) (built: Oct 26 2010 17:09:35)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies

Reply

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

Previous post: Memepress Ready to be Translated (Supports Turkish now)

Next post: How To: Save yourself from stupid Tech Support Questions