Archive.php malfunction processing https



I am experiencing problems when tracking https with PiWik (1.7.1) and archive.php:

AFAICS every request raises a PHP Notice

PHP Notice:  unserialize(): Error at offset 0 of 420 bytes in .../piwik/misc/cron/archive.php on line 412

The error log shows

Archived website id = 10, period = day, Time elapsed: 0.210s
ERROR: Error unserializing the following response: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<title>301 Moved Permanently</title>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="">here</a>.</p>

Apparently there is nothing to unserialize…

Anyone knows a workaround? Due to high traffice the archive.php script is run every 10mins resulting to 1 mail every 10 mins from cron during central european working time :frowning:

Changing PHP error_reporting mask won’t herp much as PiWik checks the result of the (failing) unserialize call and decides to log the error.

(Matthieu Aubry) #2

Your server returns a 301 Moved Permanently

which means redirection

the piwik URL specified is not correct, check www or without etc.


[quote=matt]Your server returns a 301 Moved Permanently
which means redirection[/quote]

I changed the archive.php cronjob to use HTTPS, now it works.