Switching between different versions of PHP on MAC

Time:2021-6-4

A. The first is to switch between different versions of PHP

The core idea of nginx switching between different versions of PHP is to configure PHP FPM in different versions of PHP. Taking php7 version as an example, the specific steps are as follows:
1. File directory / usr / local / etc / PHP / 7.0 / PHP FPM. D/ www.conf (this is php7 version, and php5.6 version is in php-fpm.conf file)
Switching between different versions of PHP on MAC

2. Modify the listen in the file. Different versions of PHP have different listen
Switching between different versions of PHP on MAC
Switching between different versions of PHP on MAC

3: Modify the nginx.conf file in nginx: the user in the first line of the file should be the same as the www.conf The user and group in are consistent.
Will fastcgi_ Change pass to www.conf Listen in

Switching between different versions of PHP on MAC

4: After modification, restart nginx and PHP FPM
Restart nginx:
sudo nginx -t
Switching between different versions of PHP on MAC
sudo nginx -s reload

5. Restart PHP
Restart PHP FPM of PHP: first, it’s better to close all PHP FPM, and the instruction is
sudo killall php-fpm
Then start PHP FPM
/usr/local/Cellar/php70/7.0.21_13/sbin/php7.0-fpm start

Recommended Today

Summary of DOM event flow in JS

1、 Event capture 1. Concept Event capture: from the document to the node that triggered the event,Top downTo trigger the event. 2. Illustration Event capture 2、 Event bubbling 1. Concept Event bubbling: from the node that triggered the event to the document, yesBottom upTo trigger the event. 2. Illustration Event Bubbling 3、 DOM event flow […]