Question:The Mac was already installed with php5.5 and wanted to install a composer with brew, so a php5.4 was installed with brew. After installation, it is found that PHP in/usr/local/bin will conflict.
Answer:A brew-installed php5.4 can be viewed using brew info PHP54, with the main path: PHP
/user/local/bin/phpConfig is configured in
/usr/local/etc/php/php-fpm
/usr/local/sbin/In the nginx determine which PHP to use to interpret the request, according to the server{} configuration of the Port 9000 is which PHP-FPM occupancy decision, as follows:
1 Location ~ \.php$ {2 ... 3 4 Fastcgi_pass 127.0. 0.1:9000; 5 6 ...... 7 }
PHP-FPM starts with 9000 ports by default, so you only need to start php5.5 or 5.4 corresponding PHP-FPM to switch PHP. The default PHP path in Mac is:
Bin: /usr/bin/php (/usr/local/bin/php)
FPM Config: /etc/php-fpm.conf
PHP-FPM: /usr/sbin/php-fpm
Install or configure PHP on your Mac