woltis
July 9, 2014, 9:16am
#1
Hello,
I tried to switch the archive cron from archive.php to the new recommended way in How to Set up Auto-Archiving of Your Reports - Analytics Platform - Matomo (Linux/Unix)
calling it with /usr/local/bin/php5.4 brings the error message:
Piwik Console is known to be not compatible with PHP-CGI. Please execute console using PHP-CLI. For instance “/usr/bin/php-cli console …”
But unfortunately on my webserver hosted by 1&1 there ist no php-cli (or phpx.x-cli).
Is there a solution for this?
Greetings
woltis
mike3
(mike)
July 9, 2014, 3:54pm
#2
woltis, I don’t know the answer to your question, but I’m curious…are you switching to the archive after upgrading to 2.4.0 and observing your reports breaking?
woltis
July 9, 2014, 4:36pm
#3
Yes, Mike, you’re right.
The cron with archive.php had no problem. But after updating to 2.4 it reported an error:
Error in argument 1, char 2: option not found r
Looking into the script I found the message, that archive.php is no longer recommended. So I tried to switch.
Greetings
woltis
matthieu
(Matthieu Aubry)
July 11, 2014, 9:27am
#4
please ask to 1&1 support what is the PHP to PHP CLI and then specify this path in the cron task
res
July 11, 2014, 12:52pm
#5
Actually it was working till monday, then 1&1 changed something.
Is there any solution yet? Is there a “–commandline” flag for php or something?
Thank you
woltis
July 11, 2014, 1:37pm
#6
I already asked the 1&1-support, but they still have not been able to answer the question. Asked a second time, so let’s see …
It’s sometimes hard to get an easy answer from the support if you ask an easy question
woltis
July 12, 2014, 6:41am
#7
Here is the official answer from 1&1 support:
PHP CLI is not possible on a 1&1 managed server
So what to do now? How do I setup my archvive cron, if console with php cli does not work and archive.php (which worked well untill 2.4 reports errors)?
woltis
July 16, 2014, 8:11pm
#8
Anybody?
How do I set up my cron without PHP-CLI. It worked with archive.php till PIWIK 2.3 without problems.
How to fix this with 2.4?
matthieu
(Matthieu Aubry)
July 16, 2014, 11:03pm
#9
PHP CLI is not possible on a 1&1 managed server
I’m pretty sure this is wrong. 1&1 used to provide a PHP CLI and definitely they should provide this as this is part of “PHP”
woltis
July 17, 2014, 12:39pm
#10
1&1 has different servers.
They have managed servers, where 1&1 is responsible for the operating system and other server-side software.
And they have root-servers, where the customer is responsible for everything.
Only for the last ones you will get root access as a customer. On managed servers without root access PHP-CLI is not possible, says 1&1.
So how do I setup my cronjob without CLI? archive.php still works, but it throws out
Error in argument 1, char 2: option not found r
since version 2.4 of PIWIK.
matthieu
(Matthieu Aubry)
August 10, 2014, 2:17pm
#11
@wolts please setup the new cron as in: How to Set up Auto-Archiving of Your Reports - Analytics Platform - Matomo
Does it work for you? If you have a problem please let us know (or maybe ask 1&1 support if they have an idea)
(if we can improve the documentation for users on 1&1 we would love to know how :))
woltis
August 12, 2014, 7:29am
#12
Hello Matt,
as far as I can see, nothing has changed in the cron settings. It still requires php-cli which is not available on my managed 1&1-server.
I still use the old way to process the data:
php5.4 /path/to/htdocs/piwik/misc/cron/archive.php --url=https://www.mywebserver.de/piwik
This still works great, exept that it throws out an error with every processed website/id
Error in argument 1, char 2: option not found r
I disabled the email in the cron, so I don’t receive an email-every hour the cron is running.
Isn’t it possible to still use the old cron-call but change something, that eliminates this error message?
matthieu
(Matthieu Aubry)
August 12, 2014, 12:10pm
#13
did you try this:
php5.4 /path/to/htdocs/piwik/console core:archive --url=XXX
woltis
August 12, 2014, 1:46pm
#14
Hello Matt,
this does not work (which was the reason for this thread). you need PHP-CLI to run console, which is not installed. I get the message:
Piwik Console is known to be not compatible with PHP-CGI. Please execute console using PHP-CLI. For instance "/usr/bin/php-cli console ..
So again: how to run cron without PHP-CLI?
matthieu
(Matthieu Aubry)
August 12, 2014, 11:14pm
#15
Instead maybe you could ask your webhost if they provide PHP CLI and what is the path for it? so far I didn’t hear any web host that does not offer it so I think yours is likely to offer it?
res
August 13, 2014, 10:59am
#16
Hi matt,
thanks for your interest in this problem!
Regarding your last post, woltis asked already and the answer is no , see post 7 in this thread. I also think such a big company as 1&1 can’t enable it so easily, so probably they won’t. Hence his question “how to run cron without PHP-CLI?”.
woltis
August 13, 2014, 12:05pm
#17
Hello Matt,
we are turning around in circles in this thread
1&1 does DEFINITLY not offer PHP-CLI on managed servers (which is mine), only on root servers. So I only need a non-CLI way to process the archive-cron without error-messages .
matthieu
(Matthieu Aubry)
August 13, 2014, 12:50pm
#18
Sorry guys! I should have re-read this post before asking this again…
Could you try apply this patch: Better debug output for forum debugging http://forum.piwik.org/read.p… · matomo-org/matomo@83e9d6a · GitHub
and then run the core:archive again and paste here the new error message?
woltis
August 14, 2014, 7:17am
#19
Did as requested. The message is:
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 ..."
woltis
August 15, 2014, 7:03pm
#20
HELP!
With the update to version 2.5 the use of archive.php is no longer possible at all!
So I can’t process the automatic achiving at all right now!
I URGENTLY need a solution for this.