[solved] Cannot login to Piwik after updating to 2.4.1

Hello,

I have updated Piwik from 1.12 (yep, very old) to 2.4.1 by extracting the new version from latest.zip, copying my config.ini.php, setting owner/group to Apache and then running the SQL commands via SQLyog.

The same workflow has been used multiple times before, so there should be no problem with that. Piwik site is showing the new layout, but I cannot login: “username or password are not correct” (translated from German).

I have tried using the instructions from How do I change the Super User's password when password recovery emails are not sent? - Analytics Platform - Matomo but none of them worked. First I tried the pre-2.1-version using config.ini.php but I still got the same error message. Then I added a new admin user into the user table. There was no admin user before. Should Piwik have migrated the admin user from config.ini.php into a database entry? Whatsoever, still didn´t work.

When I use the “forgot password” function, Piwik tells me that either username or email-address are invalid. But that´s the username from config.ini.php and the email-address is correct, too.

I couldn´t find any errors in php.log oder apache´s error.log.

What might be the problem? Where can I find more info?

Lars

The root problem seems to be that Piwik doesn´t recognize the superuser login from config.ini.php anymore. Additionally, I probably made a mistake when creating the user in the database.

As a workaround, I renamed config.ini.php and let the Piwik installer create a new one, thereby reusing the existing tables. A user was created in the database and I was able to login.

After I copied my original config.ini.php back to it´s original place, I could still login, but now the layout was broken, menus didn´t work and no data was shown.

Turns out that Piwik apparently split up the configuation section “Plugins” to “PluginsInstalled” and “Plugins_Tracker”, but still uses the old section if it exists. Removed that section and Piwik looks fine again.

Created bug reports:
https://github.com/piwik/piwik/issues/5919
https://github.com/piwik/piwik/issues/5920

I had the same issue. On the server where I host Piwik, I host Wordpress with the iThemes Security plugin. The “Disable PHP in Uploads” option in this plugin coused the issue. I disabled it and now Piwik is working.

You disabled something in a Wordpress plugin to solve a problem with Piwik???
That sounds totally strange…

Or is Wordpress and Piwik installed in the same vhost and Wordpress using .htaccess so that Piwik might be affected, too?

Yes, Piwik is installed in the same host. the .htaccess could effect Piwik too in that case.