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?
For me, it worked in this format -
fastcgi_param PHP_VALUE "variable1=value1;\n variable2=value2; \n variable3=value3;";
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With