W3docs

Max size of URL parameters in _GET

In PHP, the maximum size of the parameters in a GET request is determined by the server's configuration.

In PHP, the maximum size of URL parameters in a GET request is not controlled by PHP itself, but rather by the web server configuration and standard URL length limits. PHP does not have a built-in ini directive to limit GET request size.

Web servers typically enforce these limits:

  • Apache: LimitRequestLine and LimitRequestFieldSize (default is usually 8190 bytes).
  • Nginx: large_client_header_buffers (default is usually 4 8k buffers).

PHP does have the max_input_vars directive (default 1000), but it limits the number of input variables, not their total byte size.

The suhosin.get.max_value_length directive belonged to the Suhosin extension, which is obsolete and no longer supported in modern PHP versions. To adjust GET parameter limits, you must modify your web server's configuration files (httpd.conf for Apache, nginx.conf for Nginx) and restart the service.