I'm hosting my PHP web site on a shared web hosting account, so I'm not sure what may be causing this since I don't have direct access to the server.
The page in question is very simple. Its PHP script receives data via a GET request and fills out the form on the page with it (as defaults before the user fills out the rest.)
For instance, it may accept a URL as such:
http://www.example.com/test.php?id=sendform&name=somename&ver=1.0&desc=some%20description
Then the PHP script reads parameters passed to it (via functions like stripslashes($_REQUEST['desc']);
) and creates the HTML markup with form fields filled out with the data passed to it.
So this was working fine, until I noticed that if I pass a long URL (I don't know the exact limit, but for instance my test URL is 1,280 characters long) the script in my test.php
does not execute and the page hangs up for a long time until the browser times out with an error.
I first thought that the stripslashes($_REQUEST['desc']);
call was to blame, and thus I stripped out everything except a simply line:
print("Got to the end");
which still got hung up with a long URL.
So I'm curious, why is this happening? And how to prevent this "hang up"?