问题描述
brew 部署的PHP开发环境,后台上传图片遇到Nginx500 错误
一开始怀疑PHP对上传图片的错误
开启PHP错误日志,上传图片,没记录错误日志
ini_set("display_errors","On");
error_reporting(E_ALL);
PHP.ini 设置PHP error_logs
zb@zbdeMacBook-Pro Nginx % ls
access.log error.log
zb@zbdeMacBook-Pro Nginx % pwd
/opt/homebrew/var/log/Nginx
2021/03/04 15:14:35 [crit] 618#0: *333 open() "/opt/homebrew/var/run/Nginx/client_body_temp/0000000055" Failed (13: Permission denied), client: 127.0.0.1, server: local.lanen.com, request: "POST /admin.PHP/Product/editsave HTTP/1.1", host: "local.lanen.com", referrer: "http://local.lanen.com/admin.PHP/Product/edit"