close

How to uninstall an older PHP version from centOS7

Hello Guys, How are you all? Hope You all Are Fine. Today I get the following error How to uninstall an older PHP version from centOS7 in php. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How to uninstall an older PHP version from centOS7 Error Occurs?

Today I get the following error How to uninstall an older PHP version from centOS7 in php.

How To Solve uninstall an older PHP version from centOS7 Error ?

  1. How To Solve uninstall an older PHP version from centOS7 Error ?

    To Solve uninstall an older PHP version from centOS7 Error yum -y remove php* to remove all php packages then you can install the 5.6 ones.

  2. How to uninstall an older PHP version from centOS7

    To Solve uninstall an older PHP version from centOS7 Error yum -y remove php* to remove all php packages then you can install the 5.6 ones.

Solution 1

yum -y remove php* to remove all php packages then you can install the 5.6 ones.

Solution 2


Subscribing to the IUS Community Project Repository

cd ~
curl 'https://setup.ius.io/' -o setup-ius.sh

Run the script:

sudo bash setup-ius.sh

Upgrading mod_php with Apache

This section describes the upgrade process for a system using Apache as the web server and mod_php to execute PHP code. If, instead, you are running Nginx and PHP-FPM, skip ahead to the next section.

Begin by removing existing PHP packages. Press y and hit Enter to continue when prompted.

sudo yum remove php-cli mod_php php-common

Install the new PHP 7 packages from IUS. Again, press y and Enter when prompted.

sudo yum install mod_php70u php70u-cli php70u-mysqlnd

Finally, restart Apache to load the new version of mod_php:

sudo apachectl restart

You can check on the status of Apache, which is managed by the httpd systemd unit, using systemctl:

systemctl status httpd

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you? Thank You.

Also, Read

Leave a Comment