Max size of URL parameters in

I am accessing a PHP server using REST: all data is passed in a GET request as URL parameters. One of the parameters arrives at the server in the query_string, but it is not in the _GET global. But shortening the parameter (the cutoff seems to be around 512 characters) lets it through.

Assuming I have diagnosed the problem correctly, is there a way to change this maximum size? I have not found any explanation in the documentation, not even a mention of this limit. This is on Debian squeeze / Apache 2.2.16 / PHP 5.3.3.


Ok, it seems that some versions of PHP have a limitation of length of GET params:

Please note that PHP setups with the suhosin patch installed will have a default limit of 512 characters for get parameters. Although bad practice, most browsers (including IE) supports URLs up to around 2000 characters, while Apache has a default of 8000.

To add support for long parameters with suhosin, add suhosin.get.max_value_length = <limit> in php.ini

Source: http://www.php.net/manual/en/reserved.variables.get.php#101469


See What is the maximum length of a URL in different browsers?

The length of the url can't be changed in PHP. The linked question is about the URL size limit, you will find what you want.

链接地址: http://www.djcxy.com/p/71370.html

上一篇: 是否有任何关于REST API的命名约定准则?

下一篇: 中的URL参数的最大大小