Archive.php malfunction processing https

Hi,

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">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="https://example.com/piwik/index.php?module=API&method=VisitsSummary.getVisits&idSite=10&period=week&date=last2&format=php&token_auth=adc882b2f5c51a6dc67866837348e16e&trigger=archivephp">here</a>.</p>
</body></html>

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.

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]
Correct.

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