0

How can i Downgrade PHP 7.3.2 to PHP 5.4 on CentOS 7.6?
I've tried this :

service httpd stop

sudo yum-config-manager --enable remi-php54
sudo yum-config-manager --disable remi-php73

sudo yum -y downgrade php php-cli php-fpm php-mysqlnd php-zip php-devel php-gd php-mcrypt php-mbstring php-curl php-xml php-pear php-bcmath php-json

sudo yum -y --enablerepo=remi-php54 install php-xml php-soap php-xmlrpc php-mbstring php-json php-gd php-mcrypt

But does not work & i am still on php 7.3.2.
How can i do that?

SilverLight
  • 19,668
  • 65
  • 192
  • 300
  • 2
    That can lead into serious security issues. Why would you want to do so? In debian I can run multiple PHP versions alongside for testing purposes. This should be possible in CentOS as well. – Pinke Helga Feb 14 '19 at 01:07
  • I have a php web site that have many problems with php version 7. Making a way to work that web site is more important than security. I can't change many parts of that web site. – SilverLight Feb 14 '19 at 01:10
  • Yes, it may have glitches if you downgrade it. But have you tried this? https://my.royalclouds.net/knowledgebase/32/Downgrade-PHP7-to-PHP56-CentOS-.html – Roshan Feb 14 '19 at 01:10
  • 4
    Consider using a full-feature IDE like NetBeans, Eclipse, PhpStorm. It's not that hard to make PHP5 code PHP7 compliant. A good IDE lists you all issues and you can jump into code by double-click. It can even make suggestions how to refactor code. "Development" means knowing how to use the appropriate tools. – Pinke Helga Feb 14 '19 at 01:12
  • 1
    "Those who sacrificing security for easy of development deserve neither and will loose both" - James Jefferson, 2077 – Steve Byrne Feb 14 '19 at 01:22
  • Can't help without full yum ouput. Also try yum distro-sync. – Remi Collet Feb 14 '19 at 06:21
  • Also: rpm -qa 'php*' – Remi Collet Feb 14 '19 at 08:20

0 Answers0