Solved

PHP - Error when submitting page: Request-URI too large

Posted on 2010-08-13
6
1,160 Views
Last Modified: 2013-12-13
I have a PHP program that submits a query to a remote database. There are options to have 10 to 50 items displayed on the screen. When I choose 10 items to display, all works well.

When I choose 30 to 50, I get the

Request-URI too large error
The requested URL's length exceeds the capacity limit for this server.

I understand "why" the error is tripped, but I can't figure out where in the code to look. If I try message, nothing displays to the screen. What I think I need is a PHP "error catcher" or something like that.

Any ideas?



0
Comment
Question by:Webspeeder
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 

Author Comment

by:Webspeeder
ID: 33432194
I tried inserting this at the top of each program:

ini_set('display_errors', 1);
error_reporting(E_ALL);

and it didn't work.
0
 
LVL 2

Expert Comment

by:Tekati68
ID: 33432305
Can you change your form from GET to POST?  That would eliminate the issue altogether.

So if you are using $_GET['var'] you will need to change those to $_POST['var'].  If you are using $_REQUEST['var'] then you do not need to change anything.

Not saying you are using $_REQUEST but if you are please use $_POST or $_GET as it is the proper way.

If I am way off the mark here post some code so I can help you further.
0
 

Author Comment

by:Webspeeder
ID: 33432341
I'm actually in talks with the people in control of the remote database to set it up for a post. Right now I believe it is using a get because of the error.

The $_GET[], if the parameters are sent via the URL, will the $_POST[] work?
0
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 
LVL 2

Accepted Solution

by:
Tekati68 earned 500 total points
ID: 33432411
If you look on your form it will look something like...

<form method="get" action="submit.php">

If your form does have method="get" or it does not have a method declaration at all add one to it and make it action="post"
0
 

Author Comment

by:Webspeeder
ID: 33432494
I knew that. I had tunnel vision, making it too complicated.
0
 

Author Comment

by:Webspeeder
ID: 33432504
Thanks.
0

Featured Post

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
In threads here at EE, each comment has a unique Identifier (ID). It is easy to get the full path for an ID via the right-click context menu. However, we often want to post a short link within a thread rather than the full link. This article shows a…
The viewer will learn how to count occurrences of each item in an array.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question