Hi, here is a solution to anyone else getting this error.
I’m running Ubuntu 22.04.01 VPS. I’ve noticed Matomo WP plugin stopped working after applying updates. After some research I found it was php-cli version 8.2.0 causing the issue. It apparently doesn’t support MySqli.
After downgrading php-cli back to 8.1.0 everything resumed working fine.
To downgrade just use this:
sudo update-alternatives --config php
There are 2 choices for the alternative php (providing /usr/bin/php).
Selection Path Priority Status
------------------------------------------------------------
0 /usr/bin/php8.2 82 auto mode
1 /usr/bin/php8.0 80 manual mode
* 2 /usr/bin/php8.1 81 manual mode
3 /usr/bin/php8.2 82 manual mode
Press <enter> to keep the current choice[*], or type selection number:
I hope this helps someone.