News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Should $db type in settings.php be set to mysqli instead of mysql for MariaDB?

Started by PrimalPrime, November 07, 2023, 04:54:59 PM

Previous topic - Next topic

PrimalPrime

Error:

[Tue Nov 07 12:42:43.379860 2023] [proxy_fcgi:error] [pid 1006769:tid 23301038475008] [client 103.250.149.229:0] AH01071: Got error 'PHP message: PHP Fatal error:  Uncaught TypeError: mysqli_error(): Argument #1 ($mysql) must be of type mysqli, null given in /home/chatfree/public_html/Sources/Errors.php:464
Stack trace:
#0 /home/chatfree/public_html/Sources/Errors.php(464): mysqli_error(NULL)
#1 /home/chatfree/public_html/Sources/Subs-Db-mysql.php(101): display_db_error()
#2 /home/chatfree/public_html/Sources/Load.php(3765): smf_db_initiate('p:localhost', 'mydatabase...', 'mydatabase...', 'password{+', 'table_', Array)
#3 /home/chatfree/public_html/index.php(93): loadDatabase()
#4 {main}
  thrown in /home/chatfree/public_html/Sources/Errors.php on line 464', referer: https://chatfreespeech.com/index.php?room=politics

Link hinting at this: https://www.codeproject.com/Questions/5307396/I-am-facing-the-type-error-mysqli-query-argumentsh


Sir Osis of Liver

$db_type = 'mysql'; works fine for all my 2.0 and 2.1 installs running in MariaDB.

When in Emor, do as the Snamors.
                              - D. Lister

PrimalPrime

Uncaught TypeError: mysqli_error(): Argument #1 ($mysql) must be of type mysqli

But what about this mismatch?

Thank you

Sir Osis of Liver

When in Emor, do as the Snamors.
                              - D. Lister


PrimalPrime

I've installed datadog to give me a better picture of things and this made it easy to confirm this error is caused by a timeout between the websocket server and the database and too many connections to the database.

Advertisement: