@Victorsueca opened this Issue on June 4th 2017

Recently updated to Piwik 3.0.4 on Windows. I have a programmed task to execute the following at regular intervals:
C:\xampp\php\php.exe "C:\xampp\htdocs\stats\console" core:archive --url=https://myurl.com/piwik/
This has been working until now, but it recently started giving the following error:

Error: Got invalid response from API request: ?module=API&method=API.get&idSite=1&period=day&date=last52&format=php&trigger=archivephp. Response was 'a:2:{s:6:"result";s:5:"
error";s:7:"message";s:86:"You can't access this resource as it requires an 'view' access for the website id = 1.";}'
INFO [2017-06-04 14:53:17] Error: Empty or invalid response '' for website id 1, Time elapsed: 1.045s, skipping
ERROR [2017-06-04 14:53:17] 2 total errors during this script execution, please investigate and try and fix these errors.

Other than updating piwik, the only change I made recently was removing some files that the piwik system check said where unnecesary and should be removed to prevent errors.

Any clues on what's going on?

@mattab commented on June 21st 2017 Owner

Hi @Victorsueca
We haven't seen this problem before. Could you send us some SSH access to your Piwik + the link to this issue at http://piwik.org/contact/ ?

@Victorsueca commented on June 23rd 2017

@mattab SSH to a production server with a person I do not know sounds a bit of an overkill. I propose hanging on some IRC (or other chat of your preference) to follow your instructions on debugging this.

@mattab commented on June 23rd 2017 Owner

would it maybe help if you just temporary access to only piwik to me at matt at piwik.org ?

@Victorsueca commented on June 25th 2017

Sounds more reasonable, is FTP ok instead of SSH?

@mattab commented on June 25th 2017 Owner

unfortunately ssh is needed as we need to run the command and see what happens
(FTP is less secure than SSH unless you use SFTP)

@Victorsueca commented on June 26th 2017

The thing is I have never used SSH before since I access all my servers physically, that's why I wanted to avoid using it, because i'd like to not use a feature that allows remote access to my server before fully understanding it. So at the moment it's easier for me to follow a set of instructions and provide the output as necessary.

@zypri commented on July 5th 2017

Hey. I am experiencing the same error, when I try to start archiveing with Web Cron (there is no Cron Jobs/SSH available at my shared hosting). As far as I know I did not do any updates. It was a fresh installation of Piwik 3.0.4, that run for a few weeks before i tried to activate Web Cron.

Has anyone an idea?

INFO CoreAdminHome[2017-07-05 12:50:36] [592f1] SUMMARY OF ERRORS INFO CoreAdminHome[2017-07-05 12:50:36] [592f1] Error: Got invalid response from API request: ?module=API&method=API.get&idSite=1&period=day&date=last52&format=php&trigger=archivephp. Response was 'a:2:{s:6:"result";s:5:"error";s:7:"message";s:86:"You can't access this resource as it requires an 'view' access for the website id = 1.";}' INFO CoreAdminHome[2017-07-05 12:50:36] [592f1] Error: Empty or invalid response '' for website id 1, Time elapsed: 0.858s, skipping ERROR CoreAdminHome[2017-07-05 12:50:36] [592f1] 2 total errors during this script execution, please investigate and try and fix these errors. Error: 2 total errors during this script execution, please investigate and try and fix these errors.

Powered by GitHub Issue Mirror