Piwik 2.16.1 update error (500 on images/plugins etc)

The .htaccess on plugin directory seems to have change on update,
and this blocked Piwik from working properly.

So thats na unexcepted behavior of update,
not a really bad one but scary at first.

The same problem here. I had to add this to the Apache configuration in order to make it work:

<Directory /piwik/location/> AllowOverride FileInfo Limit </Directory>

But it should be mentioned during an upgrade that such a change may be needed.

What version did you guys update from? That bit of info would be helpful too.

In my case I haven’t experienced this error, but for the record, here’s my version history:

  • version 2.16.0 - first install
  • updated to 2.16.1-rc1
  • just updated to 2.16.1.

always up to date or so (bare some minutes/housr or sometime a day or two but i was uptodate) so
installed : You can update to version 2.16.1
from You can update to version 2.16.0

No db script (db is still quite small so)
just auto update.

The first version of my installation was 2.15.1-b2, then I have updated to 2.16.0 which went OK and now I have updated to 2.16.1. I also used autoupdate.

I suspect it could be a problem due to stricter AllowOverride Apache configuration we have.

Maybe you could create an issue/bug report on Issues · matomo-org/piwik · GitHub as we have not seen this issue before. Thanks!

I found that the .htaccess file creates a problem with the AddHandler directive. When I commented out that directive everything was fine after.

I had the same problem and you are right - this worked fine for me as well.
But I suspect this workaround to be a security issue and a problem for further updates so I would be happy to here about a solution in line with Piwiks security scheme and ready not to be a problem for further updates.

We would like also to fix the issue properly. Could you please create a bug report at https://github.com/piwik/piwik/issues and any suggestion /discussion about how to fix it, will be welcome too

Has an issue been created in github yet, I searched and could not find one. Unfortunately, I do not understand enough about the workaround suggested (commenting out the AddHandler directive).

This is on new install of Piwik 2.16.0 which I would like to update to 2.16.1

I do not want to lose data by doing fresh install. Any ideas?

@HappyNerds could you please create an issue on the issue tracker with your error you find in your server error log? Issues · piwik/piwik · GitHub

Hello all,

I ran into the same issue this morning during an upgrade (automatic via UI, database update by command line) from 2.16.0 to 2.16.1. After reading the above thread, I dug into the .htaccess files across the installation. I noticed that they were owned by root:root after the upgrade. Looking at previous installations I had archived, these files had all previously been owned by the web server user/group. I made a quick bash script to test the theory, ran it, and reloaded the page. Everything worked perfectly.

Bash script to change permissions quickly (replace values with system specific items)

#!/bin/bash
for i in $( find /path/to/piwik/ -name .htaccess);
do
	`/bin/chown webserver-user:webserver-group $i
done

UPDATE: I went back and looked at my command history and realized I ran the database update from command line as root, would this have caused the .htaccess files to be updated and owned by root:root for some reason?

Yes, the core:update also executes the update scripts which may re-create the .htaccess files - feel free to create a bug report or suggestion on our tracker: https://github.com/piwik/piwik/issues as ideally, we could detect when the console command is executed as root and warn users not to?

#10143 created.

Thanks, matthieu