关于phpfpm出现的Unable to create the PID file的问题

1,mac 启动php-fpm的时候大家可能会直接使用php-fpm命令,报错。

[30-Aug-2018 18:54:03] NOTICE: [pool www] 'user' directive is ignored when FPM is not running as root
[30-Aug-2018 18:54:03] NOTICE: [pool www] 'group' directive is ignored when FPM is not running as root
[30-Aug-2018 18:54:03] ERROR: Unable to create the PID file (/var/run/php-fpm.pid).: Permission denied (13)

请注意mac会存在运行权限问题,当遇到这个问题时候第一时间加上sudo php-fpm运行

2,顺带说个问题:

[30-Aug-2018 18:22:22] ERROR: failed to open error_log (/usr/local/var/log/php-fpm.log): Permission denied (13)
[30-Aug-2018 18:22:22] ERROR: failed to post process the configuration
[30-Aug-2018 18:22:22] ERROR: FPM initialization failed
shendoudous-MacBook-Pro:sbin shendoudou$ open error_log (/usr/local/var/log/php-fpm.log): Permission denied

当出现这个问题的时候也是权限问题,你可以去设置自己的php-fpm.log为可访问的权限,请记得不管是mac还是linux注意权限问题,角色,用户,权限往往是问题的根源。

猜你喜欢

转载自blog.csdn.net/Baron0071/article/details/82226349
今日推荐