【转载】解决WordPress上传图片遇Missing a temporary folder.问题
今天在使用Wordpress上传图片时遇到”Missing a temporary folder”错误,看服务器的错误日志,有以下一行:
1
|
2017/07/09 21:25:31 [error] 1821#0: *311 FastCGI sent in stderr: "PHP message: PHP Fatal error: Maximum execution time of 30 seconds exceeded in /htdocs/wp-includes/compat.php on line 98" while reading response header from upstream, client: 12.3.4.5, server: domain.com, request: "GET /page/5 HTTP/1.1", upstream: "fastcgi://unix:/run/php-fpm/www.sock:", host: "domain.com", referrer: "https://domain.com/"2017/07/09 21:30:41 [error] 1821#0: *339 FastCGI sent in stderr: "PHP message: PHP Warning: Unknown: open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/htdocs) in Unknown on line 0
|
原来我的PHP配置打开open_basedir了,需要将临时目录添加进去。
- 如果在php.ini设置有open_basedir项,那么要将/tmp加入允许的列表中,类似于(仅类linux系统可用):
1open_basedir = /www/htdocs:/tmp
- 如果有SElinux的话,需要添加SElinux的httpd读写策略到/tmp:
1chcon -t httpd_sys_rw_content_t /tmp
完成。
原文地址:https://chengxuzhilu.com/902.html
THE END
0
二维码
打赏
海报
【转载】解决WordPress上传图片遇Missing a temporary folder.问题
今天在使用Wordpress上传图片时遇到”Missing a temporary folder”错误,看服务器的错误日志,有以下一行:
1
2017/07/09 21:25:31 [error] 1821#0……
共有 0 条评论