View Full Version : Plugin Issues
Joshua2597
09-19-2019, 11:12 PM
Hello,
I am currently running 3.8.x
I am trying to install a 3.8 MOD and get this error when importing via ACP
Error: Call to undefined function mysql_query() in ..../admincp/plugin.php(2001) : eval()'d code on line 13
Trace Data:
#1 : vbstop() called in ..../includes/class_core.php on line 3834
#2 : vbulletin_exception_handler() called in on line
Var Type:
[ NULL ]
Var Data:
null
This happens because the plugin doesn't call the vBulletin database interaction methods but instead calls PHP's mysql_* library methods directly.
For example mysql_query in vBulletin should be converted to $db->query_read, but it also depends on what the SQL query wants to do. An UPDATE query should be called using $db->query_write instead.
Joshua2597
09-19-2019, 11:33 PM
This happens because the plugin doesn't call the vBulletin database interaction methods but instead calls PHP's mysql_* library methods directly.
For example, mysql_query in vBulletin should be converted to $db->query_read, but it also depends on what the SQL query wants to do. An UPDATE query should be called using $db->query_write instead.
When I went to run that I got this error
Static analysis:
4 errors were found during analysis.
Unexpected character. (near "$" at position 0)
Unexpected beginning of statement. (near "$" at position 0)
Unexpected beginning of statement. (near "db" at position 1)
Unexpected beginning of statement. (near "query_write" at position 5)
SQL query:
$db->query_write
MySQL said: Documentation
#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 '$db->query_write' at line 1
That indicates "$db->query_write" was put in the SQL query statement. The SQL query needs to be called using that function and not put in the actual statement. If you paste the pieces of code here then we might be able to supply the fix for you.
Joshua2597
09-20-2019, 12:41 PM
That indicates "$db->query_write" was put in the SQL query statement. The SQL query needs to be called using that function and not put in the actual statement. If you paste the pieces of code here then we might be able to supply the fix for you.
An error occurred while attempting to execute your query. The following information was returned.
error number: 1064
error desc: 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 '$db->query_write' at line 1
Can't really do much with that, we need to see the lines of code in the plugin that are throwing the errors.
Joshua2597
10-03-2019, 01:50 PM
Can't really do much with that, we need to see the lines of code in the plugin that are throwing the errors.
What do you mean by that?
Post the code of the hook/plugin that is causing the issue here so we can tell you exactly what to change in order to fix it.
Joshua2597
10-03-2019, 02:03 PM
Post the code of the hook/plugin that is causing the issue here so we can tell you exactly what to change in order to fix it.
Code is to long to post but it's this mod
https://vborg.vbsupport.ru/showthread.php?t=201274
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.