AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   SourceBans / SourceBans++ (https://forums.alliedmods.net/forumdisplay.php?f=152)
-   -   1064 Error on 1.6.4 (https://forums.alliedmods.net/showthread.php?t=335190)

bid 11-14-2021 04:48

1064 Error on 1.6.4
 
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:
Code:

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:
Code:

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:
Code:

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,
bid

DJ Tsunami 11-14-2021 06:56

Re: 1064 Error on 1.6.4
 
"function" became a reserved word in MySQL 8.0.1, so you probably need to surround it with backticks (`function`) in includes/xajax.inc.php on line 739.

bid 11-14-2021 07:28

Re: 1064 Error on 1.6.4
 
Line 739 in xajax.inc.php is this:
Code:

$oResponse = $this->_callFunction($sFunctionName, $aArgs);
Line 1090 in xajax.inc.php is this:
Code:

$mReturn = call_user_func_array($sFunction, $aArgs);
What I have to change there?

DJ Tsunami 11-14-2021 07:53

Re: 1064 Error on 1.6.4
 
I guess it's in includes/CSystemLog.php. Line 89, 103 and maybe 129.

Best to create an issue on the SB++ GitHub so they can fix it.


All times are GMT -4. The time now is 11:44.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.