Piwik down since last upgrade - MySQLi error


I upgraded last thursday to the latest version (2.8.0). Since then all the graphs are flat. When looking in the logs, I can see MySQL errors:

PHP Fatal error: Call to undefined method Piwik\Db\Adapter\Mysqli::fetch() in /tank/www/piwik/core/Tracker/Model.php on line 353

How comes?



I have tried a fresh upload of the Piwik source code instead of an upgrade. Same issue, Piwik is down.
Help please.

I have rollbacked my Piwik to 2.7.0 and it works now…

How are you using Piwik, with the Javascript tracker file?

Are you doing anything special with Piwik?

Can you paste the full log line for this error?


Yes Javascript tracker.
Nothing special: hosted on Nginx 1.6.1 PHP 5.5.16 MySQL 5.6.19 on Debian latest
Here is the log I have in the nginx error log file:

[19-Oct-2014 04:57:55 UTC] PHP Fatal error:  Call to undefined method Piwik\Db\Adapter\Mysqli::fetch() in /tank/www/piwik/core/Tracker/Model.php on line 353
2014/10/19 06:57:55 [error] 14278#0: *5088941 open() "/usr/local/nginx/html/50x.html" failed (2: No such file or directory), client: 82.120.163.xxx, server: piwik.xxxx.com, request: "GET /piwik.ph
cours%2Fc228364.html&pdf=1&qt=1&realp=1&wma=1&dir=1&fla=1&java=1&gears=0&ag=0&cookie=1&res=1680x1050&gt_ms=253 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock", host: "piwik.xxx.com",
 referrer: "http://www.xxx.com/campaign/xxx"

Is there a way of having a better debug log?

Thanks for the report, please try this fix which should solve the isssue fixes #6475 use Tracker adapter rather at all times in tracker · matomo-org/matomo@c2533e1 · GitHub

Hello Matt,

I have upgraded back to 2.8.0 and applied the patch. No more errors in the logs so as far I know, that seems to be a fix.
I let you know if I come across any problem.

Thanks a lot,



Excellent that’s what i like to hear! it was actually a regression from me that I put in to make the automated tests pass, but unfortunately this created a worse issue. Now it’s fixed and we’ll even simplify Db handling code in the future