2

In my Nginx server block I have:

server {
    client_max_body_size 8M;
...

Is there a chance I can read this value safely from the level of PHP script without parsing the file?

Sfisioza
  • 3,830
  • 6
  • 42
  • 57
  • 1
    According to [this](https://stackoverflow.com/q/52030921/231316), it doesn’t sound directly possible – Chris Haas Sep 04 '21 at 12:49
  • You can pass any value to PHP from nginx config as `fastcgi_param `, for example `fastcgi_param MAX_BODY "8M";` and then read it in a PHP script in a way of `$_SERVER['MAX_BODY']` – Ivan Shatsky Sep 05 '21 at 19:51

0 Answers0