Topic on Project:Support desk

SQL code - Not Acceptable

4
188.167.152.251 (talkcontribs)

Hi,

I have problem with inserting SQL code into my mediawiki's page. If I insert SQL code like

INSERT INTO user VALUES(1, 'Tom');

and a try to save my page (or I click on Show preview), I get the following message

Not Acceptable

An appropriate representation of the requested resource /mw/index.php could not be found on this server.

Apache/2.2.21 Server at knowledge-base.hu Port 80

on a new page.

Versions I use:

MediaWiki 1.22.4
PHP 5.3.20 (cgi-fcgi)
MySQL 5.1.53-log

The url is http://knowledge-base.hu/mw (sorry I use it as a private wiki, no access for foreign users)

Thanks!

88.130.101.168 (talkcontribs)

Hi!

This problem is caused by mod_security. This piece of code (and many other as well) hit one of mod_security's filters and so cause this issue. Changing mod_security's settings or simply deactivating mod_security will solve this.

188.167.152.251 (talkcontribs)

Hi,

The problem is my hosting services provider dosn't allow me to change mod_security because of security issues. Could you suggest some other solution?

Tanks for the reply.

88.130.101.228 (talkcontribs)

I mean: You can also solve this by not using those terms, which hit the filters. That will prevent the error as well. However, this will be a nice obstacle course. And if you ask me this is absolutely no solution.

Either you change the settings or you change the hoster (and then to one, which does not prevent MediaWiki from working correctly). I think there are not many other options... :-(

Reply to "SQL code - Not Acceptable"