Bluhalo IT


Installing PHP 5.2.x or 5.3.x on RedHat ES5, CentOS 5, etc

Posted in linux by Simon Green on March 13, 2008
Tags: , , ,

I’ve had to follow this tutorial a few times myself now so decided I should share it with the world.

A few of our applications which make use of SOAP get a Segmentation Fault if run with PHP 5.1.x or lower. We believe this is due to a bug in PHP but can’t be sure, regardless it works fine in PHP 5.2.4 and above.

Problem is, RedHat ES5 does not have support at this time for anything higher than 5.1.6, and we didn’t want to break RPM dependancys etc by installing from source.

To install PHP 5.2.5 (Highest in repository at this time) you can make use of a RPM repository maintained by Remi. He has a repository for each distro, but to save you translating for the ES5 one I’ll give you the commands here. Run the following to get up and running:

wget http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
rpm -Uvh remi-release-5*.rpm epel-release-5*.rpm

You now have the Remi repository on your system, however it is disabled by default. Obviously you don’t want all of your packages been effected by this repository, however to enable it for a specific package, run the following:

yum --enablerepo=remi update php

You should now have the latest PHP5 installed:

# php -v

PHP 5.2.5 (cli) (built: Nov 10 2007 10:52:30)

Copyright (c) 1997-2007 The PHP Group

Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies

Update 12th Aug ’08:
There is now an English page on the Remi site on how to configure repositories for all sorts of distros:

http://blog.famillecollet.com/pages/Config-en


Update 13th June ’09:
The download link for the ES5 package has changed, post updated above.:

http://blog.famillecollet.com/pages/Config-en


Update 9th August ’09:

It would seem this repo has now been upgraded to PHP 5.3.0.

Advertisements

129 Responses to 'Installing PHP 5.2.x or 5.3.x on RedHat ES5, CentOS 5, etc'

Subscribe to comments with RSS or TrackBack to 'Installing PHP 5.2.x or 5.3.x on RedHat ES5, CentOS 5, etc'.

  1. Alex said,

    someusers might need a double hyphen before the enablerepro

    “yum –enablerepo=remi update php”

    I get very far in to the install and I get an error where it says I am missing dependencies. There are about 30 of them, all similar. Any ideas?

    –> Finished Dependency Resolution
    Error: Missing Dependency: httpd-mmn = 20051115 is needed by package php

  2. simonjgreen said,

    What distro are you trying to install on?

  3. Jonny said,

    I followed these instructions (more or less) and upgraded PHP on Centos 5.1 but I now have a few issues. My ioncube module did not load
    Failed loading /usr/local/ioncube/ioncube/ioncube_loader_lin_5.1.so: /usr/local/ioncube/ioncube/ioncube_loader_lin_5.1.so: undefined symbol: zend_unmangle_property_name_ex
    PHP Warning: PHP Startup: mcrypt: Unable to initialize module
    Module compiled with module API=20050922, debug=0, thread-safety=0
    PHP compiled with module API=20060613, debug=0, thread-safety=0
    These options need to match
    in Unknown on line 0

    and rkhunter now complains.
    /usr/local/bin/rkhunter: line 10003: [: -eq: unary operator expected
    /usr/local/bin/rkhunter: line 10006: [: -eq: unary operator expected
    /usr/local/bin/rkhunter: line 10003: [: compiled: integer expression expected
    /usr/local/bin/rkhunter: line 10006: [: compiled: integer expression expected

    Just to let other people know what to expect and if anyone has any solutions I am all ears.

  4. Joey said,

    yum –enablerepo=remi update php
    Setting up Update Process
    Setting up repositories
    epel 100% |=========================| 1.1 kB 00:00
    update 100% |=========================| 951 B 00:00
    remi 100% |=========================| 1.9 kB 00:00
    base 100% |=========================| 1.1 kB 00:00
    addons 100% |=========================| 951 B 00:00
    extras 100% |=========================| 1.1 kB 00:00
    Reading repository metadata in from local files
    primary.xml.gz 100% |=========================| 760 kB 00:00
    epel : ################################################## 2364/2364
    primary.xml.gz 100% |=========================| 25 kB 00:00
    remi : ################################################## 85/85
    Excluding Packages in global exclude list
    Finished
    Could not find update match for php
    No Packages marked for Update/Obsoletion

    Try it, but it said can find update match for php. Any alternative way or suggestions for upgrade?

  5. simonjgreen said,

    Failing this, my other method is to do the lot from source, or alternatively if it’s a non-production server I download XAMPP (http://www.apachefriends.org/en/xampp.html)


  6. Thanks for this useful info! Came in handy when we had developed on PHP 5.2.2 and then our hosting solution came with 5.1.6 and we had used the DateTime class as in the core in 5.2.x <_<
    Just in case you need to remove the updated version for support reasons or if there is an uncaught bug etc, the process for removing the repository and then uninstalling the version from Remi’s repo that I followed was:

    yum –disablerepo=remi
    yum remove php php-cli php-common (It didn’t remove dependencies when uninstalling just php)

    yum install php (Reverts back to PHP version in Red Hat’s repositories)

    Then restart httpd

    This process worked ok for me! 🙂


  7. In fact… the removal an re-installation process can actually be done in just two lines:

    yum –disablerepo=remi remove php php-cl php-common
    yum install php

    Then restart httpd (Apache)

  8. kurapikats said,

    this works for me! without any problems, im using centos5.1
    thanks for the great info. 🙂

  9. Andre Gugliotti said,

    Congratulations to this post.
    It was very helpful to me. I use CentOS 5.1 in our prodution server and I could install PHP 5.2 without problems, in a easy way.
    Thank you!

  10. okelloso said,

    Hallo. I did successfully update to php 5.2.6 on CentOS 5.0. However, php-mcrypt has failed to update. I checked the version of php-mcrypt running on my machine. It is 5.1.x. But it seems incompatible with php 5.2.6 Applications that require the php-mcrypt extension complain that the extension was not loaded. If someone could help me out, please.

    Thanks in advance.

  11. Ravi said,

    to update to PHP5 > on centos 4 distros types this command

    yum –enablerepo=centosplus update php

  12. Russ said,

    php -v
    PHP Warning: PHP Startup: fileinfo: Unable to initialize module
    Module compiled with module API=20050922, debug=0, thread-safety=0
    PHP compiled with module API=20060613, debug=0, thread-safety=0
    These options need to match
    in Unknown on line 0
    PHP Warning: PHP Startup: mcrypt: Unable to initialize module
    Module compiled with module API=20050922, debug=0, thread-safety=0
    PHP compiled with module API=20060613, debug=0, thread-safety=0
    These options need to match
    in Unknown on line 0
    PHP Warning: PHP Startup: memcache: Unable to initialize module
    Module compiled with module API=20050922, debug=0, thread-safety=0
    PHP compiled with module API=20060613, debug=0, thread-safety=0
    These options need to match
    in Unknown on line 0
    PHP 5.2.6 (cli) (built: May 7 2008 00:50:43)
    Copyright (c) 1997-2008 The PHP Group
    Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies

  13. Kevin Sith said,

    I get the exact same problem as, Russ. Is there a fix for this? I really need the use of DateTime() class.

  14. Kyle said,

    Awesome job, thanks for this great info!

  15. Simon Green said,

    Russ/Kevin,

    This could happen if you have already installed optional PHP modules before the Remi ones.

  16. Okello said,

    This was really cool. It helped me a great deal. Thanks alot.

  17. Simon Green said,

    Just updated to add a link to the Remi page on installing repositories
    http://blog.famillecollet.com/pages/Config-en

  18. Juan said,

    Thanks!

    While I wanted to keep 5.2.6, I have an app that only works on 5.1.6 and below… drats.. Had to downgrade but this help out!

  19. rymo said,

    The solution the mcrypt mismatch is to this:
    yum –enablerepo=remi update php-mcrypt

    Cheers.

  20. greenpossum said,

    Thank you very much for this. I have some suspected problems with PHP5.1 and this upgrade tute was just the ticket.

  21. tope said,

    Hi,

    I got this error when updating:

    –> Processing Dependency: any-php-sqlite2 for package: sb-publish
    —> Package libXmu.i386 0:1.0.2-5 set to be updated
    –> Finished Dependency Resolution
    Error: Missing Dependency: any-php-sqlite2 is needed by package sb-publish

    Any clue please?

    Cheers

  22. tope said,

    Sorry, I forgot to add that I am running CentOS 5.2. And I followed this steps:

    wget http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-2.noarch.rpm
    wget http://rpms.famillecollet.com/el5.i386/remi-release-5-4.el5.remi.noarch.rpm
    rpm -Uvh remi-release-5*.rpm epel-release-5*.rpm


  23. […] そうはいっても、我が能力では、システムの整合性を維持しながらソースからのインストール作業は危険極まりない。Web上で、Installing PHP 5.2.x on RedHat ES5, CentOS 5, etcなる記事を見つけた。ここではLe RPM de Remi で維持・公開されているyum repositoryを用いてアップグレードをしている。我がほうも、これに沿って、アップグレード作業を行った。 […]

  24. Saket said,

    Thanks! This worked like a dream!!

    I did need to get rid of a Plesk SiteBuilder dependency, and found the help here”

    http://atomicrocketturtle.com/forum/viewtopic.php?t=1515

    Unfortunately, I’m now getting this message when I do a version check:

    php –version
    Failed loading /usr/lib64/php/modules//php_ioncube_loader_lin_5.1_x86_64.so: /usr/lib64/php/modules//php_ioncube_loader_lin_5.1_x86_64.so: undefined symbol: zend_unmangle_property_name_ex
    PHP 5.2.6 (cli) (built: May 7 2008 01:11:22)
    Copyright (c) 1997-2008 The PHP Group
    Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies

    Hopefully this is just a plesk issue, with sitebuilder…

  25. Lee Forbes said,

    I had a problem with the mcrypt module. Solved it by running this in a terminal.
    yum –enablerepo=remi install php-mcrypt
    complete the instructions then…
    yum install –enable repo=remi install php-devel
    complete instructions and then restart apache or httpd service.

    Thanks for the great original post. Exactly what I was looking for.


  26. […] Change Log.  This presents a problem as CentOS, Fedora and RedHat are still on PHP 5.1.  I found this nice blog entry on enabling a separate repo for PHP 5.2 and I thought I’d replicate the […]

  27. hales said,

    CentOS 5

    Everything went fairly well but then I ran into a similar issue to @Lee Forbes above with both php-mcrypt and mhash.

    php-mcrypt was fine with @Lee Forbes solution but I’m not sure what to do about mhash. Anyone with suggestions?

    Thanks for the great how-to by the way 🙂

    php -v
    PHP Warning: PHP Startup: mhash: Unable to initialize module
    Module compiled with module API=20050922, debug=0, thread-safety=0
    PHP compiled with module API=20060613, debug=0, thread-safety=0
    These options need to match
    in Unknown on line 0
    PHP 5.2.6 (cli) (built: May 7 2008 00:50:43)

  28. razazahr said,

    asaasasas

  29. nexto! said,

    I get this when I try;

    Error: Missing Dependency: rtld(GNU_HASH) is needed by package php
    Error: Missing Dependency: rtld(GNU_HASH) is needed by package php-pdo
    Error: Missing Dependency: rtld(GNU_HASH) is needed by package php-cli
    Error: Missing Dependency: rtld(GNU_HASH) is needed by package php-gd
    Error: Missing Dependency: libpng12.so.0(PNG12_0)(64bit) is needed by package php-gd
    Error: Missing Dependency: rtld(GNU_HASH) is needed by package php-xml
    Error: Missing Dependency: rtld(GNU_HASH) is needed by package php-common
    Error: Missing Dependency: rtld(GNU_HASH) is needed by package php-mysql
    Error: Missing Dependency: rtld(GNU_HASH) is needed by package t1lib
    Error: Missing Dependency: rtld(GNU_HASH) is needed by package sqlite2

    Wow, that’s a lot of missing stuff.


  30. […] is a method to get PHP 5.2.x. Just add a new repository and upgrade php from there. Didn’t want to do that however on my production servers. Also got […]

  31. EstherDG said,

    My hero! thanks so much for this tutorial. Saved me a lot of time and troubles. 🙂

  32. Harsh said,

    In order to upgrade to PHP 5.2.6, I needed to get 2 new yum repositories:
    epel.repo
    remi.repo

    when I do: yum –enablerepo=remi update php,
    yum identifies Package php.i386 0:5.2.6-1.el5.remi set to be updated correctly

    But fails on missing dependencies for these 8 libraries:
    libc.so.6(GLIBC_2.4)
    libssl.so.6
    libcrypto.so.6
    libc-client.so.1
    libpng12.so.0(PNG12_0)
    liblber-2.3.so.0
    httpd-mmn = 20051115
    rtld(GNU_HASH)

    Could you please help? Am I missing something?

  33. Derek said,

    Thank you!! Needed 5.2 in order to run doctrine php ORM


  34. […] Installing PHP 5.2.x on RedHat ES5, CentOS 5, etc […]

  35. Kurt said,

    Hello;

    Thanks for the instructions, but I seem to be having a dependency error.
    Missing Dependency: httpd-mmn = 20020903
    Running Centos 5.2 httpd-2.23-11.el5_2

    Thanks!!

  36. Mathew said,

    This is an outrageously popular article and massively invaluable!
    For the record this is what I had to type on FC6 to ‘get back’ all my extensions. I diffed my php.ini to get that as I had it. All works!

    wget http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-2.noarch.rpm
    wget http://rpms.famillecollet.com/el5.i386/remi-release-5-4.el5.remi.noarch.rpm
    yum remove php-common
    rpm -Uvh remi-release-5*.rpm epel-release-5*.rpm
    yum –enablerepo=remi update php-common
    yum –enablerepo=remi install php
    yum –enablerepo=remi install php-pdo php-mcrypt squirrelmail php-pecl-apc php-xml php-gd php-devel php php-imap php-pgsql php-pear php-soap php-mbstring php-ldap php-mysql php-cli php-pecl-memcache
    cd /etc
    find . -name ‘*.rpmsave’ -print
    diff php.ini php.ini.rpmsave
    vi php.ini
    find . -name ‘*.rpmsave’ -print
    diff php.d/apc.ini.rpmsave php.d/apc.ini
    service httpd restart

  37. Alex said,

    Thank you so much for this note. I’ve put PHP-5.2.6 on all 4 of my CentOS5 installations. I use drupal heavily on one of them, and it decreased the page processing time on most pages to 30-40% of the original times (.4 vs. 1.0s), and on pages that heavily use date functions, <10% of the original time (from 15s to 0.9s). This has made a fantastic difference for me.

  38. Pasdo said,

    wget -q -O – http://www.atomicorp.com/installers/atomic.sh | sh
    yum update php

    if PHP Warning: PHP Startup: mcrypt: Unable to initialize module
    yum install php-mcrypt

  39. Giorgi said,

    Does not help, It does not update, still says 5.1.6

  40. Giorgi said,

    ok, I fixed it, needs

    yum update

    to be run at first.

  41. leif81 said,

    I now get the following error when running php

    $ php
    PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/lib/php/modules/sqlite.so’ – /usr/lib/dbmail/libsqlite.so.0: undefined symbol: trace in Unknown on line 0

  42. gene_wood said,

    If you get the error :

    Could not find update match for php

    when you install as listed above it’s probably because you have the yum-priorities RPM installed. You can determine if this is the case by running :

    rpm -q yum-priorities

    If you do, in order to get remi’s repo to supercede the base repos you’ll need to either up the priority of remi’s repo or merely disable priorities while you’re installing PHP. Here’s how to disable priorities temporarily.

    edit the priorities file :

    sudo vi /etc/yum/pluginconf.d/priorities.conf

    and set “enabled” equal to 0

    [Sat Jan 17 14:32:43 gene_wood@odessa ~ ]$ cat /etc/yum/pluginconf.d/priorities.conf
    [main]
    enabled = 1
    [Sat Jan 17 14:33:44 gene_wood@odessa ~ ]$ sudo vi /etc/yum/pluginconf.d/priorities.conf
    [Sat Jan 17 14:33:56 gene_wood@odessa ~ ]$ cat /etc/yum/pluginconf.d/priorities.conf
    [main]
    enabled = 0

    Once this is done, re-run the yum install command listed on this page and you should have success.

    Here’s the full output of the error that I was getting :

    [Sat Jan 17 14:32:48 gene_wood@odessa ~ ]$ sudo yum –enablerepo=remi update php
    Loading “priorities” plugin
    Loading “fastestmirror” plugin
    Loading mirror speeds from cached hostfile
    * epel: mirrors.kernel.org
    * rpmforge: fr2.rpmfind.net
    * remi: remi.collet.free.fr
    * base: mirror.raystedman.net
    * updates: mirrors.bluehost.com
    * centosplus: mirrors.easynews.com
    * addons: mirrors.bluehost.com
    * extras: mirror.stanford.edu
    586 packages excluded due to repository priority protections
    Setting up Update Process
    Could not find update match for php
    No Packages marked for Update

    More information here : http://wiki.centos.org/PackageManagement/Yum/Priorities

  43. Chris said,

    Hi,
    I’ve just built fedora10 SRPMS for CentOS 5 and published what I did at for anyone that wants to try it. Seems to work fine in my testing.

    http://wiki.opencsta.org/index.php/Centos_5_with_PHP-5.2

  44. dkp1977 said,

    Hey guys,

    First of all: really helpful and awesome thread. Especially for a complete Linux newbie.
    I followed all the steps as described in post #1, but when I run yum –enablerepo… it ends up with:

    Running Transaction Test
    Finished Transaction Test

    Transaction Check Error:
    file /usr/share/mysql/charsets/Index.xml from install of mysql-libs-5.1.30-1.el5.remi conflicts with file from package mysql-5.0.45-7.el5
    file /usr/share/mysql/charsets/README from install of mysql-libs-5.1.30-1.el5.remi conflicts with file from package mysql-5.0.45-7.el5
    file /usr/share/mysql/charsets/ascii.xml from install of mysql-libs-5.1.30-1.el5.remi conflicts with file from package mysql-5.0.45-7.el5
    file /usr/share/mysql/charsets/cp1250.xml from install of mysql-libs-5.1.30-1.el5.remi conflicts with file from package mysql-5.0.45-7.el5
    file /usr/share/mysql/czech/errmsg.sys from install of mysql-libs-5.1.30-1.el5.remi conflicts with file from package mysql-5.0.45-7.el5
    file /usr/share/mysql/danish/errmsg.sys from install of mysql-libs-5.1.30-1.el5.remi conflicts with file from package mysql-5.0.45-7.el5
    file /usr/share/mysql/dutch/errmsg.sys from install of mysql-libs-5.1.30-1.el5.remi conflicts with file from package mysql-5.0.45-7.el5
    file /usr/share/mysql/english/errmsg.sys from install of mysql-libs-5.1.30-1.el5.remi conflicts with file from package mysql-5.0.45-7.el5
    file /usr/share/mysql/estonian/errmsg.sys from install of mysql-libs-5.1.30-1.el5.remi conflicts with file from package mysql-5.0.45-7.el5
    file /usr/share/mysql/french/errmsg.sys from install of mysql-libs-5.1.30-1.el5.remi conflicts with file from package mysql-5.0.45-7.el5
    file /usr/share/mysql/german/errmsg.sys from install of mysql-libs-5.1.30-1.el5.remi conflicts with file from package mysql-5.0.45-7.el5
    file /usr/share/mysql/greek/errmsg.sys from install of mysql-libs-5.1.30-1.el5.remi conflicts with file from package mysql-5.0.45-7.el5
    file /usr/share/mysql/hungarian/errmsg.sys from install of mysql-libs-5.1.30-1.el5.remi conflicts with file from package mysql-5.0.45-7.el5
    file /usr/share/mysql/italian/errmsg.sys from install of mysql-libs-5.1.30-1.el5.remi conflicts with file from package mysql-5.0.45-7.el5
    file /usr/share/mysql/japanese/errmsg.sys from install of mysql-libs-5.1.30-1.el5.remi conflicts with file from package mysql-5.0.45-7.el5
    file /usr/share/mysql/korean/errmsg.sys from install of mysql-libs-5.1.30-1.el5.remi conflicts with file from package mysql-5.0.45-7.el5
    file /usr/share/mysql/norwegian-ny/errmsg.sys from install of mysql-libs-5.1.30-1.el5.remi conflicts with file from package mysql-5.0.45-7.el5
    file /usr/share/mysql/norwegian/errmsg.sys from install of mysql-libs-5.1.30-1.el5.remi conflicts with file from package mysql-5.0.45-7.el5
    file /usr/share/mysql/polish/errmsg.sys from install of mysql-libs-5.1.30-1.el5.remi conflicts with file from package mysql-5.0.45-7.el5
    file /usr/share/mysql/portuguese/errmsg.sys from install of mysql-libs-5.1.30-1.el5.remi conflicts with file from package mysql-5.0.45-7.el5
    file /usr/share/mysql/romanian/errmsg.sys from install of mysql-libs-5.1.30-1.el5.remi conflicts with file from package mysql-5.0.45-7.el5
    file /usr/share/mysql/russian/errmsg.sys from install of mysql-libs-5.1.30-1.el5.remi conflicts with file from package mysql-5.0.45-7.el5
    file /usr/share/mysql/serbian/errmsg.sys from install of mysql-libs-5.1.30-1.el5.remi conflicts with file from package mysql-5.0.45-7.el5
    file /usr/share/mysql/slovak/errmsg.sys from install of mysql-libs-5.1.30-1.el5.remi conflicts with file from package mysql-5.0.45-7.el5
    file /usr/share/mysql/spanish/errmsg.sys from install of mysql-libs-5.1.30-1.el5.remi conflicts with file from package mysql-5.0.45-7.el5
    file /usr/share/mysql/swedish/errmsg.sys from install of mysql-libs-5.1.30-1.el5.remi conflicts with file from package mysql-5.0.45-7.el5
    file /usr/share/mysql/ukrainian/errmsg.sys from install of mysql-libs-5.1.30-1.el5.remi conflicts with file from package mysql-5.0.45-7.el5

    I even ran yum update afterwards, didn’t change anything. PHP still says 5.1.6 instead of 5.2.x -.-

  45. Trae said,

    I’m getting the same exact errors that dkp1977 is getting.

    *sigh* This is why I’ve always avoided Redhat based systems like the plague.

  46. leif81 said,

    > This is why I’ve always avoided Redhat based systems like the plague.

    This blog post is about installing an unsupported version of PHP on centos/redhat, you shouldn’t be so surprised when there are problems.

  47. yoji said,

    If you chose to update php this way, you’ll also need to update any optional php modules too.
    php-mysql, php-mcrypt, etc…

    In fact, I had to remove the mysql client first before upgrading.

    The quick way to update all your php modules is
    “yum –enablerepo=remi update php-*”

    That gets them all, even if you don’t use all of them.

    Thanks for the informative how-to.

  48. Serg said,

    dkp1977 and Trae try this at first
    yum –enablerepo=remi update
    and it’s work for me like a charm, it will update mysql server and now errors

  49. yashesh said,

    first off, great post 🙂 very useful for yum newb like me.

    however, getting the same error as Trae and dkp1977

    Transaction Check Error: file /etc/my.cnf from install of mysql-libs-5.1.30-1.fc6.remi conflicts with file from package mysql-5.0.22-2.1
    file /usr/share/mysql/charsets/Index.xml from install of mysql-libs-5.1.30-1.fc6.remi conflicts with file from package mysql-5.0.22-2.1
    file /usr/share/mysql/charsets/README from install of mysql-libs-5.1.30-1.fc6.remi conflicts with file from package mysql-5.0.22-2.1
    file /usr/share/mysql/charsets/armscii8.xml from install of mysql-libs-5.1.30-1.fc6.remi conflicts with file from package mysql-5.0.22-2.1
    file /usr/share/mysql/charsets/ascii.xml from install of mysql-libs-5.1.30-1.fc6.remi conflicts with file from package mysql-5.0.22-2.1

    etc. have no clue how to fix this.. i guess i’ll have to switch to fc8 or ubuntu then..

    thx for a wonderful post..

  50. zd said,

    dkp1977 (and others):

    remove all your mysql packages:

    yum remove mysql*

    then reinstall them with the –enablerepo=remi option

    yum –enablerepo=remi install mysql

    , etc

  51. matt said,

    If I remove as shown above (yum remove mysql*) does this remove my databases? (paranoid)

    Would it possible to just do a ‘yum update mysql*’ instead? (And a ‘yum update php*’?)

  52. Mark Speener said,

    Trae, dkp1977, etc. I fixed the mysql based errors with:

    yum –enablerepo=remi update mysql*

    This updated the mysql and php stuff. I’m now on php 5.2.8.

  53. matt rogers said,

    I just did a ‘yum –enablerepo=remi update’ as previously suggested and did not get any errors and it updated PHP and MySQL.

    To answer my own question, the mysql upgrade did not remove my DB. I did have to run ‘mysql_upgrade’ afterward.

  54. Trevor said,

    I would like to add the problems I had. Running CentOS 5.2. Plesk 8.6.0 was installed at the start. I upgraded plesk 8.6.0 after doing the updates for that version then moving to 9.0.0 upgrade. After that new key for 9 was given auto. I upgraded to 9.0.1 and now started PHP upgrade.

    Current version was:
    PHP 5.1.6 (cli) (built: Jul 16 2008 19:53:00)
    Copyright (c) 1997-2006 The PHP Group
    Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
    with the ionCube PHP Loader v3.1.16, Copyright (c) 2002-2006, by ionCube Ltd.

    I logged into the server using putty.exe as root user.

    Type in these commands:
    wget http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-2.noarch.rpm

    wget http://rpms.famillecollet.com/el5.i386/remi-release-5-4.el5.remi.noarch.rpm

    rpm -Uvh remi-release-5*.rpm epel-release-5*.rpm

    I answered Y to the two question it asked. And after it was done it said Complete!

    I restarted apache
    /etc/init.d/httpd restart

    Then php -v
    Failed loading /usr/lib/php/modules//php_ioncube_loader_lin_5.1.so: /usr/lib/php/modules//php_ioncube_loader_lin_5.1.so: undefined symbol: zend_unmangle_property_name_ex
    PHP 5.2.8 (cli) (built: Jan 5 2009 15:12:04)
    Copyright (c) 1997-2008 The PHP Group
    Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies

    The error with ioncube_loader was hard to fix due to lots of searching online for some kind of answer. In the end it was as easy as this:

    I created a PHP file with
    Search for ioncube
    I noticed that it was loading /etc/php.d/ioncube-loader.ini
    Opening that file I noticed a path going to:
    /usr/lib/php/modules//php_ioncube_loader_lin_5.1.so

    So I headed over to that folder where all the modules are and I see 3 files 5.0, 5.1, 5.2

    I then edit the file
    nano ioncube-loader.ini
    Changed the path to:
    /usr/lib/php/modules//php_ioncube_loader_lin_5.2.so

    And restarted apache
    /etc/init.d/httpd restart

    php -v
    PHP 5.2.8 (cli) (built: Jan 5 2009 15:12:04)
    Copyright (c) 1997-2008 The PHP Group
    Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
    with the ionCube PHP Loader v3.1.29, Copyright (c) 2002-2007, by ionCube Ltd.

    Some how the new 5.2 version wasn’t used and this is needed to run with 5.2.8 of PHP. Hope this helps some other people that may take hours to figure this out.

  55. Tiger said,

    Try enabling centos test repo

  56. kaveo said,

    with the test repo you’ll end up facing
    Error: Missing Dependency: php <= 5.2.0 is needed by package php-sqlite2 (if it’s installed, it’s required by Plesk)

    http://www.atomicorp.com/wiki/index.php/PHP
    upgrading php to 5.2 on centos 5
    the most seamless way to the moment

  57. Alexwebmaster said,

    Hello webmaster
    I would like to share with you a link to your site
    write me here preonrelt@mail.ru

  58. l0co said,

    This is a great solution. Thanks!

  59. aster1sk said,

    Nice work, thanks!

    json_encode is ready for play!


  60. This tutorial is fantastic! Saved me so much time working out how to upgrade one of servers for PCI compliance!!!

    Big Thank You!

    • Simon Green said,

      ugh PCI compliance. Feeling your pain!

  61. John said,

    Has there been an a fix for this????
    I am receiving the same problem

    Transaction Check Error:
    file /usr/share/mysql/charsets/Index.xml from install of mysql-libs-5.1.30-1.el5.remi conflicts with file from package mysql-5.0.45-7.el5
    file /usr/share/mysql/charsets/README from install of mysql-libs-5.1.30-1.el5.remi conflicts with file from package mysql-5.0.45-7.el5
    file /usr/share/mysql/charsets/ascii.xml from install of mysql-libs-5.1.30-1.el5.remi conflicts with file from package mysql-5.0.45-7.el5
    file /usr/share/mysql/charsets/cp1250.xml from install of mysql-libs-5.1.30-1.el5.remi conflicts with file from package mysql-5.0.45-7.el5
    file /usr/share/mysql/czech/errmsg.sys from install of mysql-libs-5.1.30-1.el5.remi conflicts with file from package mysql-5.0.45-7.el5
    file /usr/share/mysql/danish/errmsg.sys from install of mysql-libs-5.1.30-1.el5.remi conflicts with file from package mysql-5.0.45-7.el5
    file /usr/share/mysql/dutch/errmsg.sys from install of mysql-libs-5.1.30-1.el5.remi conflicts with file from package mysql-5.0.45-7.el5
    file /usr/share/mysql/english/errmsg.sys from

    etc…

  62. John said,

    Uninstalling mysql and installing it from the repository did the trick

    no tables were lost

  63. uda said,

    Thanks!!! very helpful!

    the code should be brakeble, so people can see it, I had to play with the text size to copy it…

  64. nasir said,

    Sir when i try to use

    wget http://rpms.famillecollet.com/el5.i386/remi-release-5-4.el5.remi.noarch.rpm

    i got error 404 Not found Error ? what does it mean and why its occur all people did, why it problem here ?

  65. Chris said,

    The url changed for the remi release:

    wget http://rpms.famillecollet.com/el5.i386/remi-release-5-7.el5.remi.noarch.rpm

    Also, I did this and found that the php version there has POSIX support disabled, which made it useless for me.

    Here is the configure info from php info:

    ./configure’ ‘–build=i686-redhat-linux-gnu’ ‘–host=i686-redhat-linux-gnu’ ‘–target=i386-redhat-linux-gnu’ ‘–program-prefix=’ ‘–prefix=/usr’ ‘–exec-prefix=/usr’ ‘–bindir=/usr/bin’ ‘–sbindir=/usr/sbin’ ‘–sysconfdir=/etc’ ‘–datadir=/usr/share’ ‘–includedir=/usr/include’ ‘–libdir=/usr/lib’ ‘–libexecdir=/usr/libexec’ ‘–localstatedir=/var’ ‘–sharedstatedir=/usr/com’ ‘–mandir=/usr/share/man’ ‘–infodir=/usr/share/info’ ‘–cache-file=../config.cache’ ‘–with-libdir=lib’ ‘–with-config-file-path=/etc’ ‘–with-config-file-scan-dir=/etc/php.d’ ‘–disable-debug’ ‘–with-pic’ ‘–disable-rpath’ ‘–without-pear’ ‘–with-bz2’ ‘–with-exec-dir=/usr/bin’ ‘–with-freetype-dir=/usr’ ‘–with-png-dir=/usr’ ‘–with-xpm-dir=/usr’ ‘–enable-gd-native-ttf’ ‘–with-t1lib=/usr’ ‘–without-gdbm’ ‘–with-gettext’ ‘–with-gmp’ ‘–with-iconv’ ‘–with-jpeg-dir=/usr’ ‘–with-openssl’ ‘–with-zlib’ ‘–with-layout=GNU’ ‘–enable-exif’ ‘–enable-ftp’ ‘–enable-magic-quotes’ ‘–enable-sockets’ ‘–enable-sysvsem’ ‘–enable-sysvshm’ ‘–enable-sysvmsg’ ‘–with-kerberos’ ‘–enable-ucd-snmp-hack’ ‘–enable-shmop’ ‘–enable-calendar’ ‘–without-mime-magic’ ‘–with-libxml-dir=/usr’ ‘–enable-xml’ ‘–with-system-tzdata’ ‘–with-mime-magic=/usr/share/file/magic’ ‘–with-apxs2=/usr/sbin/apxs’ ‘–without-mysql’ ‘–without-gd’ ‘–disable-dom’ ‘–disable-dba’ ‘–without-unixODBC’ ‘–disable-pdo’ ‘–disable-xmlreader’ ‘–disable-xmlwriter’ ‘–without-sqlite’ ‘–disable-json’ ‘–without-pspell’ ‘–disable-wddx’ ‘–without-curl’ ‘–disable-posix’ ‘–disable-sysvmsg’ ‘–disable-sysvshm’ ‘–disable-sysvsem’


  66. […] Installing PHP 5.2.x on RedHat ES5, CentOS 5, etc […]

  67. Remi said,

    Permanent URL for configuration RPM is now :
    http://rpms.famillecollet.com/remi-release-5.rpm

    POSIX functions still available in php-process sub-package.

    +

  68. Remi said,

    Oups.. Typo in previous

    Permanent URL for configuration RPM is now :
    http://rpms.famillecollet.com/enterprise/remi-release-5.rpm

    +

    P.S. please also note there is now a forum for remi’s repository on
    http://forums.famillecollet.com/

  69. Claudia said,

    Thanks for a great tutorial, and thanks to remi for his repository.

    I’ve done this before on i386 with no problems (yum –enablerepo=remi upgrade php mysql), but now I need to do it on x86_64, centos 5.3, and when trying to start mysql I get:

    Initializing MySQL database: Installing MySQL system tables…
    090528 16:36:40 [ERROR] Error message file ‘/usr/share/mysql/english/errmsg.sys’ had only 472 error messages,
    but it should contain at least 630 error messages.
    Check that the above file is the right version for this program!
    090528 16:36:40 [ERROR] Aborting

    090528 16:36:40 [Warning] Forcing shutdown of 3 plugins
    090528 16:36:40 [Note]

    No further info in /var/log/mysql

    Any help will be appreciated!

  70. freestyle said,

    I uninstall all mysql packages from centos 5.3 (x86_64) and then install mysql from remi repo. The installation is OK. But when I run ‘service mysqld start’, it fails to run.

    The message in /var/log/mysqld.log is as follow:
    === START ===
    090528 20:50:33 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
    090528 20:50:33 [ERROR] Error message file ‘/usr/share/mysql/english/errmsg.sys’ had only 472 error messages,
    but it should contain at least 630 error messages.
    Check that the above file is the right version for this program!
    090528 20:50:33 InnoDB: Started; log sequence number 0 43655
    090528 20:50:33 [ERROR] Aborting

    090528 20:50:33 InnoDB: Starting shutdown…
    090528 20:50:34 InnoDB: Shutdown completed; log sequence number 0 43655
    090528 20:50:34 [Warning] Forcing shutdown of 1 plugins
    090528 20:50:34 [Note]
    090528 20:50:34 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
    === END ====

  71. Remi said,

    This a bug already reported I can’t reproduced…

    check RPM installation using : rpm –verify –all mysql\*

    Remove / Install have been reported to solve the issue.

    +

  72. Claudia said,

    Thanks for your reply.
    After some uninstalls and reinstalls of both your rpm and the one in base (5.0) it started to work. But don’t ask me what I have done step by step!
    It was more or less like this:

    yum remove –enablerepo=remi mysql mysql-server-mysql-libs

    then

    yum install mysql mysql-server (which left me with version 5.0)

    Still with version 5.0 I did

    /usr/bin/mysql_install_db –datadir=/var/lib/mysql –user=mysql
    (manually created tables)

    then yum install –enablerepo=remi mysql mysql-server left me again with version 5.1.34, but it had some complains

    From what I could understand in http://forums.famillecollet.com/viewtopic.php?id=6
    I uninstalled mysql-libs

    rpm -e –nodeps mysql-libs

    and then reinstalled it

    yum install –enablerepo=remi mysql-libs

    Started mysql with service mysqld start, and rebuild mysql tables with mysql-upgrade

    Again, I don’t remember if these were all the steps involved – and I don’t know if it will keep on working after rebooting.

  73. ktim said,

    This is my way of updating PHP on Centos 5.3

    wget http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-2.noarch.rpm
    wget http://rpms.famillecollet.com/el5.i386/remi-release-5-7.el5.remi.noarch.rpm
    rpm -Uvh remi-release-5*.rpm epel-release-5*.rpm
    yum –enablerepo=remi update mysql
    yum –enablerepo=remi update php

    It works, but i have problems with mcrypt.
    This command
    yum -–enablerepo=remi update php-mcrypt
    doesn’t help.

  74. ben hamadi adel said,

    remi repository dl link changed check this:
    wget http://rpms.famillecollet.com/enterprise/remi-release-5.rpm

  75. Dana said,

    Wow, after days of fighting to upgrade from 5.1.6 – this “blog” was finally the answer. Of course, php -v gives me all these warnings like:
    “PHP Warning: PHP Startup: memcache: Unable to initialize module
    Module compiled with module API=20050922, debug=0, thread-safety=0
    PHP compiled with module API=20060613, debug=0, thread-safety=0
    These options need to match in Unknown on line 0″I think

    But it does show I have 5.2.9 now…

    I followed the initial instructions and it looked like it did something, but then got hung up on MySql (why are PHP and MySql married/ conjoined at the back of the head?)

    # php -v
    PHP Warning: Module ‘PDO’ already loaded in Unknown on line 0
    PHP Warning: Module ‘pdo_mysql’ already loaded in Unknown on line 0https://bluhaloit.wordpress.com/2008/03/13/installing-php-52x-on-redhat-es5-centos-5-etc/
    PHP 5.1.6 (cli) (built: Apr 7 2009 08:00:04)
    Copyright (c) 1997-2006 The PHP Group
    Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
    #

    So I had to remove MySql – which seems like the weirdest thing to do and followed the instructions again, and reinstalled MySql. And contrary to what one person’s opinion blaming “Red Hat”, it’s just Linux in general.

    I guess I know why stores Fry’s don’t carry Linux on the shelves anymore… I have better things to do with my time than to figure out how this software should be installed…

    Any developer I know that has software would come up with a clear install path – preferably an actual GUI interface.

    • Simon Green said,

      PHP and MySQL are joined in this way because they have been compiled against each other with shared libraries for support.

  76. Andrea said,

    I have to upgrade to PHP 5.2 on an active production server using CentOS 5.3 with Drupal.
    Fortunately I can clone my server so I have tested your repository before using it on production environment.
    All seemed to work OK: I updated PHP and MySQL. It’s important to remember to run mysql_upgrade script after upgrading MySQL.
    Your repository is disabled by default, I used yum with “enablerepo=remi” option to install PHP and MySQL. Well, but how can I upgrade them? Using simply “yum update”, does yum check your repository for PHP and MySQL?

    Thanks!

    • Simon Green said,

      Yes it will, update with the enable repo option should update your existing installs.

  77. williamb said,

    It is very strange I used this technique to update my PHP without issue. But now when I go into yum and try to list the PHP packages available, yum seems to be looking in the default place and not where the remi repo is. Here is an example.
    I input:

    yum –enablerepo=remi list php

    Output is:

    Repository remi already added, not adding again
    Repository remi-test already added, not adding again
    Setting up repositories
    http://download.fedoraproject.org/pub/fedora/linux/core/updates/4/i386/repodata/repomd.xml: [Errno 4] IOError: HTTP Error 404: Date: Fri, 19 Jun 2009 16:25:35 GMT
    Server: Apache/2.2.3 (Red Hat)
    cache-control: no-cache
    AppTime: D=71201
    AppServer: app2.fedora.phx.redhat.com
    Vary: Accept-Encoding
    Content-Length: 0
    Content-Type: text/html; charset=utf-8
    ProxyTime: D=541610
    ProxyServer: proxy5.fedoraproject.org
    Trying other mirror.
    Cannot open/read repomd.xml file for repository: updates-released
    failure: repodata/repomd.xml from updates-released: [Errno 256] No more mirrors to try.
    ——

    I have verified that the remi-fedora.repo file is up to date and on my system in the correct directory. What am I missing? Any help would be appreciated.

    • Simon Green said,

      Maybe it’s looking for the old repository as well? Can you remove the Fedora 4 updates repo?


  78. […] 參考https://bluhaloit.wordpress.com/2008/03/13/installing-php-52x-on-redhat-es5-centos-5-etc/ […]


  79. Hi, From remi repo it’s very easy and smooth to update php 1.6 to 2.x version thank you for posting information.

  80. Kevin said,

    I just wanted to express my sincere gratitude for this info. I was having a heck of a time getting ldap to work on php5.2.5.and this fixed my issue.

  81. Ben said,

    Bluhalo,
    Great solution! works perfectly for my RHEL 5. I upgraded it from php 5.1.x to 5.2.x using your instruction.

    • Simon Green said,

      No problem! Thanks to Remi really.

  82. augustowebd said,

    update output at 2009-08-09:

    PHP 5.3.0 (cli) (built: Jul 19 2009 17:55:08)
    Copyright (c) 1997-2009 The PHP Group
    Zend Engine v2.3.0, Copyright (c) 1998-2009 Zend Technologies

    • Simon Green said,

      Noted thanks! Repo has been upgraded to 5.3.0.

  83. JCR said,

    PHP 5.3 creates too many problems.
    how can I reverse to php 5.2.x?

    Thanks


    • I am using PHP 5.3. but yet, i have not got any problems. which type of problems you had got?

  84. CNG said,

    I’m having some dependency problems — any ideas?

    1:php-eaccelerator-0.9.5.2-2.el5.remi.x86_64 from remi has depsolving problems
    –> Missing Dependency: php(api) = 20041225 is needed by package 1:php-eaccelerator-0.9.5.2-2.el5.remi.x86_64 (remi)
    1:php-eaccelerator-0.9.5.2-2.el5.remi.x86_64 from remi has depsolving problems
    –> Missing Dependency: php(zend-abi) = 20060613 is needed by package 1:php-eaccelerator-0.9.5.2-2.el5.remi.x86_64 (remi)
    Error: Missing Dependency: php(api) = 20041225 is needed by package 1:php-eaccelerator-0.9.5.2-2.el5.remi.x86_64 (remi)
    Error: Missing Dependency: php(zend-abi) = 20060613 is needed by package 1:php-eaccelerator-0.9.5.2-2.el5.remi.x86_64 (remi)

    • Beam said,

      just remove eaccelerator
      yum remove php-eaccelerator

      afterwards the update works just fine. But be aware. After the update nearly all my joomla-installations are broken.

      So I am also searching for a rollback…


  85. […] 參考資訊:Installing PHP 5.2.x or 5.3.x on RedHat ES5, CentOS 5, etc 幫我推到: […]


  86. […] Installing PHP 5.2.x on RedHat ES5, CentOS 5, etc […]


  87. Hi,
    Getting this error when trying to update

    file /usr/share/mysql/ukrainian/errmsg.sys from install of mysql-libs-5.1.37-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.45-7.el5.i386

    Not sure what the issue is :(.

    Please advise..

    Thanks

    PHP Developer

    • David Pascoe said,

      Sorry to have to say that I have the same problem 😦

      file /etc/my.cnf from install of mysql-libs-5.1.39-1.el5.remi.i386 conflicts with file from package MySQL-server-community-5.0.45-0.rhel5.i386
      file /usr/share/mysql/charsets/Index.xml from install of mysql-libs-5.1.39-1.el5.remi.i386 conflicts with file from package MySQL-server-community-5.0.45-0.rhel5.i386

      and trying to install mysql upgrade doesn’t help.

      yum –enablerepo=remi update MySQL-server-community

      says nothing to do

      machine is CentOS 5.3.

      So perhaps I can’t do this with MySQL-server-community

  88. Mickey said,

    I just have to say that these instructions were a lifesaver — I needed the functionality of the DateTime object in PHP 5.2 and RHEL5 only went up to 5.1.6!

    One thing, though — on top of having to update my PHP install, I also had to update MySQL to 5.1.

    yum enablerepo=remi update mysql

    then

    yum enablerepo=remi update php


  89. […] json 的關係,把 PHP 升級到 5.2 以上才有支援,參考了一篇 Installing PHP 5.2.x or 5.3.x on RedHat ES5, CentOS 5, etc,作法其實很容易,不用幾個指令就可以完成了wget […]

  90. Alex said,

    Great post. However, on RHEL5, you’ll need to uninstall the PHP and MySQL before making the update and install MySQL and mysql-libs from Remi repositories too.

  91. Todd said,

    If you only want php5.2 check out the atomic repo. http://www.christianmontoya.com/2008/10/01/upgrading-php-and-installing-apc-on-centos-5-with-plesk/

  92. Erwin said,

    I’ve got this error
    ————-
    Transaction Check Error:
    file /etc/my.cnf from install of mysql-libs-5.1.41-1.el5.remi.i386 conflicts with file from package mysql-5.0.77-3.el5.i386
    file /usr/share/mysql/charsets/Index.xml from install of mysql-libs-5.1.41-1.el5.remi.i386 conflicts with file from package mysql-5.0.77-3.el5.i386
    file /usr/share/mysql/charsets/cp1250.xml from install of mysql-libs-5.1.41-1.el5.remi.i386 conflicts with file from package mysql-5.0.77-3.el5.i386
    file /usr/share/mysql/czech/errmsg.sys from install of mysql-libs-5.1.41-1.el5.remi.i386 conflicts with file from package mysql-5.0.77-3.el5.i386
    file /usr/share/mysql/danish/errmsg.sys from install of mysql-libs-5.1.41-1.el5.remi.i386 conflicts with file from package mysql-5.0.77-3.el5.i386
    file /usr/share/mysql/dutch/errmsg.sys from install of mysql-libs-5.1.41-1.el5.remi.i386 conflicts with file from package mysql-5.0.77-3.el5.i386
    file /usr/share/mysql/english/errmsg.sys from install of mysql-libs-5.1.41-1.el5.remi.i386 conflicts with file from package mysql-5.0.77-3.el5.i386
    file /usr/share/mysql/estonian/errmsg.sys from install of mysql-libs-5.1.41-1.el5.remi.i386 conflicts with file from package mysql-5.0.77-3.el5.i386
    file /usr/share/mysql/french/errmsg.sys from install of mysql-libs-5.1.41-1.el5.remi.i386 conflicts with file from package mysql-5.0.77-3.el5.i386
    file /usr/share/mysql/german/errmsg.sys from install of mysql-libs-5.1.41-1.el5.remi.i386 conflicts with file from package mysql-5.0.77-3.el5.i386
    file /usr/share/mysql/greek/errmsg.sys from install of mysql-libs-5.1.41-1.el5.remi.i386 conflicts with file from package mysql-5.0.77-3.el5.i386
    file /usr/share/mysql/hungarian/errmsg.sys from install of mysql-libs-5.1.41-1.el5.remi.i386 conflicts with file from package mysql-5.0.77-3.el5.i386
    file /usr/share/mysql/italian/errmsg.sys from install of mysql-libs-5.1.41-1.el5.remi.i386 conflicts with file from package mysql-5.0.77-3.el5.i386
    file /usr/share/mysql/japanese/errmsg.sys from install of mysql-libs-5.1.41-1.el5.remi.i386 conflicts with file from package mysql-5.0.77-3.el5.i386
    file /usr/share/mysql/korean/errmsg.sys from install of mysql-libs-5.1.41-1.el5.remi.i386 conflicts with file from package mysql-5.0.77-3.el5.i386
    file /usr/share/mysql/norwegian-ny/errmsg.sys from install of mysql-libs-5.1.41-1.el5.remi.i386 conflicts with file from package mysql-5.0.77-3.el5.i386
    file /usr/share/mysql/norwegian/errmsg.sys from install of mysql-libs-5.1.41-1.el5.remi.i386 conflicts with file from package mysql-5.0.77-3.el5.i386
    file /usr/share/mysql/polish/errmsg.sys from install of mysql-libs-5.1.41-1.el5.remi.i386 conflicts with file from package mysql-5.0.77-3.el5.i386
    file /usr/share/mysql/portuguese/errmsg.sys from install of mysql-libs-5.1.41-1.el5.remi.i386 conflicts with file from package mysql-5.0.77-3.el5.i386
    file /usr/share/mysql/romanian/errmsg.sys from install of mysql-libs-5.1.41-1.el5.remi.i386 conflicts with file from package mysql-5.0.77-3.el5.i386
    file /usr/share/mysql/russian/errmsg.sys from install of mysql-libs-5.1.41-1.el5.remi.i386 conflicts with file from package mysql-5.0.77-3.el5.i386
    file /usr/share/mysql/serbian/errmsg.sys from install of mysql-libs-5.1.41-1.el5.remi.i386 conflicts with file from package mysql-5.0.77-3.el5.i386
    file /usr/share/mysql/slovak/errmsg.sys from install of mysql-libs-5.1.41-1.el5.remi.i386 conflicts with file from package mysql-5.0.77-3.el5.i386
    file /usr/share/mysql/spanish/errmsg.sys from install of mysql-libs-5.1.41-1.el5.remi.i386 conflicts with file from package mysql-5.0.77-3.el5.i386
    file /usr/share/mysql/swedish/errmsg.sys from install of mysql-libs-5.1.41-1.el5.remi.i386 conflicts with file from package mysql-5.0.77-3.el5.i386
    file /usr/share/mysql/ukrainian/errmsg.sys from install of mysql-libs-5.1.41-1.el5.remi.i386 conflicts with file from package mysql-5.0.77-3.el5.i386

    Error Summary
    ——

    • yuka said,

      you should update myslq-server first. After that you shold update php.

      • MSM said,

        PLZ, how can I update myslq-server first?

  93. Vj said,

    Thank You Doode !! You saved me lot of time. Very Good Post

  94. usr said,

    wow,good job!

  95. Jaime said,

    I would like to install only 5.2.8 but remi repo has php 5.3.1 as the last version…

    php i386 5.3.1-1.el5.remi remi 1.3 M

    How can I address it?


  96. Hi there, I like your blog alot, it s has very informative content, I found it while I was searching for web hosting on msn. Thanks for sharing all this info, keep up the good work


  97. […] Installing PHP 5.2.x on RedHat ES5, CentOS 5, etc […]

  98. Alex said,

    Just installed PHP 5.3.1
    Thaaaaaaaaaaanks!


  99. Don’t forget that PHP isn’t much use without Apache. An article on Apache would be great


  100. […] installed) 1. Add epel and remi repositories to install updated mysql and php. Instructions here: https://bluhaloit.wordpress.com/2008/03/13/installing-php-52x-on-redhat-es5-centos-5-etc/ 2. nano /etc/yum.repos.d/remi.repo 3. Under [remi] change: “enabled=0” to […]


  101. Hey Russ and Kevin!

    Hopefully you’ve found a resolution by now 🙂 In case you haven’t or someone else stumbles across this I found the answer on this page:
    http://www.drupaler.co.uk/blog/drupal-6x-and-centos-5x/440

    The fileinfo, memcache, and readline errors:
    PHP Warning: PHP Startup: fileinfo: Unable to initialize module
    Module compiled with module API=20050922, debug=0, thread-safety=0
    PHP compiled with module API=20060613, debug=0, thread-safety=0
    These options need to match
    in Unknown on line 0

    Apparently, they are caused by PECL PHP modules that were not updated because they are not in Jason’s repository. You need to remove them. You can find out what to remove by running a command like this (taking the “fileinfo” above as an example)… see link above to the other site.

    .:Joshua

  102. Oki S. Bayu said,

    Hello,

    I use CentOS 5 and found this error when update my php 5.1 to 5.3 :

    # php -v
    PHP 5.1.6 (cli) (built: Mar 31 2010 02:44:37)
    Copyright (c) 1997-2006 The PHP Group
    Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies

    # yum update php
    Loading “installonlyn” plugin
    Setting up Update Process
    Setting up repositories
    Reading repository metadata in from local files
    Could not find update match for php
    No Packages marked for Update/Obsoletion

    So i’ve tried to running this update without success too…

    # yum –enable remi install php
    Loading “installonlyn” plugin
    Setting up Install Process
    Setting up repositories
    Reading repository metadata in from local files
    Parsing package install arguments
    Resolving Dependencies
    –> Populating transaction set with selected packages. Please wait.
    —> Package php.i386 0:5.3.2-1.el5.remi set to be updated
    –> Running transaction check
    –> Processing Dependency: php-cli = 5.3.2-1.el5.remi for package: php
    –> Processing Dependency: php-common = 5.3.2-1.el5.remi for package: php
    –> Restarting Dependency Resolution with new changes.
    –> Populating transaction set with selected packages. Please wait.
    —> Package php-cli.i386 0:5.3.2-1.el5.remi set to be updated
    —> Package php-common.i386 0:5.3.2-1.el5.remi set to be updated
    –> Running transaction check
    –> Processing Dependency: libedit.so.0 for package: php-cli
    –> Finished Dependency Resolution
    Error: Missing Dependency: libedit.so.0 is needed by package php-cli

    Do you have any clues for me?
    Thanks for your help.

  103. Balu Nadig said,

    I have memcached 1.4.5 and php 5.3.2 running RHEL 5.3. I am getting the following eroor:

    PHP Warning: PHP Startup: memcache: Unable to initialize module
    Module compiled with module API=20050922
    PHP compiled with module API=20090626
    These options need to match

    Can someone help?

  104. Alex... said,

    Transaction Check Error:
    file /etc/my.cnf from install of mysql-libs-5.1.47-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_4.2.x86_64
    file /usr/share/mysql/charsets/Index.xml from install of mysql-libs-5.1.47-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_4.2.x86_64
    file /usr/share/mysql/charsets/cp1250.xml from install of mysql-libs-5.1.47-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_4.2.x86_64
    file /usr/share/mysql/czech/errmsg.sys from install of mysql-libs-5.1.47-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_4.2.x86_64
    file /usr/share/mysql/danish/errmsg.sys from install of mysql-libs-5.1.47-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_4.2.x86_64
    file /usr/share/mysql/dutch/errmsg.sys from install of mysql-libs-5.1.47-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_4.2.x86_64
    file /usr/share/mysql/english/errmsg.sys from install of mysql-libs-5.1.47-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_4.2.x86_64
    file /usr/share/mysql/estonian/errmsg.sys from install of mysql-libs-5.1.47-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_4.2.x86_64
    file /usr/share/mysql/french/errmsg.sys from install of mysql-libs-5.1.47-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_4.2.x86_64
    file /usr/share/mysql/german/errmsg.sys from install of mysql-libs-5.1.47-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_4.2.x86_64
    file /usr/share/mysql/greek/errmsg.sys from install of mysql-libs-5.1.47-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_4.2.x86_64
    file /usr/share/mysql/hungarian/errmsg.sys from install of mysql-libs-5.1.47-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_4.2.x86_64
    file /usr/share/mysql/italian/errmsg.sys from install of mysql-libs-5.1.47-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_4.2.x86_64
    file /usr/share/mysql/japanese/errmsg.sys from install of mysql-libs-5.1.47-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_4.2.x86_64
    file /usr/share/mysql/korean/errmsg.sys from install of mysql-libs-5.1.47-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_4.2.x86_64
    file /usr/share/mysql/norwegian-ny/errmsg.sys from install of mysql-libs-5.1.47-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_4.2.x86_64
    file /usr/share/mysql/norwegian/errmsg.sys from install of mysql-libs-5.1.47-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_4.2.x86_64
    file /usr/share/mysql/polish/errmsg.sys from install of mysql-libs-5.1.47-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_4.2.x86_64
    file /usr/share/mysql/portuguese/errmsg.sys from install of mysql-libs-5.1.47-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_4.2.x86_64
    file /usr/share/mysql/romanian/errmsg.sys from install of mysql-libs-5.1.47-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_4.2.x86_64
    file /usr/share/mysql/russian/errmsg.sys from install of mysql-libs-5.1.47-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_4.2.x86_64
    file /usr/share/mysql/serbian/errmsg.sys from install of mysql-libs-5.1.47-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_4.2.x86_64
    file /usr/share/mysql/slovak/errmsg.sys from install of mysql-libs-5.1.47-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_4.2.x86_64
    file /usr/share/mysql/spanish/errmsg.sys from install of mysql-libs-5.1.47-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_4.2.x86_64
    file /usr/share/mysql/swedish/errmsg.sys from install of mysql-libs-5.1.47-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_4.2.x86_64
    file /usr/share/mysql/ukrainian/errmsg.sys from install of mysql-libs-5.1.47-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_4.2.x86_64
    file /etc/my.cnf from install of mysql-libs-5.1.47-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_4.2.i386
    file /usr/share/mysql/charsets/Index.xml from install of mysql-libs-5.1.47-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_4.2.i386
    file /usr/share/mysql/charsets/cp1250.xml from install of mysql-libs-5.1.47-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_4.2.i386
    file /usr/share/mysql/czech/errmsg.sys from install of mysql-libs-5.1.47-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_4.2.i386
    file /usr/share/mysql/danish/errmsg.sys from install of mysql-libs-5.1.47-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_4.2.i386
    file /usr/share/mysql/dutch/errmsg.sys from install of mysql-libs-5.1.47-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_4.2.i386
    file /usr/share/mysql/english/errmsg.sys from install of mysql-libs-5.1.47-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_4.2.i386
    file /usr/share/mysql/estonian/errmsg.sys from install of mysql-libs-5.1.47-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_4.2.i386
    file /usr/share/mysql/french/errmsg.sys from install of mysql-libs-5.1.47-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_4.2.i386
    file /usr/share/mysql/german/errmsg.sys from install of mysql-libs-5.1.47-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_4.2.i386
    file /usr/share/mysql/greek/errmsg.sys from install of mysql-libs-5.1.47-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_4.2.i386
    file /usr/share/mysql/hungarian/errmsg.sys from install of mysql-libs-5.1.47-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_4.2.i386
    file /usr/share/mysql/italian/errmsg.sys from install of mysql-libs-5.1.47-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_4.2.i386
    file /usr/share/mysql/japanese/errmsg.sys from install of mysql-libs-5.1.47-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_4.2.i386
    file /usr/share/mysql/korean/errmsg.sys from install of mysql-libs-5.1.47-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_4.2.i386
    file /usr/share/mysql/norwegian-ny/errmsg.sys from install of mysql-libs-5.1.47-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_4.2.i386
    file /usr/share/mysql/norwegian/errmsg.sys from install of mysql-libs-5.1.47-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_4.2.i386
    file /usr/share/mysql/polish/errmsg.sys from install of mysql-libs-5.1.47-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_4.2.i386
    file /usr/share/mysql/portuguese/errmsg.sys from install of mysql-libs-5.1.47-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_4.2.i386
    file /usr/share/mysql/romanian/errmsg.sys from install of mysql-libs-5.1.47-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_4.2.i386
    file /usr/share/mysql/russian/errmsg.sys from install of mysql-libs-5.1.47-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_4.2.i386
    file /usr/share/mysql/serbian/errmsg.sys from install of mysql-libs-5.1.47-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_4.2.i386
    file /usr/share/mysql/slovak/errmsg.sys from install of mysql-libs-5.1.47-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_4.2.i386
    file /usr/share/mysql/spanish/errmsg.sys from install of mysql-libs-5.1.47-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_4.2.i386
    file /usr/share/mysql/swedish/errmsg.sys from install of mysql-libs-5.1.47-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_4.2.i386
    file /usr/share/mysql/ukrainian/errmsg.sys from install of mysql-libs-5.1.47-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_4.2.i386

    Error Summary
    ————-

  105. Date said,

    […] a server that has PHP 5.2 or higher enabled. Some distros, like Red Hat, use PHP 5.1 instead. See Installing PHP 5.2 on RedHat for ideas on how to update […]


  106. […] a server that has PHP 5.2 or higher enabled. Some distros, like Red Hat, use PHP 5.1 instead. See Installing PHP 5.2 on RedHat for ideas on how to update […]


  107. […] Installing PHP 5.2.x or 5.3.x on RedHat ES5, CentOS 5, etc […]

  108. Nirmik said,

    Thank you it is really needful.


  109. Nice software

    useful.


  110. […] Installing PHP 5.2.x or 5.3.x on RedHat ES5, CentOS 5, etc – Bluhalo IT https://bluhaloit.wordpress.com/2008/03/13/installing-php-52x-on-redhat-es5-centos-5-etc/ tweetmeme_url = 'http://masatomannen.com/wordpress/?p=13&#039;;tweetmeme_source = […]

  111. Khupcom said,

    For lastes PHP Version, just use CentOS-Testing.repo

    [c5-testing]
    name=CentOS-5 Testing
    baseurl=http://dev.centos.org/centos/$releasever/testing/$basearch/
    enabled=1
    gpgcheck=1
    gpgkey=http://dev.centos.org/centos/RPM-GPG-KEY-CentOS-testing

    Then $ yum update
    Regards,

    Eric from Free PDF Ebook Search Engine

  112. nhefr said,

    Thanks!


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s


%d bloggers like this: