As I often get a maximum execution time timeout error when starting my Piwik (on shared hosting), I tried to “Set up a Crontab to Automatically Archive the Reports”.
, where “/vrmd/homepages//” is the absolute server path to my pages.
The cronjob does run every hour at 5 past and I do get a report by email but:
[ol]
[li] an empty (0 bytes) “piwik-archive.log” is created in “/vrmd/homepages//itc/” and is shown in the shell as “piwik-archive.log?” and can only be deleted via “rm piwik-archive.*”; FTP client says: “No such file or directory”.
[/li][li] the mailed report reads:
[/li]/vrmd/homepages//piwik/misc/cron/archive.php: line 1: ?php: No such file or directory
/vrmd/homepages//piwik/misc/cron/archive.php: line 2: =: command not found
/vrmd/homepages//piwik/misc/cron/archive.php: line 36: /bin: is a directory
/vrmd/homepages//piwik/misc/cron/archive.php: line 37: Ideas: command not found
/vrmd/homepages//piwik/misc/cron/archive.php: line 38: -: command not found
/vrmd/homepages//piwik/misc/cron/archive.php: line 39: -: command not found
/vrmd/homepages//piwik/misc/cron/archive.php: line 40: -: command not found
/vrmd/homepages//piwik/misc/cron/archive.php: line 41: -: command not found
/vrmd/homepages//piwik/misc/cron/archive.php: line 42: -: command not found
/vrmd/homepages//piwik/misc/cron/archive.php: line 43: -: command not found
/vrmd/homepages//piwik/misc/cron/archive.php: line 44: -: command not found
/vrmd/homepages//piwik/misc/cron/archive.php: line 45: syntax error near unexpected token (' /vrmd/homepages/<myuserid>/piwik/misc/cron/archive.php: line 45: - Possible performance improvement: Run first websites which are faster to process (weighted by visits and/or time to generate the last daily report)’
[/ol]
[quote=matt]
there was no typo in the doc, so if you add the space it should work[/quote]
Before I apparently did not properly install the modified crontab.
After correcting this I added the space to look like this:
Besides not giving the expected result it leaves one question:
If there is no typo in the doc and the space belongs there, why is there no space neither in the screenshot in the mentioned doc nor in the USAGE section of the archive.php itself in the numerous examples of that argument given there and again in the message I get when trying to run the archive.php through the browser ?
Just for curiosity I took the space out again and got: “ELinks: Unknown option --url=http://piwik.mydomain.tld/”.
If I run archive.php from the shell, I get
./misc/cron/archive.php: line 1: ?php: No such file or directory
./misc/cron/archive.php: line 2: =: command not found
./misc/cron/archive.php: line 36: /bin: is a directory
./misc/cron/archive.php: line 37: Ideas: command not found
./misc/cron/archive.php: line 38: -: command not found
./misc/cron/archive.php: line 39: -: command not found
./misc/cron/archive.php: line 40: -: command not found
./misc/cron/archive.php: line 41: -: command not found
./misc/cron/archive.php: line 42: -: command not found
./misc/cron/archive.php: line 43: -: command not found
./misc/cron/archive.php: line 44: -: command not found
./misc/cron/archive.php: line 45: syntax error near unexpected token (' ./misc/cron/archive.php: line 45: - Possible performance improvement: Run first websites which are faster to process (weighted by visits and/or time to generate the last daily report)’
with or without the space in “-- url=…”
So no success with either version. Put the space in again and got “ELinks: Unknown option --” again.
What else can I do?
Result in the mailed report:
/vrmd/homepages//piwik/misc/cron/archive.php: line 1: ?php: No such file or directory
/vrmd/homepages//piwik/misc/cron/archive.php: line 2: =: command not found
/vrmd/homepages//piwik/misc/cron/archive.php: line 35: /bin: is a directory
/vrmd/homepages//piwik/misc/cron/archive.php: line 36: Ideas: command not found
/vrmd/homepages//piwik/misc/cron/archive.php: line 37 -: command not found
/vrmd/homepages//piwik/misc/cron/archive.php: line 38: -: command not found
/vrmd/homepages//piwik/misc/cron/archive.php: line 39: -: command not found
/vrmd/homepages//piwik/misc/cron/archive.php: line 40: -: command not found
/vrmd/homepages//piwik/misc/cron/archive.php: line 41: -: command not found
/vrmd/homepages//piwik/misc/cron/archive.php: line 42: -: command not found
/vrmd/homepages//piwik/misc/cron/archive.php: line 43: -: command not found
/vrmd/homepages//piwik/misc/cron/archive.php: line 44: syntax error near unexpected token (' /vrmd/homepages/<myuserid>/piwik/misc/cron/archive.php: line 44: - Possible performance improvement: Run first websites which are faster to process (weighted by visits and/or time to generate the last daily report)’