Uninstall php 7 in ubuntu 18.04

后端 未结 4 1101
北荒
北荒 2021-02-06 03:18

I have a server that has an application that runs with PHP 5.6. But I upgraded the server from Ubuntu 14.04 to 18.04 and in the process I also upgraded PHP to 7.2. Now I\'m tryi

4条回答
  •  闹比i
    闹比i (楼主)
    2021-02-06 04:16

    Firstly you need to restart the apache to take all in effect and also You can install mutliple php version using this post or just using

    sudo apt update
    sudo apt-add-repository ppa:ondrej/php
    sudo apt update
    sudo apt install -y php5.6 php5.6-cli php5.6-common
    

    disable php7.2:

    sudo a2dismod php7.2
    

    enable php 5.6:

    sudo a2enmod php5.6
    

    After all restart the apache again to take into affect

    service apache2 restart
    

提交回复
热议问题