I experience issues with the archive.php cron script. What am I doing wrong? Thank you.
The following is returned when I run the archive.php script.
INFO [2014-03-19 13:04:56] [4931a] ---------------------------
INFO [2014-03-19 13:04:56] [4931a] INIT
INFO [2014-03-19 13:04:56] [4931a] Querying Piwik API at: https://[domain]/analytics/index.php
INFO [2014-03-19 13:04:56] [4931a] Running Piwik 2.1.0 as Super User: [user]
INFO [2014-03-19 13:04:57] [4931a] ERROR: Got invalid response from API request: https://[domain]/analytics/index.php?module=API&method=API.getDefaultMetricTranslations&format=original&serialize=1&trigger=archivephp. Response was 'Got invalid response from API request: https://[domain]/analytics/index.php?module=API&method=API.getDefaultMetricTranslations&format=original&serialize=1&trigger=archivephp. The response was empty. This usually means a server error. This solution to this error is generally to increase the value of 'memory_limit' in your php.ini file. Please check your Web server Error Log file for more details.'
INFO [2014-03-19 13:04:57] [4931a] ERROR: The Piwik URL https://[domain]/analytics/index.php does not seem to be pointing to a Piwik server. Response was ''.
Error in the last Piwik archive.php run:
The Piwik URL https://[domain]/analytics/index.php does not seem to be pointing to a Piwik server. Response was ''.
Here is the full errors output:
---------------------------
INIT
Querying Piwik API at: https://[domain]/analytics/index.php
Running Piwik 2.1.0 as Super User: [user]
ERROR: Got invalid response from API request: https://[domain]/analytics/index.php?module=API&method=API.getDefaultMetricTranslations&format=original&serialize=1&trigger=archivephp. Response was 'Got invalid response from API request: https://[domain]/analytics/index.php?module=API&method=API.getDefaultMetricTranslations&format=original&serialize=1&trigger=archivephp. The response was empty. This usually means a server error. This solution to this error is generally to increase the value of 'memory_limit' in your php.ini file. Please check your Web server Error Log file for more details.'
ERROR: The Piwik URL https://[domain]/analytics/index.php does not seem to be pointing to a Piwik server. Response was ''.
Copying and pasting the https://[domain]/analytics/index.php url into a browser shows a Piwik’s login page.
Copying and pasting the other url into a browser shows some serialized data.
The super user’s user name is correct…
I have raised memory limit to 2048M but no help.
No error is reported in the web server log.
The users have full access rights for the piwik folder tree.
Allow Piwik archiving to trigger when reports are viewed from the browser = No.
Reports for today (or any other Date Range including today) will be processed at most every = 120 seconds.
allow_url_fopen = On
open_base_dir is the piwik’s root dir for running over apache (fcgi), and empty for running from a command prompt
curl is enabled
Got exactly the same message in my logs after upgrading to version 2.1.0 yesterday afternoon. I run the archive function in a cronjob every night.
INFO [2014-03-20 07:46:09] [277d6] ERROR: Got invalid response from API request: http://[domain]/piwik/index.php?module=API&method=API.getDefaultMetricTranslations&format=original&serialize=1&trigger=archivephp. The response was empty. This usually means a server error. This solution to this error is generally to increase the value of 'memory_limit' in your php.ini file. Please check your Web server Error Log file for more details.
INFO [2014-03-20 07:46:09] [277d6] ERROR: The Piwik URL http://[domain]/piwik/index.php does not seem to be pointing to a Piwik server. Response was ''.
Error in the last Piwik archive.php run:
The Piwik URL http://[domain]/piwik/index.php does not seem to be pointing to a Piwik server. Response was ''.
Here is the full errors output:
---------------------------
INIT
Querying Piwik API at: http://[domain]/piwik/index.php
Running Piwik 2.1.0 as Super User: admin
ERROR: Got invalid response from API request: http://[domain]/piwik/index.php?module=API&method=API.getDefaultMetricTranslations&format=original&serialize=1&trigger=archivephp. The response was empty. This usually means a server error. This solution to this error is generally to increase the value of 'memory_limit' in your php.ini file. Please check your Web server Error Log file for more details.
ERROR: The Piwik URL http://[domain]/piwik/index.php does not seem to be pointing to a Piwik server. Response was ''.
just updated to the latest Beta but no luck on the achieve script sadly. If i turn the option for Archiving under General Settings to “trigger from the browser” , it works ok.
INFO [2014-03-22 08:09:17] ERROR: Got invalid response from API request: http://[domain]/piwik/index.php?module=API&method=API.getDefaultMetricTranslations&format=original&serialize=1&trigger=archivephp. The response was empty. This usually means a server error. This solution to this error is generally to increase the value of 'memory_limit' in your php.ini file. Please check your Web server Error Log file for more details.
INFO [2014-03-22 08:09:17] ERROR: The Piwik URL http://[domain]/piwik/index.php does not seem to be pointing to a Piwik server. Response was ''.
Error in the last Piwik archive.php run:
The Piwik URL http://[domain]/piwik/index.php does not seem to be pointing to a Piwik server. Response was ''.
Here is the full errors output:
---------------------------
INIT
Piwik is installed at: http://[domain]/piwik/index.php
Running Piwik 2.1.1-b6 as Super User: admin
ERROR: Got invalid response from API request: http://[domain]/piwik/index.php?module=API&method=API.getDefaultMetricTranslations&format=original&serialize=1&trigger=archivephp. The response was empty. This usually means a server error. This solution to this error is generally to increase the value of 'memory_limit' in your php.ini file. Please check your Web server Error Log file for more details.
ERROR: The Piwik URL http://[domain]/piwik/index.php does not seem to be pointing to a Piwik server. Response was ''.
DiskStation>
I’ve got the exact same issue with running archive.php:
This is on a Windows Server 2008 R2, Apache 2.4.4 and PHP5.4.16
Output as follows:
INFO [2014-04-02 23:43:12] [741ec] ---------------------------
INFO [2014-04-02 23:43:12] [741ec] INIT
INFO [2014-04-02 23:43:12] [741ec] Querying Piwik API at: https://[piwikdomain]/index.php
INFO [2014-04-02 23:43:12] [741ec] Running Piwik 2.1.0 as Super User: piwik_su
INFO [2014-04-02 23:43:13] [741ec] ERROR: Got invalid response from API request: https://[piwikdomain]/index.php?module=API&method=A
PI.getDefaultMetricTranslations&format=original&serialize=1&trigger=archivephp. Response was 'Got invalid response from API request: https://
[piwikdomain]/index.php?module=API&method=API.getDefaultMetricTranslations&format=original&serialize=1&trigger=archivephp. The respo
nse was empty. This usually means a server error. This solution to this error is generally to increase the value of ‘memory_limit’ in your ph
p.ini file. Please check your Web server Error Log file for more details.'
php.exe : Error in the last Piwik archive.php run:
The Piwik URL https://[piwikdomain]/index.php does not seem to be pointing to a Piwik server. Response was ‘’.
Here is the full errors output:
INIT
Querying Piwik API at: https://[piwikdomain]/index.php
Running Piwik 2.1.0 as Super User: piwik_su
ERROR: Got invalid response from API request: https://[piwikdomain]/index.php?module=API&method=API.getDefaultMetricTranslations&for
mat=original&serialize=1&trigger=archivephp. Response was 'Got invalid response from API request: https://[piwikdomain]/index.php?mo
dule=API&method=API.getDefaultMetricTranslations&format=original&serialize=1&trigger=archivephp. The response was empty. This usually means a
server error. This solution to this error is generally to increase the value of ‘memory_limit’ in your php.ini file. Please check your Web s
erver Error Log file for more details.'
ERROR: The Piwik URL https://[piwikdomain]/index.php does not seem to be pointing to a Piwik server. Response was ‘’.
INFO [2014-04-02 23:43:13] [741ec] ERROR: The Piwik URL https://[piwikdomain]/index.php does not seem to be pointing to a Piwik serv
er. Response was ‘’.
@Matt, sorry can’t find the php log file yet. I’m running it on a synology and the default php log file seems to be emtpy of errors…as in, not logging them to that file.
I’ve updated to the latest beta a few days ago which now points to a new updater file to be used but sadly the result is the same.
Hello!
Observing the same problem after upgrading to Piwik 2.1.
Upgrading to the latest beta version (Piwik 2.1.1-b6 ) did not help.
The problem there as well when running on the cron, as well as archiving when entering the web analytics browser.
INFO [2014-04-04 17:24:02] ---------------------------
INFO [2014-04-04 17:24:02] INIT
INFO [2014-04-04 17:24:02] Piwik is installed at: https://my_site.com/piwik/index.php
INFO [2014-04-04 17:24:02] Running Piwik 2.1.1-b6 as Super User: %Username%
INFO [2014-04-04 17:24:02] ---------------------------
INFO [2014-04-04 17:24:02] NOTES
/// Info are deleted, they are not prevented
INFO [2014-04-04 17:24:02] ---------------------------
INFO [2014-04-04 17:24:02] START
INFO [2014-04-04 17:24:02] Starting Piwik reports archiving...
INFO [2014-04-04 17:24:02] ERROR: Got invalid response from API request: https://my_site.com/piwik/index.php?module=API&method=API.get&idSite=1&period=day&date=last52&format=php&token_auth=%token%&trigger=archivephp. The response was empty. This usually means a server error. This solution to this error is generally to increase the value of 'memory_limit' in your php.ini file. Please check your Web server Error Log file for more details.
INFO [2014-04-04 17:24:02] WARNING: Empty or invalid response '' for website id 1, Time elapsed: 0.119s, skipping
INFO [2014-04-04 17:24:02] Done archiving!
INFO [2014-04-04 17:24:02] ---------------------------
INFO [2014-04-04 17:24:02] SUMMARY
INFO [2014-04-04 17:24:02] Total daily visits archived: 0
INFO [2014-04-04 17:24:02] Archived today's reports for 0 websites
INFO [2014-04-04 17:24:02] Archived week/month/year for 0 websites
INFO [2014-04-04 17:24:02] Skipped 1 websites: no new visit since the last script execution
INFO [2014-04-04 17:24:02] Skipped 0 websites day archiving: existing daily reports are less than 3600 seconds old
INFO [2014-04-04 17:24:02] Skipped 0 websites week/month/year archiving: existing periods reports are less than 3600 seconds old
INFO [2014-04-04 17:24:02] Total API requests: 0
INFO [2014-04-04 17:24:02] done: 0/1 0%, 0 v, 0 wtoday, 0 wperiods, 0 req, 119 ms, 1 errors. eg. 'Got invalid response from API request: https://my_site.com/piwik/index.php?module=API&method=API.get&idSite=1&period=day&date=last52&format=php&token_auth=%token%&trigger=archivephp. The response was empty. This usually means a server error. This solution to this error is generally to increase the value of 'memory_limit' in your php.ini file. Please check your Web server Error Log file for more details.'
INFO [2014-04-04 17:24:02] Time elapsed: 0.119s
INFO [2014-04-04 17:24:02] ---------------------------
INFO [2014-04-04 17:24:02] SCHEDULED TASKS
INFO [2014-04-04 17:24:02] Starting Scheduled tasks...
INFO [2014-04-04 17:24:02] sh: fork: Cannot allocate memory
INFO [2014-04-04 17:24:02] done
INFO [2014-04-04 17:24:02] ---------------------------
INFO [2014-04-04 17:24:02] ---------------------------
INFO [2014-04-04 17:24:02] SUMMARY OF ERRORS
INFO [2014-04-04 17:24:02] Error: Got invalid response from API request: https://my_site.com/piwik/index.php?module=API&method=API.get&idSite=1&period=day&date=last52&format=php&token_auth=%token%&trigger=archivephp. The response was empty. This usually means a server error. This solution to this error is generally to increase the value of 'memory_limit' in your php.ini file. Please check your Web server Error Log file for more details.
INFO [2014-04-04 17:24:02] 1 total errors during this script execution, please investigate and try and fix these errors
INFO [2014-04-04 17:24:02] ERROR: 1 total errors during this script execution, please investigate and try and fix these errors. First error was: Got invalid response from API request: https://my_site.com/piwik/index.php?module=API&method=API.get&idSite=1&period=day&date=last52&format=php&token_auth=%token%&trigger=archivephp. The response was empty. This usually means a server error. This solution to this error is generally to increase the value of 'memory_limit' in your php.ini file. Please check your Web server Error Log file for more details.
Updated to 2.2.0-b16.
When you first run through the task cron received:
------------------------------------------------------- Using this 'archive.php' script is no longer recommended. Please use '/path/to/php %path_to_my_site%/piwik/console core:archive --url=https://my_site.com/piwik/piwik.php' instead. To get help use '%path_to_my_site%/piwik/console core:archive --help' -------------------------------------------------------
INFO [2014-04-07 16:25:03] [e48bd] ---------------------------
INFO [2014-04-07 16:25:03] [e48bd] INIT
INFO [2014-04-07 16:25:03] [e48bd] Piwik is installed at: https://my_site.com/piwik/piwik.php/index.php
INFO [2014-04-07 16:25:03] [e48bd] Running Piwik 2.2.0-b16 as Super User: %Username%
INFO [2014-04-07 16:25:03] [e48bd] ERROR: Got invalid response from API request: https://my_site.com/piwik/piwik.php/index.php?module=API&method=API.getDefaultMetricTranslations&format=original&serialize=1&trigger=archivephp. The response was empty. This usually means a server error. This solution to this error is generally to increase the value of 'memory_limit' in your php.ini file. Please check your Web server Error Log file for more details.
INFO Piwik\CronArchiveFatalException[2014-04-07 16:25:03] [e48bd] ERROR: The Piwik URL https://my_site.com/piwik/piwik.php/index.php does not seem to be pointing to a Piwik server. Response was ''.
I followed the instructions and entered the proposed line in cron. Received:
INFO CoreConsole[2014-04-07 16:30:01] [0d480] ---------------------------
INFO CoreConsole[2014-04-07 16:30:01] [0d480] INIT
INFO CoreConsole[2014-04-07 16:30:01] [0d480] Piwik is installed at: https://my_site.com/piwik/piwik.php/index.php
INFO CoreConsole[2014-04-07 16:30:01] [0d480] Running Piwik 2.2.0-b16 as Super User: %Username%
INFO CoreConsole[2014-04-07 16:30:02] [0d480] ERROR: Got invalid response from API request: https://my_site.com/piwik/piwik.php/index.php?module=API&method=API.getDefaultMetricTranslations&format=original&serialize=1&trigger=archivephp. The response was empty. This usually means a server error. This solution to this error is generally to increase the value of 'memory_limit' in your php.ini file. Please check your Web server Error Log file for more details.
INFO CoreConsole[2014-04-07 16:30:02] [0d480] ERROR: The Piwik URL https://my_site.com/piwik/piwik.php/index.php does not seem to be pointing to a Piwik server. Response was ''.
I realized that the proposed line is incorrect, and contains extra element piwik.php
A small error, I think you fix
Deleted it has launched the new and received:
INFO CoreConsole[2014-04-07 16:33:01] [99597] ---------------------------
INFO CoreConsole[2014-04-07 16:33:01] [99597] INIT
INFO CoreConsole[2014-04-07 16:33:01] [99597] Piwik is installed at: https://my_site.com/piwik/index.php
INFO CoreConsole[2014-04-07 16:33:01] [99597] Running Piwik 2.2.0-b16 as Super User: %Username%
INFO CoreConsole[2014-04-07 16:33:01] [99597] ---------------------------
INFO CoreConsole[2014-04-07 16:33:01] [99597] NOTES
INFO CoreConsole[2014-04-07 16:33:01] [99597] - Reports for today will be processed at most every 3600 seconds. You can change this value in Piwik UI > Settings > General Settings.
INFO CoreConsole[2014-04-07 16:33:01] [99597] - Reports for the current week/month/year will be refreshed at most every 3600 seconds.
INFO CoreConsole[2014-04-07 16:33:01] [99597] - Archiving was last executed without error 22 days 20 hours ago
INFO CoreConsole[2014-04-07 16:33:01] [99597] - Will process 1 websites with new visits since 22 days 20 hours , IDs: 1
INFO CoreConsole[2014-04-07 16:33:01] [99597] ---------------------------
INFO CoreConsole[2014-04-07 16:33:01] [99597] START
INFO CoreConsole[2014-04-07 16:33:01] [99597] Starting Piwik reports archiving...
INFO CoreConsole[2014-04-07 16:33:01] [99597] WARNING: Empty or invalid response 'sh: fork: Cannot allocate memory ' for website id 1, Time elapsed: 0.126s, skipping
INFO CoreConsole[2014-04-07 16:33:01] [99597] Done archiving!
INFO CoreConsole[2014-04-07 16:33:01] [99597] ---------------------------
INFO CoreConsole[2014-04-07 16:33:01] [99597] SUMMARY
INFO CoreConsole[2014-04-07 16:33:01] [99597] Total visits for today across archived websites: 0
INFO CoreConsole[2014-04-07 16:33:01] [99597] Archived today's reports for 0 websites
INFO CoreConsole[2014-04-07 16:33:01] [99597] Archived week/month/year for 0 websites
INFO CoreConsole[2014-04-07 16:33:01] [99597] Skipped 1 websites: no new visit since the last script execution
INFO CoreConsole[2014-04-07 16:33:01] [99597] Skipped 0 websites day archiving: existing daily reports are less than 3600 seconds old
INFO CoreConsole[2014-04-07 16:33:01] [99597] Skipped 0 websites week/month/year archiving: existing periods reports are less than 3600 seconds old
INFO CoreConsole[2014-04-07 16:33:01] [99597] Total API requests: 0
INFO CoreConsole[2014-04-07 16:33:01] [99597] done: 0/1 0%, 0 vtoday, 0 wtoday, 0 wperiods, 0 req, 147 ms, no error
INFO CoreConsole[2014-04-07 16:33:01] [99597] Time elapsed: 0.147s
INFO CoreConsole[2014-04-07 16:33:01] [99597] ---------------------------
INFO CoreConsole[2014-04-07 16:33:01] [99597] SCHEDULED TASKS
INFO CoreConsole[2014-04-07 16:33:01] [99597] Starting Scheduled tasks...
INFO CoreConsole[2014-04-07 16:33:09] [99597] ERROR: Got invalid response from API request: https://my_site.com/piwik/index.php?module=API&method=CoreAdminHome.runScheduledTasks&format=csv&convertToUnicode=0&token_auth=%token%&trigger=archivephp. The response was empty. This usually means a server error. This solution to this error is generally to increase the value of 'memory_limit' in your php.ini file. Please check your Web server Error Log file for more details.
INFO CoreConsole[2014-04-07 16:33:09] [99597] done
INFO CoreConsole[2014-04-07 16:33:09] [99597] ---------------------------
INFO CoreConsole[2014-04-07 16:33:09] [99597] ---------------------------
INFO CoreConsole[2014-04-07 16:33:09] [99597] SUMMARY OF ERRORS
INFO CoreConsole[2014-04-07 16:33:09] [99597] Error: Got invalid response from API request: https://my_site.com/piwik/index.php?module=API&method=CoreAdminHome.runScheduledTasks&format=csv&convertToUnicode=0&token_auth=%token%&trigger=archivephp. The response was empty. This usually means a server error. This solution to this error is generally to increase the value of 'memory_limit' in your php.ini file. Please check your Web server Error Log file for more details.
INFO CoreConsole[2014-04-07 16:33:09] [99597] 1 total errors during this script execution, please investigate and try and fix these errors
INFO CoreConsole[2014-04-07 16:33:09] [99597] ERROR: 1 total errors during this script execution, please investigate and try and fix these errors. First error was: Got invalid response from API request: https://my_site.com/piwik/index.php?module=API&method=CoreAdminHome.runScheduledTasks&format=csv&convertToUnicode=0&token_auth=%token%&trigger=archivephp. The response was empty. This usually means a server error. This solution to this error is generally to increase the value of 'memory_limit' in your php.ini file. Please check your Web server Error Log file for more details.
But the statistics in this refreshed. Probably a bug in my server configuration
Thank you for your help.
INFO [2014-04-07 20:10:01] [23b93] ---------------------------
INFO [2014-04-07 20:10:01] [23b93] INIT
INFO [2014-04-07 20:10:01] [23b93] Piwik is installed at: http://www.XXXXX.com/piwik/index.php
INFO [2014-04-07 20:10:01] [23b93] Running Piwik 2.2.0-b16 as Super User: piwik
INFO [2014-04-07 20:10:01] [23b93] ERROR: Got invalid response from API request: http://www.XXXXX.com/piwik/index.php?module=API&method=API.getDefaultMetricTranslations&format=original&serialize=1&trigger=archivephp. The response was empty. This usually means a server error. This solution to this error is generally to increase the value of ‘memory_limit’ in your php.ini file. Please check your Web server Error Log file for more details.
INFO Piwik\CronArchiveFatalException[2014-04-07 20:10:01] [23b93] ERROR: The Piwik URL http://www.XXXXX.com/piwik/index.php does not seem to be pointing to a Piwik server. Response was ‘’.
Looking into the Server logs but i can’t find anything.
I’m running the Script on a Directadmin enabled server,
Running the Script as Root works,
Accessing the Web-based version of Archive works to, but with a Cronjob, running the file the user who owns the file it failed with the same error as above.