Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am running PHP 5.3.5.

Now I need to install the php-mbstring module.

When I run:

yum install php-mbstring

I am asked to update PHP:

Installing:
 php-mbstring                              x86_64                              5.3.6-3.el5.remi                                remi                              2.3 M
Updating for dependencies:
 mysql                                     x86_64                              5.5.11-1.el5.remi                               remi                              7.4 M
 mysql-libs                                x86_64                              5.5.11-1.el5.remi                               remi                              1.1 M
 mysql-server                              x86_64                              5.5.11-1.el5.remi                               remi                               12 M
 php                                       x86_64                              5.3.6-3.el5.remi                                remi                              1.4 M
 php-cli                                   x86_64                              5.3.6-3.el5.remi                                remi                              2.6 M
 php-common                                x86_64                              5.3.6-3.el5.remi                                remi                              973 k
 php-devel                                 x86_64                              5.3.6-3.el5.remi                                remi                              623 k
 php-gd                                    x86_64                              5.3.6-3.el5.remi                                remi                              208 k
 php-mysql                                 x86_64                              5.3.6-3.el5.remi                                remi                              159 k
 php-pdo                                   x86_64                              5.3.6-3.el5.remi                                remi                              117 k
 php-xml                                   x86_64                              5.3.6-3.el5.remi                                remi                              221 k

Transaction Summary
=======================================================================================================================================================================
Install      1 Package(s)         
Update      11 Package(s)         
Remove       0 Package(s) 

How can I install the module for the PHP version 5.3.5 so that I can avoid updating PHP?

Thanks,
Dan

share|improve this question

1 Answer 1

up vote 1 down vote accepted

To install a specific version of a package with YUM, you append a dash and the version to the package name. But the versions used by YUM/RPM are slightly different from the official versions, as shown by the version column in the output you provided. So first, run yum info to check what version you have installed:

yum info installed php

Once you've figured that out, then you can install the right version. For example, if the installed version was 5.3.6-1.el5.remi, you'd run:

yum install php-mbstring-5.3.5-1.el5.remi

That being said, PHP 5.3.6 fixes 6 security bugs and over 60 other problems. It introduces no major changes and will not break existing applications. You really should upgrade.

share|improve this answer
    
Thanks a lot. It was very helpful –  dan Apr 16 '11 at 22:07
    
No package php-mbstring-5.3.5-1.el5.remi available. –  andufo Dec 8 '11 at 0:45
    
@andufo: It looks like Remi keeps only one old version of a package around at one time. –  Patches Dec 9 '11 at 0:06
    
@Patches yes, i changed your line for php-mbstring-5.3.8-1.el5.remi.1 :) –  andufo Dec 9 '11 at 1:36

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.