Background: When updating ubuntu, choose to retain the current php version, resulting in multiple php versions, and phpinfo displays php7.1. After checking with php -i, I found that many extensions cannot be opened.
1. How to switch version of php in Ubuntu16.04
sudo update-alternatives --config php
Select php7.3
2. Disable php7.1
sudo a2dismod php7.1 # Module php7.1 disabled.
3. Restart apache:
systemctl restart apache2
To activate the new configuration, you need to run:
systemctl restart apache2
4. When checking phpinfo, it is 7.3, and the extension does not report an error.
Recommended tutorial: PHP7 tutorial
The above is the detailed content of ubuntu 16.04 + apache2 switch php7.1 to php7.3. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

Zend Studio 13.0.1
Powerful PHP integrated development environment

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

Dreamweaver CS6
Visual web development tools