I am setting up a scheduled archiving task and executing the following command-line:
php.exe “C:\inetpub\wwwroot\analytics\misc\cron\archive.php” – url=https://piwik.mycompany.com/analytics/
I have SSL installed, and when using the URL from IE there are no certificate errors, and viewing the certificate shows a proper cert chain all the way up to the root. However, I get the following output:
[2012-10-02 13:55:54] [5a6123c1] ---------------------------
[2012-10-02 13:55:54] [5a6123c1] INIT
[2012-10-02 13:55:54] [5a6123c1] Querying Piwik API at: https://piwik.mycompany.com/analytics/index.php
[2012-10-02 13:55:54] [5a6123c1] Running as Super User: administrator
[2012-10-02 13:55:55] [5a6123c1] ERROR: Got invalid response from API request: https://piwik.mycompany.com/analytics/index.php?module=API&method=API.getDefaultMetricTranslations&format=php&trigger=archivephp. Response was ‘curl_exec: SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed’
[2012-10-02 13:55:55] [5a6123c1] ERROR: The Piwik URL https://piwik.mycompany.com/analytics/index.php does not seem to be pointing to a Piwik server. Response was ‘’.
If I add the --accept-invalid-ssl-certificate parameter everything works fine, but I’d rather figure out why the SSL cert isn’t working for the command-line archive versus the browser-based archive.