search

Home  >  Q&A  >  body text

linux - CentOS I used yum to download the php version 5.6, but the system still has php 5.4

The server in Alibaba Cloud,
the PHP version that comes with it is version 5.4

Then I needed to update, so I used yum to download the 5.6 version and fixed it, but when I ran the
php -v command, the displayed version was still 5.4

PHP 5.4.45 (cli) (built: Feb 19 2017 16:34:44)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
    with Zend Guard Loader v3.3, Copyright (c) 1998-2013, by Zend Technologies

Then use yum remove php* to show that the deleted version is php5.6

I want to know how to delete the 5.4 version in the system or how to replace it so that it becomes the 5.6 version

滿天的星座滿天的星座2816 days ago582

reply all(2)I'll reply

  • PHPz

    PHPz2017-05-16 13:08:50

    You have installed two versions

    The default /usr/bin/php is 5.4.45

    The simple way is to delete the default php first and then reinstall yum

    rm -rf "/usr/bin/php*"

    reply
    0
  • 習慣沉默

    習慣沉默2017-05-16 13:08:50

    Change the global variables

    reply
    0
  • Cancelreply