title: Complete uninstall and re-install of PHP on Centos 7
body: <p>I needed try PHP 5.6 and 5.5 on on Centos 7.  So, I installed them overtop of a perfect working installation of PHP 7.1. I followed the instructions here: <a href="https://www.mojowill.com/geek/howto-install-php-5-4-5-5-or-5-6-on-centos-6-and-centos-7/" rel="nofollow noreferrer">https://www.mojowill.com/geek/howto-install-php-5-4-5-5-or-5-6-on-centos-6-and-centos-7/</a></p>
  
  <p>Basically, I edited the remi repo config file to enable PHP 5.6 and 5.5 and installed PHP 5.6. I tested what I wanted to test and tried to switch back by disabling the repos and uninstall all php and then reinstall again. Now I have problems.  </p>
  
  <p>Here are the symptoms and what I've tried.</p>
  
  <p>I get a message on a WordPress installation "<code>Your PHP installation appears to be missing the MySQL extension which is required by WordPress.</code>" </p>
  
  <pre><code># php -v
  PHP **7.2.14** (cli) (built: Jan  8 2019 14:05:15) ( NTS )
  Copyright (c) 1997-2018 The PHP Group
  
  &lt;? phpinfo() ?&gt; works but says php version **7.1.24**
  </code></pre>
  
  <p>I tried to check if php-mysql is still installed:</p>
  
  <pre><code># yum list installed | grep php
  php.x86_64                              7.2.14-1.el7.remi              @remi-php72
  php-cli.x86_64                          7.2.14-1.el7.remi              @remi-php72
  php-common.x86_64                       7.2.14-1.el7.remi              @remi-php72
  php-gd.x86_64                           7.2.14-1.el7.remi              @remi-php72
  php-json.x86_64                         7.2.14-1.el7.remi              @remi-php72
  php-mysqlnd.x86_64                      7.2.14-1.el7.remi              @remi-php72
  php-pdo.x86_64                          7.2.14-1.el7.remi              @remi-php72
  php-pecl-mcrypt.x86_64                  1.0.1-6.el7.remi.7.2           @remi-php72
  
  
  # yum install php-mysql
  Loaded plugins: fastestmirror, langpacks
  Loading mirror speeds from cached hostfile
   * base: mirror.layeronline.com
   * epel: mirror.uic.edu
   * extras: centos.mirror.globo.tech
   * nux-dextop: mirror.li.nux.ro
   * remi: repo1.ash.innoscale.net
   * remi-php72: repo1.ash.innoscale.net
   * remi-safe: repo1.ash.innoscale.net
   * updates: centos.mirror.ca.planethoster.net
   * webtatic: us-east.repo.webtatic.com
  Package php-mysql-5.4.45-16.el7.remi.x86_64 is obsoleted by php-mysqlnd-7.2.14-1.el7.remi.x86_64 which is already installed
  </code></pre>
  
  <p>Is there any easy resolution to this mess, or should I just fresh install the whole development machine.</p>