Install older version of php with yum

Hi to all,

I try to install on Centos with YUM a older version of php. When i use YUM LIST PHP i get the following results:

Available Packages
php.i386                                     5.1.6-23.2.el5_3                                      base
php.i386                                     5.1.6-24.el5_4.5                                      updates
php.i386                                     5.2.12-1.el5.art                                      atomic
php.i386                                     5.2.12-2.el5.art                                      atomic
php.i386                                     5.2.12-3.el5.art                                      atomic
php.i386                                     5.2.13-1.el5.art                                      atomic

which is great. now I want to install version 5.1.6 and tried all kind of things but he always give me the awnser that the package is not avalible or he wants to install 5.2.12

I tried: yum --allow-downgrade install php.i386-5.1.6-23.2.el5_3

I get the anwser:
Setting up Install Process
No package php.i386-5.1.6-23.2.el5_3 available.
Nothing to do

I am out of ideas here...
How can i choose which package i want to install with yum?

thanks for help,
Oliver
Oliver2000Asked:
Who is Participating?
 
Monis MontherConnect With a Mentor System ArchitectCommented:
1- Remove the php package

yum remove php

2- reomve the atomic repo from your /etc/yum.repos.d/ dir so yum will not try to use it, or simply disable it

3- yum install php

Now it will look under the base repo and install the 5.1.6

0
 
Oliver2000Author Commented:
thankx man, but now i have a new problem.

after yum install php

i get:

Loaded plugins: allowdowngrade, fastestmirror
Loading mirror speeds from cached hostfile
 * addons: mirror.newnanutilities.org
 * base: ftp.linux.ncsu.edu
 * extras: ftp.linux.ncsu.edu
 * updates: centos.mirror.netriplex.com
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php.i386 0:5.1.6-24.el5_4.5 set to be updated
--> Processing Dependency: php-common = 5.1.6-24.el5_4.5 for package: php
--> Processing Dependency: php-cli = 5.1.6-24.el5_4.5 for package: php
--> Finished Dependency Resolution
php-5.1.6-24.el5_4.5.i386 from updates has depsolving problems
  --> Missing Dependency: php-cli = 5.1.6-24.el5_4.5 is needed by package php-5.1.6-24.el5_4.5.i386 (updates)
php-5.1.6-24.el5_4.5.i386 from updates has depsolving problems
  --> Missing Dependency: php-common = 5.1.6-24.el5_4.5 is needed by package php-5.1.6-24.el5_4.5.i386 (updates)
Error: Missing Dependency: php-common = 5.1.6-24.el5_4.5 is needed by package php-5.1.6-24.el5_4.5.i386 (updates)
Error: Missing Dependency: php-cli = 5.1.6-24.el5_4.5 is needed by package php-5.1.6-24.el5_4.5.i386 (updates)
 You could try using --skip-broken to work around the problem
 You could try running: package-cleanup --problems
                        package-cleanup --dupes
                        rpm -Va --nofiles --nodigest
The program package-cleanup is found in the yum-utils package.
0
 
Monis MontherConnect With a Mentor System ArchitectCommented:
Ok it seems that these are some packages that are not present in your repo

php-common and php-cli

install the rpmforge repo


I attached the package for you

NOTE: THIS FIILE IS NOT A ZIP FILE , I ONLY CHANGED TEH EXTENSION AND ADDED .ZIP AFTER .RPM BECAUSE THIS FORUM DOES NOT ALLOW TO ATTACH .RPM FILES, SIMPLY RENMAE THE FILE BY REMOVING THE .ZIP AT THE END

Install the package and yum install again
rpmforge-release-0.3.6-1.el5.rf..zip
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
medveddCommented:
Somebody already had this problem. Take a look at the answer:

http://www.experts-exchange.com/OS/Linux/Q_24687686.html
0
 
Oliver2000Author Commented:
I installed rpmforge but the result is the same as before. still same message.

Loaded plugins: allowdowngrade, fastestmirror
Loading mirror speeds from cached hostfile
 * addons: mirror.newnanutilities.org
 * base: ftp.linux.ncsu.edu
 * extras: ftp.linux.ncsu.edu
 * rpmforge: ftp-stud.fht-esslingen.de
 * updates: hpc.arc.georgetown.edu
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php.i386 0:5.1.6-24.el5_4.5 set to be updated
--> Processing Dependency: php-common = 5.1.6-24.el5_4.5 for package: php
--> Processing Dependency: php-cli = 5.1.6-24.el5_4.5 for package: php
--> Finished Dependency Resolution
php-5.1.6-24.el5_4.5.i386 from updates has depsolving problems
  --> Missing Dependency: php-cli = 5.1.6-24.el5_4.5 is needed by package php-5.1.6-24.el5_4.5.i386 (updates)
php-5.1.6-24.el5_4.5.i386 from updates has depsolving problems
  --> Missing Dependency: php-common = 5.1.6-24.el5_4.5 is needed by package php-5.1.6-24.el5_4.5.i386 (updates)
Error: Missing Dependency: php-common = 5.1.6-24.el5_4.5 is needed by package php-5.1.6-24.el5_4.5.i386 (updates)
Error: Missing Dependency: php-cli = 5.1.6-24.el5_4.5 is needed by package php-5.1.6-24.el5_4.5.i386 (updates)
 You could try using --skip-broken to work around the problem
 You could try running: package-cleanup --problems
                        package-cleanup --dupes
                        rpm -Va --nofiles --nodigest
0
 
Oliver2000Author Commented:
if i try to install with yum php-common and php-cli i get the awnser that both are installed already?!
0
 
MrVandemarConnect With a Mentor Commented:
Any time you add a repo other than the default repos, I suggest installing the Yum Priority plugin

http://wiki.centos.org/PackageManagement/Yum/Priorities

Set up priorities then try everything again.

do a
yum remove php-common php-cli

followed with

yum install
0
 
Monis MontherSystem ArchitectCommented:
Ok what is the version of php-common and php-cli , maybe they are also newer I mean they are both 5.2.x and you need to do the same thing with them remove and install to get the old version

1- post the output of

rpm -qa | grep php

2- yum search php-common php-cli
0
 
Oliver2000Author Commented:
Thanks, this 100% solved the problems i had.
0
 
Oliver2000Author Commented:
worked! Thanks to small_student and the final tip from MrVandemar. perfect now...
0
All Courses

From novice to tech pro — start learning today.