In php 5.2.0, there’s a bug in the built-in json_encode/json_decode (PHP :: Bug #38680 :: json_decode won’t decode json_encode). I originally put in a workaround and tested with a pure 5.2.0, but I forgot about sites using custom 5.2.0 builds. In core/Cookie.php, change two occurrences of:
if(PHP_VERSION == '5.2.0')
to
if(PHP_VERSION < '5.2.1')
This should also fix the json_decode issue for php 5.1.x which doesn’t have the json extension (i.e., using the upgradephp library instead).
Casey: good catch. I’ve changed this line in core/Controller.php from:
I’m now running Piwik on a vanilla php 5.1.6 and able to login successfully. (I also tested the upgrade from 1.0.)
To recap, these are the fixes in the repackaged/re-released 1.1 (about 8 hrs ago): (Note: if you upgraded using the earlier 1.1 release, you can apply these patches manually, rather than downloading and unzipping the latest.zip.)
With PHP 5.2.14 (Infomaniak.ch), with all patches applied, and after having removed all cookies, I still cannot login.
First login try with superuser login, I get a “form security code expired or incorrect…” (translated from french) then successive tries lead to a new login form (without any error message).
I’m re-testing piwik manually with different php versions. I just did 5.1.6, and now I’m on 5.2.0. I’ll be testing 5.2.6, 5.2.14, and 5.2.16 to get some more coverage.
we released Piwik 1.1.1 with all the commits referenced in this thread.
If after upgrade to Piwik 1.1.1, you still experience an issue logging in Piwik, please create a new thread or contact us at hello@piwik.org if you are willing to send FTP/SSH access