Ok so I have a f*ed up situation here.
My SuiteCRM was working just fine, itās installed on a server (almalinux 9) that has suite and a wordpress website, nothing else.
Database Server is not the same machine, is a dedicated mariadb cluster with maxscale on front.
So everything was working fine, my DB is utf8mb4_unicode_ci, was working like a charm.
Yesterday I performed an update on the underlying hypervisor and had to reboot them ā¦ so I did ā¦ simple systemctl poweroff on this VM + systemctl reboot on the hypervisor. There are several hypervisors, several web servers, most (not all) connected to the same database cluster.
Upon it coming back up, EVERYTHING is working BUT SuiteCRM.
When I check SuiteCRMās logs I have this:
[2023-10-13 10:16:45] request.CRITICAL: Uncaught PHP Exception mysqli_sql_exception: "COLLATION
'utf8mb4_unicode_ci' is not valid for CHARACTER SET 'utf8mb3'" at
/var/www/develop/public_html/sales/public/legacy/include/database/MysqliManager.php line 360
{"exception":"[object] (mysqli_sql_exception(code: 1253): COLLATION 'utf8mb4_unicode_ci' is not valid
for CHARACTER SET 'utf8mb3' at
/var/www/develop/sales/public/legacy/include/database/MysqliManager.php:360)"} []
There are many tutorials online. You have to set up XDEBUG in your php.ini, and use some IDE such as PhpStorm, Visual Studio, Eclipse, VS Codeā¦
If your IDE lives in a different computer than your server, then you also have to get some way of sharing the source directories between the two places.
It will take you a while to get things going, but itās a total game-changer in terms of SuiteCRM development speed and quality. You also learn SuiteCRM a lot faster because you see how the internals work.
well Iām not a developer but sysadmin, eventually I can set that up but itāll take some time. debugging apps is not something I do in my day to day
I use Sublime Text for whatās needed.
By the way, after some looking around I found this - well, re-found actually cause I had been over this somewhen.
I am starting to imagine the reboot didnāt actually affect the web server where SuiteCRM resides, but a setting that had already been changed long ago and now apparently reverted to the original value (from MariaDB 10.6 onwards).
Itās a variable called old_mode
mysql> show variables like 'old_mode';
+---------------+-----------------+
| Variable_name | Value |
+---------------+-----------------+
| old_mode | UTF8_IS_UTF8MB3 |
+---------------+-----------------+
1 row in set (0.03 sec)
mysql>
If I remember correctly this setting has to be empty (value) in order for it to go utf8mb4.
From MariaDB 10.6.1, the main name of the previous 3 byte utfcharacter set has been changed to utf8mb3. If set, the default, utf8 is an alias for utf8mb3. If not set, utf8 would be an alias for utf8mb4.
So anyway Iām going to enforce this on the nodes mariadb server settings - so I can powercycle the nodes and donāt get back to this again - and see if it solves (Iām pretty sure it will), Iāll get back with some feedback in a few moments.
mysql> show variables like 'old_mode';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| old_mode | |
+---------------+-------+
1 row in set (0.02 sec)
mysql>
had to add old_mode = ""
to all nodes configuration. After restarting the mariadb service on all, confirmed the value was empty, SuiteCRM working again 100%.
Hey there. Nice work above. Just wanted to throw in a step-by-step on this to change the contents of āold_modeā to the empty string āā since I am not a mysql master and others might find it helpful:
log into mysql: mysql -u root -p
make sure your db looks like his above: show variables like 'old_mode'; There should be contents UTF8_IS_UTF8MB3 associated with variable old_mode in the table.
Delete the UTF8_IS_UTF8MB3 and replace with the great nothing āā : SET old_mode = "";
Check to make sure itās now blank with same command: show variables like 'old_mode';
Hope this helps and thanks to all of you.