PHP version coexistence

不言
Release: 2023-03-23 22:48:01
Original
1594 people have browsed it

This article mainly introduces the content about the coexistence of PHP versions, which has certain reference value. Now I share it with everyone. Friends in need can refer to it

1. Update source ubuntu


sudo add-apt-repository ppa:ondrej/phpsudo apt upgradesudo apt update
Copy after login
下载php7.1的命令

sudo apt-get install -y php7.1-common php7.1-mbstring php7.1-mcrypt php7.1-mysql php7.1-xml php7.1-gd php7.1-curl php7.1-json php7.1-fpm php7.1-zip php7.1-mcrypt libapache2-mod-php7.1
Copy after login
;; 开启一个php版本sudo a2enmod php7.1
;; 禁用一个php版本sudo a2dismod php7.1
;; 重启Apache2sudo service apache2 restart
Copy after login

PHP Undefined class constant 'MYSQL_ATTR_INIT_COMMAND' solution

Modification

php.ini
extension=php_pdo.dll //开启PDO      
extension=php_pdo_mysql.dll //PDO 访问mysql 驱动
Copy after login

Related recommendations:

php version switching Detailed process and common php-fpm FAQs in online Linux environment

The above is the detailed content of PHP version coexistence. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!