I have this location section in nginx.conf:
location ~ \.php {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PHP_VALUE "memory_limit = 500M; post_max_size = 400M; upload_max_filesize = 300M";
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_index index.php;
fastcgi_pass 127.0.0.1:9000;
}
I need to increase these parameters for file downloading, but there're still previous values of php.ini in phpinfo()
-list, despite updated $_SERVER['PHP_VALUE'] (contains values written by me in the config). I'd tried to change values in different ways: without semicolon, with \\n
, mixed both the previous variations, replaced PHP_VALUE
with PHP_ADMIN_VALUE
, copied the param from others' config; but it still was unsuccessful. Where's the problem? What obstruct to apply my params?
fastcgi_param PHP_VALUE "memory_limit = 500M; post_max_size =
400M; upload_max_filesize = 300M";
last parameter without semicolon
fastcgi_param PHP_VALUE "memory_limit = 500M; post_max_size = 400M; upload_max_filesize = 300M;";
对我来说,它以这种格式工作 -
fastcgi_param PHP_VALUE "variable1=value1;\n variable2=value2; \n variable3=value3;";
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.