views:

356

answers:

2

I have developed a PHP web app. I am giving an option to the user to update multiple issues on one go. In doing so, sometimes the user is encountering this error. Is there any way to increase the lenght of URL in apache?

+4  A: 

Under Apache, the limit is a configurable value, LimitRequestLine. Change this value to something larger than its default of 8190 if you want to support a longer request URI.

However, note that if you're actually running into this limit, you are probably abusing GET to begin with. You should use POST to transmit this sort of data -- especially since you even concede that you're using it to update values. If you check the link above, you'll notice that Apache even says "Under normal conditions, the value should not be changed from the default."

John Feminella
+1 for suggesting POST
The MYYN
I tried using POST at first, but this is an update operation on the database, and I am refreshing the orginal page using the values that were originally posted to that page.
JPro
JPro: Updating a database is more or less the exact reason you would use `POST`. Nothing about using POST precludes you from populating the same form with the fields that were just posted, so I'm not sure what you mean by that.
John Feminella
A: 

An excerpt from the RFC 2616: Hypertext Transfer Protocol -- HTTP/1.1

The POST method is used to request that the origin server accept the entity enclosed in the request as a new subordinate of the resource identified by the Request-URI in the Request-Line. POST is designed to allow a uniform method to cover the following functions:

  • Annotation of existing resources;
  • Posting a message to a bulletin board, newsgroup, mailing list, or similar group of articles;
  • Providing a block of data, such as the result of submitting a form, to a data-handling process;
  • Extending a database through an append operation.
Col. Shrapnel