2

Just created a new Fedora VM and it has PHP 5.3 loaded, and I have legacy code that references functions that are now deprecated ( e.g. eregi() ).

How can I downgrade my PHP install from 5.3 to something earlier like 5.2? Installation via YUM would be preferred but if anyone knows of any way I'd like to know how.

Thanks,

barfoon
  • 760
  • 4
  • 14
  • 29
  • Which Fedora version are you using ? – proy Jan 19 '10 at 21:35
  • Fedora 12. From uname -a: Linux barfoon 2.6.31.9-174.fc12.x86_64 #1 SMP Mon Dec 21 05:33:33 UTC 2009 x86_64 x86_64 x86_64 GNU/Linux – barfoon Jan 19 '10 at 21:39
  • Remember, deprecated is not removed. It'll still work fine, and you can turn off `E_DEPRECATED` errors until you're able to go in and fix them. No need to downgrade to less secure and fewer featured installs of PHP. – ceejayoz Sep 13 '12 at 00:54

2 Answers2

1

I am a hard core Ubuntu user but this is how it goes as far as i remember from my earlier days. Do a "yum search php" and see if the version you are looking for is there. If so un install the older version of php via "yum remove <>' and then install the available version with "yum install <>". I guess this is the only possible way via yum.

proy
  • 1,229
  • 10
  • 10
  • Thanks - I have tried this and it did not work. PHP 5.3 is the only one available in the repo. – barfoon Jan 19 '10 at 22:25
  • May be then the only option is to un install the current version and then install from sources. – proy Jan 19 '10 at 23:40
  • you could try adding repositories to your yum configs – warren Jan 20 '10 at 00:13
  • 1
    Check this link in Fedora Forums http://fedoraforum.org/forum/showthread.php?t=234132 , it says how to do it for Fedora 11. You can work based on that link for Fedora 12 too. – proy Jan 20 '10 at 09:55
1

I was able to install php 5.3 on Fedora 17 using atomic repo

http://www6.atomicorp.com/channels/atomic/fedora/17/x86_64/RPMS/

You will need to remove php and httpd first

yum remove php
yum remove httpd

Add the following at the end of /etc/yum.conf

exclude=php*5.4*

Install php from atomic repo

wget -q -O - http://www.atomicorp.com/installers/atomic | sh
yum install php
  • I used Adrian Gunawan's atmoic repo method (previous post) to successfully downgrade php 5.5 to 5.4 on Fedora 19. One cautionary note: be sure to let "install php" trigger the httpd install. I tried to install httpd first, then php which caused php to fail with "missing dependency: httpd-mmn". –  Oct 13 '13 at 19:46