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.


  • Which Fedora version are you using ? – proy Jan 19 '10 at 21:35
  • Fedora 12. From uname -a: Linux barfoon #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 0:54

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.

| improve this answer | |
  • 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 0:13
  • 1
    Check this link in Fedora Forums 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 9:55

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


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


Install php from atomic repo

wget -q -O - http://www.atomicorp.com/installers/atomic | sh
yum install php
| improve this answer | |
  • 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". – user194806 Oct 13 '13 at 19:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.