MAC Configuration php-fpm

Source: Internet
Author: User
Tags configuration php

Https://github.com/musicode/test/issues/5

The Mac comes with PHP-FPM, which executes at the terminal php-fpm and reports the following error:

ERROR: failed to open configuration file ‘/private/etc/php-fpm.conf‘: No such file or directory (2)ERROR: failed to load configuration file ‘/private/etc/php-fpm.conf‘ERROR: FPM initialization failed

The error message shows that the configuration file cannot be opened, and cd /private/etc no php-fpm.conf files are found, but there are php-fpm.conf.default files. This file is the default configuration, we can copy it, rename it to php-fpm.conf, and then change the configuration as needed.

cp /private/etc/php-fpm.conf.default /private/etc/php-fpm.conf

Execution php-fpm , again error:

ERROR: failed to open error_log (/usr/var/log/php-fpm.log): No such file or directory (2)ERROR: failed to post process the configurationERROR: FPM initialization failed

The error message shows that the error log file cannot be opened. Found that there is cd /usr/var/log no such directory, even the Var directory is not, plus in order to avoid permissions problems, simply configure to the/usr/local/var/log directory.

Modify the php-fpm.conf error_log configuration to, and change to, the same as the /usr/local/var/log/php-fpm.log user group current user.

Execution php-fpm , again error:

NOTICE: [pool www] ‘user‘ directive is ignored when FPM is not running as rootNOTICE: [pool www] ‘group‘ directive is ignored when FPM is not running as root

Then sudo php-fpm , again the error:

ERROR: unable to bind listening socket for address ‘127.0.0.1:9000‘: Address already in use (48)ERROR: FPM initialization failed

Edit the php-fpm.conf and modify it listen to 127.0.0.1:9999 .

Execution php-fpm -t , the world is finally clean!

MAC Configuration php-fpm

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.