Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on mysql 8? #758

Open
sleip82 opened this issue Nov 14, 2021 · 1 comment
Open

Error on mysql 8? #758

sleip82 opened this issue Nov 14, 2021 · 1 comment

Comments

@sleip82
Copy link

sleip82 commented Nov 14, 2021

Hi guys,

I got errors on my sb 1.6.4 installation under php 7.4.24 und mysql 8.0.25-15
PHP Infos:
https://bans.5bo.de/info.php
Sourcebans installation:
https://bans.5bo.de/

Adding ban comment:

#Error: the XML response that was returned from the server is invalid. Received:
Fatal error: mysqli error: [1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'function, query, aid, host, created) VALUES ('e','PHP Error','[256] mysqli' at line 1] in EXECUTE("INSERT INTO sb_log(type,title,message, function, query, aid, host, created) VALUES ('e','PHP Error','[256] mysqli error: [1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near \'function, query, aid, host, created)\n VALUES (\'m\',\'Comment Added\',\'Sleip ad\' at line 1] in EXECUTE(\"INSERT INTO sb_log(type,title,message, function, query, aid, host, created)\n VALUES (\'m\',\'Comment Added\',\'Sleip added a comment for ban #3312\',\'/home/webpages/lima-city/sleip/webseiten/5bo.de/bans.5bo.de/includes/xajax.inc.php - 1090
/home/webpages/lima-city/sleip/webseiten/5bo.de/bans.5bo.de/includes/xajax.inc.php - 739
/home/webpages/lima-city/sleip/web in /home/webpages/lima-city/sleip/webseiten/5bo.de/bans.5bo.de/includes/adodb/adodb-errorhandler.inc.php on line 79
You have whitespace in your response.

Adding comms comment:

Error: the XML response that was returned from the server is invalid. Received:
Fatal error: mysqli error: [1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'function, query, aid, host, created) VALUES ('e','PHP Error','[256] mysqli' at line 1] in EXECUTE("INSERT INTO sb_log(type,title,message, function, query, aid, host, created) VALUES ('e','PHP Error','[256] mysqli error: [1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near \'function, query, aid, host, created)\n VALUES (\'m\',\'Comment Added\',\'Sleip ad\' at line 1] in EXECUTE(\"INSERT INTO sb_log(type,title,message, function, query, aid, host, created)\n VALUES (\'m\',\'Comment Added\',\'Sleip added a comment for ban #59\',\'/home/webpages/lima-city/sleip/webseiten/5bo.de/bans.5bo.de/includes/xajax.inc.php - 1090
/home/webpages/lima-city/sleip/webseiten/5bo.de/bans.5bo.de/includes/xajax.inc.php - 739
/home/webpages/lima-city/sleip/webse in /home/webpages/lima-city/sleip/webseiten/5bo.de/bans.5bo.de/includes/adodb/adodb-errorhandler.inc.php on line 79
You have whitespace in your response.

Rcon console command:

Error: the XML response that was returned from the server is invalid. Received:
Fatal error: mysqli error: [1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'function, query, aid, host, created) VALUES ('e','PHP Error','[256] mysqli' at line 1] in EXECUTE("INSERT INTO sb_log(type,title,message, function, query, aid, host, created) VALUES ('e','PHP Error','[256] mysqli error: [1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near \'function, query, aid, host, created)\n VALUES (\'m\',\'RCON Sent\',\'RCON Command\' at line 1] in EXECUTE(\"INSERT INTO sb_log(type,title,message, function, query, aid, host, created)\n VALUES (\'m\',\'RCON Sent\',\'RCON Command was sent to server (62.113.241.66:25200): ökö\',\'/home/webpages/lima-city/sleip/webseiten/5bo.de/bans.5bo.de/includes/xajax.inc.php - 1090
/home/webpages/lima-city/sleip/webseiten/5bo.de/bans.5bo.de/includes/xajax.inc.php - 739
/home/webpage in /home/webpages/lima-city/sleip/webseiten/5bo.de/bans.5bo.de/includes/adodb/adodb-errorhandler.inc.php on line 79
You have whitespace in your response.

How can I fix this?

Kind regards,
sleip82

@CrazyHackGUT
Copy link
Contributor

function is reserved keyword since MySQL 8.0.1 (source). You can install MySQL 8.0.0 or lower, or just wait when developers fix query for inserting logs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants