Forum Moderators: coopster
in javascript, from time to time certain text characters will cause the Apache server running Php 5.0 to return the http 1.1 status of 406 Not Acceptable. After much effort it was found to be caused by several characters in the text, noteably #, %, and chr(128). This behavior was only partly suppressed by escaping the text as in escape(text). It seems as thought our hosting company has placed some security filters with the change from php4.3 to php5.0.
Although encodeURIComponent(text) will behave pretty well we had to resort to some ad hoc gimmickry to make it behave with any input text a user might present and not cause the 406 problem. On the server side, we found that $_GET array, and indeed the php script was never even receiving the variables due to the Apache 406 treatment.
The test case is with % (%25). I am not happy with our solution because we must actually replace % with another character in the javascript, URI encode it, send it over, utf8_decode() it, and then change it back to % in the php script. Not elegant at all.
If you additional info about this, I would like to know whats going on.