Home >Backend Development >PHP Tutorial >How to Increase the Maximum Length of URL Parameters in PHP's $_GET?
Q: In a PHP application accessing data through RESTful GET requests, a URL parameter fails to appear in the _GET array when exceeding a certain length. Is there a method to adjust this maximum length?
A: This issue might arise due to a limitation imposed by Suhosin. Suhosin patched PHP installations impose a default limit of 512 characters for GET parameters. While browsers and Apache support longer URLs, this limitation can cause issues.
Solution:
To extend the maximum length for parameters with Suhosin, add the following line to your php.ini configuration:
suhosin.get.max_value_length = <limit>
Substitute
The above is the detailed content of How to Increase the Maximum Length of URL Parameters in PHP's $_GET?. For more information, please follow other related articles on the PHP Chinese website!