debian下apache2 将php7.1 切换到 php7.3

1. debian中php如何切换版本

1
update-alternatives --config php

选择 php7.3

2.停用 php7.1

1
2
a2dismod php7.1
# Module php7.1 disabled.

3.重启 apache :

1
systemctl restart apache2

To activate the new configuration, you need to run:

1
systemctl restart apache2

4. 查看 phpinfo 时,是 7.3,并且,扩展没有报错。

注:如果有问题可先运行下面命令先启用php7.3模块再重启apache2 

1
s2enmod php7.3
原文地址:https://www.cnblogs.com/surplus/p/14617889.html