PHP 在接收POST大数据(大数组或大字符串)时出现500错误

今天服务器突然出现接收不到数据 ,拿curl写了个测试脚本,发现只有小字符串可以,收发成功,字符串在300K就不行了,服务器直接报‘500 Internal Server Error。
服务器是centos6,nginx,php的环境
开始调试,打开了php的错误日志,并没有发现任何错误信息,检查了下php的post的相关配置,配得都挺高也没有任何问题。
继续往下找原因,查看nginx的错误日志,然并卵,也没有看到任何错误信息,降低nginx的错误信息级别为warn,这里了,出现如下错误信息:

2016/04/19 15:57:53 [crit] 23931#0: *143499 open() "/var/lib/nginx/tmp/client_body/0000000114" failed (13: Permission denied), client: 11.11.11.60, server: server4.dongdong.com, request: "POST /test1.php HTTP/1.1", host: "server4.dongdong.com"
2016/04/19 15:57:54 [crit] 23931#0: *143512 open() "/var/lib/nginx/tmp/client_body/0000000115" failed (13: Permission denied), client: 11.11.11.60, server: server4.dongdong.com, request: "POST /test1.php HTTP/1.1", host: "server4.dongdong.com"
2016/04/19 15:57:54 [crit] 23931#0: *143515 open() "/var/lib/nginx/tmp/client_body/0000000116" failed (13: Permission denied), client: 11.11.11.60, server: server4.dongdong.com, request: "POST /test1.php HTTP/1.1", host: "server4.dongdong.com"
2016/04/19 15:57:54 [crit] 23931#0: *143518 open() "/var/lib/nginx/tmp/client_body/0000000117" failed (13: Permission denied), client: 11.11.11.60, server: server4.dongdong.com, request: "POST /test1.php HTTP/1.1", host: "server4.dongdong.com"
2016/04/19 15:57:54 [crit] 23931#0: *143521 open() "/var/lib/nginx/tmp/client_body/0000000118" failed (13: Permission denied), client: 11.11.11.60, server: server4.dongdong.com, request: "POST /test1.php HTTP/1.1", host: "server4.dongdong.com"
2016/04/19 15:57:55 [crit] 23931#0: *143524 open() "/var/lib/nginx/tmp/client_body/0000000119" failed (13: Permission denied), client: 11.11.11.60, server: server4.dongdong.com, request: "POST /test1.php HTTP/1.1", host: "server4.dongdong.com"
2016/04/19 15:58:02 [crit] 23932#0: *143644 open() "/var/lib/nginx/tmp/client_body/0000000120" failed (13: Permission denied), client: 11.11.11.60, server: server4.dongdong.com, request: "POST /test1.php HTTP/1.1", host: "server4.dongdong.com"

    1
    2
    3
    4
    5
    6
    7

根据错误信息得出,nginx的buffer等文件目录没有写权限。

chmod -R 775 /var/lib/nginx

    1

问题解决!!!!
 

你可能感兴趣的:(PHP)