Home >Backend Development >PHP Tutorial >Why are My GET Request Parameters Missing in PHP's `$_GET` Array?
URL Parameter Size Limits in _GET
Problem:
When accessing a PHP server via REST, a parameter passed in a GET request is absent from the _GET global variable. Reducing the length of the parameter allows it to be received.
Solution:
This issue arises due to a maximum size limit imposed on URL parameters in certain PHP configurations. This limitation, which is not explicitly documented, may be related to the suhosin patch.
To resolve this issue and support longer parameters, one can add the following line to the php.ini configuration file:
suhosin.get.max_value_length = <limit>
Where
The above is the detailed content of Why are My GET Request Parameters Missing in PHP's `$_GET` Array?. For more information, please follow other related articles on the PHP Chinese website!