PIWIK archive cron on 1&1 webserver (no CLI)

@woltis would you mind creating an issue on the tracker: Issues · matomo-org/piwik · GitHub
with a title eg. “Make ./console core:archive work on CGI (use case 1&1 hosting)” ?

I just ran into the same issues as of 8/15/2014 when Piwik updated to latest version (2.5.0). I was able to archive without
issue until today. This doesn’t appear to be just one hosting company for I’m using GoDaddy.

I am also getting the following error:

Piwik Console is known to be not compatible with PHP-CGI (you are using cgi-fcgi). Please execute console using PHP-CLI. For instance “/usr/bin/php-cli console …”

I am in hopes to assist in any way possible, though I am at a complete lose on why for the failure.

If anyone has any ideas in how to move forward, please “toss” some this way

Thanks

created an issue on github

https://github.com/piwik/piwik/issues/6012

After making the recommended changes from Make ./console core:archive work on CGI (use case 1&1 hosting/managed server) · Issue #6012 · matomo-org/matomo · GitHub

I was now able to execute from a web browser address bar:

http://domain.com/path to piwik/mis/cron/archive.php?token_auth = **** token ***

Now after making sure all went well it came time to create a cron, unfortunately with
some of the shared hosting services you are unable to execute CLI. There is a workaround I have
come up with :

Create a php file called archiver.php in your root with the following lines:

<?php // create a new cURL resource $ch = curl_init(); // set URL and other appropriate options curl_setopt($ch, CURLOPT_URL, "http://domain.com/path to piwik/misc/cron/archive.php?token_auth=****** token ***" ) ; curl_setopt($ch, CURLOPT_HEADER, 0); // grab URL and pass it to the browser curl_exec($ch); // close cURL resource, and free up system resources curl_close($ch); ?>

Now go to your cron manager and setup a job to execute the archiver.php in your root

It works !

Any issues write me at mmessier@maselectronics.com

Recently I found that 1and1 did have PHP-cli on their shared, managed, servers.
It’s available as
/usr/bin/php5.5-cli
or
/usr/bin/php5.4-cli
if you need PHP 5.4 for some reason.
I see there’s other problems PIWIK on 1and1, but this particular roadblock is not a problem any more.

PiWik stats were working on 1and1.com until I updated from version 2.11.2
to version 2.15

Going to have to stop and dump and reload back to 2.11.2 my last known working version.

CRON did not need to be set for the 2.11.2 when I had default set for YES under the General Tab for Archiving.

It should be a straight up Cron tab set up but it is not if archive.php is aimed at with the crontab where it is called from this loaction piwik/misc/cron/archive.php

I have other crontabs set up and working just fine and piwik worked fine until this last update.

If there is a fix, I would appreciate it. Version 2.15 on 1and1.com does not archive following http://piwik.org/docs/setup-auto-archiving/
and https://community.1and1.com/using-php-composer-at-1and1/
All sites show zero stats.

Thanks.
Sincerely

Statmutt
21Dec2015

please update your cron to use the latest format: http://piwik.org/docs/setup-auto-archiving/

also try to use our latest beta: http://piwik.org/faq/how-to-update/faq_159/

I HAVE used the page found at : How to Set up Auto-Archiving of Your Reports - Analytics Platform - Matomo
as previously stated.

An example of the cron tab that was set up is as follows where path/homepages/to/my-piwik/ are replaced to protect specific locations of the referenced information so as to be shown here.

5 * * * * /usr/bin/php5.5-cli /path/homepages/to/my-piwik/htdocs/stats/console core:archive --url=http://www.my-website.com/piwik/ > /dev/null 2>&1

This cron tab does not function. As shown in the image above CLI is not supported. That is the reason why I sent in the image so as to show this.
As can be seen the INSTALL has NO ISSUES --> Huzzah! there are no problems.

I appreciate the assistance BUT the question is: why is this cron tab needed NOW with this latest update when it was not needed prior? Was it broken in some way? I am providing feedback that it is broken for me now is why I ask. If this is not able to be overcome since I may be in the minority, that is completely understandable. I am simply making sure before I do a full reset.

Thanks.

I gave up on this issue back in Dec 2015. I was wondering if the CII Archive Cron - Managing processes via CLI: not supported (optional) issue with 1and1.com was ever fixed with any of the Latest updates

PiWik stats were working on 1and1.com until I updated from version 2.11.2
to version 2.15 0 Stats ever since updating to version 2.15

I do not have a high traffic website so the default - Archive reports when viewed from the browser is set to yes and NOT using the option that is Recommended for larger Piwik installs, where you need to setup a cron job to process the reports automatically.

I haven’t updated to any other Piwik versions. Is this a dead deal for CLI not functioning on Php5.5.38 and 1and1.com . I uploaded images showing this back in Dec2015 without any further follow-up and was just wondering?? Thanks.

Could you update to our latest version, and if you still don’t see data please create bug report on our tracker: Issues · piwik/piwik · GitHub

1and1 .com has discontinued supporting older versions of php. For version prior to 5.6 there will be
a fee charged. CLI is only supported to version 5,5 and there will be a support charge to use it.

I updated my php version to php 5.6 so CLI is not available [NO CLI ACCESS]
I also updated Piwik to 2.17.1

How can the Cron tab be used WITHOUT using CLI?
Will calling archive.php with a cron tab Work?
Thanks.

SOLVED ! SOLVED ! the 1and1,com – Archive and CRON Tab issue

Increasef RAM size to 512M in php.ini

LOGGED in to the current dashboard for VERSION 2.17.1

Settings -> General - Turned off Archiving (NO) (A Cron tab will be needed)
Settings -> Plugins - Monolog - ACTIVATED
Settings -> Plugins - Provider - DEACTIVATED

Re-Set up my CRON TAB on 1and1.com I am using php5,6 version [example Cron tab]
*/15 * * * * /usr/bin/php /mylocal/homepages/xx/XxXxXxXxXxX/htdocs/PiwikFolder/misc/cron/archive.php > /dev/null 2>&1

Ran the archive script from the browser using my Token ID
http://www.Mydomain.com/Piwik Folder/misc/cron/archive.php?token_auth=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
THIS WORKED.
Timed out 1x or 2x but just re-ran it again.

I visited a few of the sites I knew I was tracking with Piwik
Then went back to my Piwik Dashboard
Checked my dashboard for the visited websites. Archiving is NOW recording visits.

It appears that the MONOLOG Plugin was DEACTIVATED by default and needed
to be ACTIVATED

I hope this takes care of the ISSUE. I will be testing out from here to see how things
look. If something changes, I will post here. I hope this is of help to others.

16Nov2016
Statmutt