php常见错误

1.  kevent() reported that connect() failed (61: Connection refused) while connecting to upstream, client: 127.0.0.1, server: localhost, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "127.0.0.1"

原因:php-fpm没启动,不能把请求解析到php文件。

解决方法:

启动php-fpm,在终端运行命令: sudo php-fpm

 

2.  FastCGI sent in stderr: "PHP message: PHP Warning:  Unknown: open(/var/tmp//sess_bbdipplspnn6ee7tkj1ce03oj3, O_RDWR) failed: Permission denied (13) in Unknown on line 0

原因: php的session.save_path没设置

解决方法: 设置一下php.ini中的session.save_path,并且赋予nginx访问权限

 

 

你可能感兴趣的:(PHP)