I am running CentOS 7.4 and HTTP 2.4.6

I installed PHP 7.2.3

I know need to downgrade to 7.0 (reason is software company initially told me to install latest/stable for PHP and now they tell me 7.2 won't work I need 7.0 -- ugh)

How do I go from 7.2 to 7.0 in PHP?

php -v returns: PHP 7.2.3 (cli) (built: Mar 2 2018 12:41:10) ( NTS )

  • Show the output of ˋyum list installed | grep phpˋ. And where did you get those ˋuˋ package names from like ˋphp72uˋ? Also, how did you install v7.2? – Sven Mar 28 at 23:01
  • Find the package name providing the php command: rpm -qf $(which php) – Remi Collet Mar 29 at 4:36
  • BTW, apparently you have added the repositories for EL 6 onto EL 7. This can't work. – Sven Mar 29 at 18:21

You have php installed from remi-php72, and you want php from remi-php70

Try:

yum-config-manager --enable remi-php70
yum-config-manager --disable remi-php72

Then downgrade everything and upgrade again (for noarch package)

yum downgrade php\*
yum update

Or simply (only the 7.2.3 packages)

yum downgrade php-bcmath php-cli php-common php-devel \
  php-gd php-gmp php-imap php-intl php-json php-ldap \
  php-mbstring php-mysqlnd php-odbc  php-pdo php-process \
  php-recode php-soap php-tidy php-xml

Or to remove everything and start new installation

yum remove php\*
  • yum remove php-common – Remi Collet Mar 29 at 16:23
  • I wouldn't try to yum downgrade and yum upgrade. That would probably not work. I'd just use yum distro-sync instead. – Michael Hampton Mar 29 at 16:34
  • Ah, indeed, I always forget about distro-sync.... very good idea – Remi Collet Mar 29 at 16:43

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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