Fatal Error trying to update to 2.1.0



I absolutely love Piwik. It is soooo useful for my small website.

Yesterday I tried to update to 2.1.0 but recived the following error messages, and I cannot find any way to get Piwik back on my website??

Fatal error: Undefined class constant ‘Piwik\ReportRenderer::CSV_FORMAT’ in /home/a2515/public_html/piwidir/core/Plugin/Manager.php on line 736

Fatal error: Call to undefined method Piwik\Piwik::hasUserSuperUserAccess() in /home/a2515/public_html/piwidir/plugins/CorePluginsAdmin/Controller.php on line 364

I have also deleted config/config.ini.php as recommended in the Help section.

Please would you advise an Idiots guide to how I can get Piwik back asap.

Thank you so much.



It seems that the update wasn’t complete.
Download PIWIK from and upload it via FTP to your server.


Thanks for your reply 0-0. I really do appreciate the help that youy guys give.

I have now uploaded latest.zip to my cPanel. So now, in my public_html section, I have a folder called “piwikdir” and also the “latest.zip” file

Sorry for the silly beginners question, but what do I need to do now?

Do I unzip the latest.zip file to my previous “piwikdir” folder? If so, do I select overwrite all files? And if i do, will this delete all previous historical data?

Thank you very much in advance for whatever guidance you can give.




Yeah, that’s what I wanted to say.

The files mentioned in the error messages are from the previous piwik-version you had.
You should be able to verify this by going to “System Check” in the piwik admin menue: The row “File integrety” should show that there is a problem.

Overriding the files doesn’t affect your tracked data. This is because all that stuff is stored somewhere in a DB and not on the filesystem.


Thanks for the clarification about the tracked data.

I extracted the latest.zip file to my previous “piwidir” folder and it extracted all the files.

Then I went to www.mydomain.com/piwidir but I still receive the same error message as before?

Please would you let me know if I am doing something wrong? Please could you also advise how do I get to the System Admin menu?

Thanks a lot for your continued patience.



It seems that config/config.ini.php is not there anymore (that was the file which I deleted after reading the re-install instructions on Piwik website).

Could this be the problem? If so, how do I re-install it?




I managed to check one of the error referred to on Line 736 which is

Fatal error: Undefined class constant ‘Piwik\ReportRenderer::CSV_FORMAT’ in /home/a2515/public_html/piwidir/core/Plugin/Manager.php on line 736

Line 736 is

$newPlugin = new $namespacedClass;

If that helps?


…or maybe i should just delete everything in the “piwidir” folder and then re-install?

would i lose any information or any of my settings?

sorry for asking, but I would really like to get my best friend, Piwik, back again asap.

Thanks in advance.



Nevermind about the System check at this point. I forgot that most likely you can’t even reach it with a direct link at the moment.

The error in core/Plugin/Manager.php shows that a second time something went wrong with extracting the files:

Line 736 in 2.0.3(matomo/Manager.php at 2.0.3 · matomo-org/matomo · GitHub), what you seem to have

$newPlugin = new $namespacedClass;

and line 736 in 2.1.0(matomo/Manager.php at 2.1.0 · matomo-org/matomo · GitHub), what you shuld have

* @throws \Exception

I think the other error would show something similar.

But lets just do it step by step:
[li] Download http://builds.piwik.org/piwik-2.1.0.zip to your local computer.
[/li][li] Extract the archive on your PC. All files (exept for a readme) are now in a folder with the name “piwik”.
[/li][li] Get some FTP client like Filezilla(https://filezilla-project.org/) and the FTP login data for your server.
[/li][li] Upload the contents of the extracted “piwik”-folder (on your PC) into the “piwikdir”-folder (on your server).
[/li][li] In your browser open Piwik: Now you should have the first installation screen.
[/li][li] When this is working: If you have some backup or copy of “config.ini.php” copy it to “piwikdir/config/” on your server. If not you have to redo the installation. When you get to the DB-install site Piwik should detect that there is already data and ask you if you want to keep it.
[/li][li] Maybe you are promted to update your DB somewhen during the process(because it is still at the point of 2.0.3).
[/li][li]Now you are done and all should be working. To verify (possibly in the future) that all files are correctly updated you can go to “System Check”-page(http://piwik.yourserver.com/index.php?module=Installation&action=systemCheckPage) and see if “File Integrety” shows any issues.


0-0, thank you very much for your detailed instructions. Much appreciated.
I completed 1 & 2 but don;t know about FTP and so got stuck there. However, I was not able to find the config.ini.php file anywhere (not in the trash file) in my cPanel. So I guess I had to do a complete new install.
I will upload again by one-click method using Softalicious. Although this is still at 2.0.3.
Wish me luck :slight_smile:
But thanks again for your help. I think I need to learn how to FTP for the future?



Yeah, FTP can be very useful, especially as it is not that complicated nowadays:
Generally you only do drag & drop :wink:


Mmmm, I completely re-installed the 2.0.3 version of Piwik (via one-click Softaculous) and got it working fine.

Then I clicked on upgrade to 2.1.0. I used cPanel file manager to upload the new Zip file and then extracted it to my Piwik folder.

But I received the same error messages as previous:-

Fatal error: Undefined class constant ‘Piwik\ReportRenderer::CSV_FORMAT’ in /home/a2515/public_html/piwikdir/core/Plugin/Manager.php on line 736

Fatal error: Call to undefined method Piwik\Piwik::checkUserHasSuperUserAccessOrIsTheUser() in /home/a2515/public_html/piwikdir/plugins/LanguagesManager/API.php on line 227

Please would you advise what I should try to do next?

Thank you in advance for your kind guidance.


(Matthieu Aubry) #13

Backup your config/config.ini.php

delete all piwik files

upload 2.1.0

put back your config/config.ini from backup

try agian ?


I have exactly the same error. I’ve tried the steps above and it didn’t solve the problem.


Update: the problem seems to be with caching software. Flushed APC cache and it now works and has installed everything properly.