环境:MAC + nginx(brew) +mysql5.7 +php7.2(brew)

1、Warning:session_start()failed: Permission denied (13)
session写入权限问题,修改php.ini,找到session.save_path = "/var/tmp"

sudo chmod -R 777 /var/tmp

2、先查看nginx启动的用户与组:

ps aux|grep nginx

可以尝试把用户和组改为一致:

chown -R root:root /var/tmp

3、然后可能提示session_start():Session data file is not created by your uid错误:

删除/var/tmp中的session文件即可