I’d like to give a user the option of making SQL queries. I placed a textarea into the used form.
When I entered this query SELECT name FROM user ORDER BY name ASC , it returned expected result.
But when I tried to used WHERE clause SELECT name FROM user WHERE SUBSTRING(name, 1, 1) = 'J' ORDER BY name ASC or SELECT name FROM user WHERE id>1000 ORDER BY name ASC, neither of the SELECTs worked and I received the following error:
Not Acceptable
An appropriate representation of the requested resource /test/index.php could not be found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
What might be the cause of this problem? The first thing that came on my mind was the characters like > will make the URL invalid, but it’s not the case.
Some overcautious software like Suhosin or mod_security or the like, I believe.