Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Presence of "http://" in the parameters of the archive cron script may cause incompatibility with cPanel #4483

Closed
anonymous-matomo-user opened this issue Jan 7, 2014 · 1 comment
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc. c: Performance For when we could improve the performance / speed of Matomo.

Comments

@anonymous-matomo-user
Copy link

When using cPanel to set up the cron job as per http://piwik.org/docs/setup-auto-archiving/ , you may encounter an issue where cPanel will refuse to create (or edit) the cron job for Piwik.

A typical command might be, for example:

/opt/php54/bin/php path_to_piwik/misc/cron/archive.php --url=http://example.com >/dev/null 2>&1

However, doing so in my case will not work, cPanel will give me an error in a red rectangle box: "JSON parse failed."

Weirdly enough, Hostgator administrators (ie: root) are able to do it with cpanel (so they can't reproduce the issue on their end), but a "normal" user like me cannot. This is regardless of which web browser is used.

We narrowed down the issue to be due to the presence of "http://". For example, I can create this fake cron job:

echo desu example.com >/dev/null 2>&1

...but not this one:

echo desu http://example.com >/dev/null 2>&1

Hoping there's something that could be improved on the piwik side, like making the http/https part optional/autodetectable (and documenting that)...

@mattab
Copy link
Member

mattab commented Jan 7, 2014

In 267b717: Fixes #4483 - thanks for the report that's really useful as loads of users are on cpanel and hostgator!
Also updated the doc at: http://piwik.org/docs/setup-auto-archiving/#cpanel-how-to-set-up-the-cron-script-using-cpanel
and removed http:// in the cpanel examples..

sabl0r pushed a commit to sabl0r/piwik that referenced this issue Sep 23, 2014
… loads of users are on cpanel and hostgator!

Also updated the doc at: http://piwik.org/docs/setup-auto-archiving/#cpanel-how-to-set-up-the-cron-script-using-cpanel
and removed http:// in the cpanel examples..
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. c: Performance For when we could improve the performance / speed of Matomo.
Projects
None yet
Development

No branches or pull requests

2 participants