[RESOLVED] 413 Request Entity Too Large
When I try to pass a URL using GET and urlencode()/urldecode() from one page to another, I get the following error:
I'm doing this like so:
Request Entity Too Large
The requested resource
does not allow request data with GET requests, or the amount of data provided in the request exceeds the capacity limit.
GET requests are indeed allowed. How do I fix this? Thank you.
<a href="/dir/scriptB.php?country=CA&page= <?=urlencode('http://fqdn.net/dir/scriptC.php?%5Fencoding=UTF8&node='.$node);?>">Link name</a>
Last edited by hex1a4; 08-02-2008 at 11:59 PM.
Not sure about this, but theres probably something a max length in the php.ini, and your exceeding the set value.
Thank you, Kyleva2204, for your reply. That's what I thought at first, and it scared me a bit since I don't have access to php.ini. Turns out though that I should have entered a space after page= and <?=. Ironically, that's how I wrote it in my original post to make it easier to read instead of having this one long line. Once I put a space after page= everything works the way it should.
I wouldn't use <?= - Use <?php echo - Short tags will be gone in PHP 6.
As for the problem, I know that a URI can only have a max number of chars in it. IIRC it's well over 255.. The only thing I can think of is that php was reading it as "page=<=" - equal to or greater than equals...
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)