News:

Want to get involved in developing SMF? Why not lend a hand on our GitHub!

Main Menu

SMF 2.1.3 and MariaDB 10.4.27

Started by Daretary, March 19, 2023, 11:35:50 AM

Previous topic - Next topic

Daretary

Hello dear developers!

SMF 2.1.3 works on this configuration: PHP 8.2.0 + MariaDB 5.4.27.

But doesn't work on: PHP 8.2.0 + MariaDB 10.4.27:
Warning: Trying to access array offset on value of type null in /Sources/Subs-Db-mysql.php on line 590
Table 'db.smf_settings' doesn't exist
Subs-Db-mysql.php:589-590:
if ($query_errno != 1213 && $query_errno != 1205 && function_exists('log_error'))
log_error($txt['database_error'] . ': ' . $query_error . (!empty($modSettings['enableErrorQueryLogging']) ? "\n\n$db_string" : ''), 'database', $file, $line);

Arantor

Eh, what is MariaDB 5.4? I don't see 5.4 listed on https://mariadb.com/kb/en/new-and-old-releases/

That said, I don't know why it would fail on 10.4 for you - the error you're getting implies the table flat out doesn't exist which implies it wasn't installed properly (or if you somehow upgraded from a 5.x to 10.x without running the table upgrades)
Holder of controversial views, all of which my own.


Daretary

SMF was updated from 1.1.21 on the system:
PHP Version 7.4.4
FreeBSD 11.4
MySQL 5.6.47
Apache/2.2.34 (FreeBSD) mod_fcgid/2.3.9
Database client version: libmysql - mysqlnd 5.0.11-dev

This runs great on
Windows 11
XAMPP
PHP 8.2.0 I taken from this: https://www.apachefriends.org/blog/new_xampp_20221229.html
MariaDB 5.4.27 I had to take from this: https://www.apachefriends.org/blog/new_xampp_20221122.html

Quoteupgraded from a 5.x to 10.x without running the table upgrades
Is there a way to update tables for 10.x?

Arantor

How exactly did you do the update for SMF? It sounds like you think the update of the components was done in place but maybe not here?
Holder of controversial views, all of which my own.


Daretary


Arantor

I don't believe we've tested it on anything so recent. SMF 2.1 definitely runs on 10.4 though.

I'm not sure that's your issue though...
Holder of controversial views, all of which my own.


shawnb61

FYI, one of my SMF 2.1.3 test environments is on PHP 8.2, MariaDB 10.10.2.  Everything works fine. 

The fact that the settings table doesn't exist at all points to something else going on here... 

Exactly how was the environment migrated from MariaDB 5.4 to 10.4? 

Have you tried a new install in 10.4?
A question worth asking is born in experience & driven by necessity. - Fripp

Daretary

Yes, thank you. I was hoping to transfer directly. It worked only by creating a dump and installing from the dump.

Or, alternatively, copying files from MariaDB 5:
ib_logfile1
ibdata1
innodb_table_stats.ibd
innodb_index_stats.ibd

This also works, but I don't know how reliable it is. :)

shawnb61

A question worth asking is born in experience & driven by necessity. - Fripp

Daretary


Advertisement: