Cron Job Error


#1

I’m running this and getting an error.

/usr/bin/php5-cgi /var/www/whstats/misc/cron/archive.php --url=http://mysite.com/

No idea why. Any help would be huge!

Thanks,

$ /usr/bin/php5-cgi /var/www/whstats/misc/cron/archive.php --url=http://mysite.com/
PHP Deprecated: Comments starting with ‘#’ are deprecated in /etc/php5/cgi/conf.d/mcrypt.ini on line 1 in Unknown on line 0
PHP Notice: Undefined index: argv in /var/www/whstats/misc/cron/archive.php on line 783
PHP Warning: Invalid argument supplied for foreach() in /var/www/whstats/misc/cron/archive.php on line 783
PHP Notice: Undefined index: argv in /var/www/whstats/misc/cron/archive.php on line 783
PHP Warning: Invalid argument supplied for foreach() in /var/www/whstats/misc/cron/archive.php on line 783
PHP Notice: Undefined index: argv in /var/www/whstats/misc/cron/archive.php on line 783
PHP Warning: Invalid argument supplied for foreach() in /var/www/whstats/misc/cron/archive.php on line 783
PHP Notice: Undefined index: argv in /var/www/whstats/misc/cron/archive.php on line 783
PHP Warning: Invalid argument supplied for foreach() in /var/www/whstats/misc/cron/archive.php on line 783
PHP Notice: Undefined index: argv in /var/www/whstats/misc/cron/archive.php on line 783
PHP Warning: Invalid argument supplied for foreach() in /var/www/whstats/misc/cron/archive.php on line 783
PHP Notice: Undefined index: argv in /var/www/whstats/misc/cron/archive.php on line 783
PHP Warning: Invalid argument supplied for foreach() in /var/www/whstats/misc/cron/archive.php on line 783
PHP Notice: Undefined index: argv in /var/www/whstats/misc/cron/archive.php on line 783
PHP Warning: Invalid argument supplied for foreach() in /var/www/whstats/misc/cron/archive.php on line 783
PHP Notice: Undefined index: argv in /var/www/whstats/misc/cron/archive.php on line 783
PHP Warning: Invalid argument supplied for foreach() in /var/www/whstats/misc/cron/archive.php on line 783
PHP Notice: Undefined index: argv in /var/www/whstats/misc/cron/archive.php on line 783
PHP Warning: Invalid argument supplied for foreach() in /var/www/whstats/misc/cron/archive.php on line 783
Error in the last Piwik archive.php run:
archive.php expects the argument --url to be set to your Piwik URL, for example: --url=http://example.org/piwik/ PHP Fatal error: archive.php expects the argument --url to be set to your Piwik URL, for example: --url=http://example.org/piwik/ in /var/www/whstats/misc/cron/archive.php on line 519
X-Powered-By: PHP/5.3.2-1ubuntu4.14
Content-type: text/html

Notice: Undefined index: argv in /var/www/whstats/misc/cron/archive.php on line 783

Warning: Invalid argument supplied for foreach() in /var/www/whstats/misc/cron/archive.php on line 783

Notice: Undefined index: argv in /var/www/whstats/misc/cron/archive.php on line 783

Warning: Invalid argument supplied for foreach() in /var/www/whstats/misc/cron/archive.php on line 783

Notice: Undefined index: argv in /var/www/whstats/misc/cron/archive.php on line 783

Warning: Invalid argument supplied for foreach() in /var/www/whstats/misc/cron/archive.php on line 783

Notice: Undefined index: argv in /var/www/whstats/misc/cron/archive.php on line 783

Warning: Invalid argument supplied for foreach() in /var/www/whstats/misc/cron/archive.php on line 783

Notice: Undefined index: argv in /var/www/whstats/misc/cron/archive.php on line 783

Warning: Invalid argument supplied for foreach() in /var/www/whstats/misc/cron/archive.php on line 783

Notice: Undefined index: argv in /var/www/whstats/misc/cron/archive.php on line 783

Warning: Invalid argument supplied for foreach() in /var/www/whstats/misc/cron/archive.php on line 783

Notice: Undefined index: argv in /var/www/whstats/misc/cron/archive.php on line 783

Warning: Invalid argument supplied for foreach() in /var/www/whstats/misc/cron/archive.php on line 783

Notice: Undefined index: argv in /var/www/whstats/misc/cron/archive.php on line 783

Warning: Invalid argument supplied for foreach() in /var/www/whstats/misc/cron/archive.php on line 783

Notice: Undefined index: argv in /var/www/whstats/misc/cron/archive.php on line 783

Warning: Invalid argument supplied for foreach() in /var/www/whstats/misc/cron/archive.php on line 783
[2012-03-06 18:33:41] [b0769e14] ERROR: archive.php expects the argument --url to be set to your Piwik URL, for example: --url=http://example.org/piwik/

Fatal error: archive.php expects the argument --url to be set to your Piwik URL, for example: --url=http://example.org/piwik/ in /var/www/whstats/misc/cron/archive.php on line 519


(Matthieu Aubry) #2

instead of running php5-cgi try php5 ?


#3

I ran the following:

apt-get install php5
apt-get install php5-cli

Once php-cli was installed it worked:

/usr/bin/php5 /var/www/whstats/misc/cron/archive.php --url=http://mysite.com/

Thanks!