Install or configure PHP on your Mac

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.