2017-07-27 10 views
0

私のサーバー(フォトホスティングソフトウェア)にLycheeが実行されています。画像のアップロード以外はすべて正常に動作します。私は次のエラーを取得する:Lychee:ファイルアップロードエラー - 行0の不明の一時ファイルを作成できません

PHP message: PHP Warning: File upload error - unable to create a temporary file in Unknown on line 0" while reading response header from upstream, client: 123.123.12.12, server: example.com, request: "POST /php/index.php HTTP/2.0", upstream: "fastcgi://127.0.0.1:9000", host: "example.com", referrer: "example.com/"

2017/07/27 08:03:51 [error] 10711#10711: *183 FastCGI sent in stderr: "PHP message: PHP Warning: Unknown: open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/var/www/) in Unknown on line 0

エラーがまだ "を/ tmp" を追加した後に存在する

に "open_basedirの"

open_basedir = "/var/www/:/tmp/" 

そして追加tmpのディレクトリ/ tmpにWWW-HTTP権を持つ

答えて

0

​​私はnginxのでopen_basedirのパラメータを追加する必要がありました

location ~ \.php$ { 
       try_files $uri =404; 
       fastcgi_pass 127.0.0.1:9000; 
       fastcgi_param PHP_VALUE open_basedir="/var/www/:/tmp/"; 
       fastcgi_index index.php; 
       fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 
       fastcgi_param SCRIPT_NAME $fastcgi_script_name; 
       include fastcgi_params; 
     } 
関連する問題