Cron Shell failure

Hello,
i get an error, when crontab is calling the archive shell script.

Version is 1.1.1


MAILTO=tom@xxxxxxx.de
5 * * * * /kunden/homepages/16/xxxx/htdocs/piwik/misc/cron/archive.sh > /dev/null

Error Message


Notice: Undefined index:  SCRIPT_NAME in /homepages/16/dxxx/htdocs/piwik/core/Url.php on line 123


Backtrace -->#0  Piwik_ErrorHandler(8, Undefined index:  SCRIPT_NAME, /homepages/16/dxxx/htdocs/piwik/core/Url.php, 123, Array ([url] => )) called at [/homepages/16/dxxx/htdocs/piwik/core/Url.php:123]#1  Piwik_Url::getCurrentScriptName() called at [/homepages/16/dxxx/htdocs/piwik/core/Url.php:45]#2  Piwik_Url::getCurrentUrlWithoutQueryString() called at [/homepages/16/dxxx/htdocs/piwik/core/UpdateCheck.php:41]#3  Piwik_UpdateCheck::check() called at [/homepages/16/dxxx/htdocs/piwik/plugins/CoreUpdater/CoreUpdater.php:75]#4  Piwik_CoreUpdater->updateCheck(Piwik_Event_Notification Object ([_notificationName] => FrontController.checkForUpdates,[_notificationObject] => ,[_notificationInfo] => Array (),[_notificationState] => 0,[_notificationCount] => 0))#5  call_user_func_array(Array ([0] => Piwik_CoreUpdater Object (),[1] => updateCheck), Array ([0] => Piwik_Event_Notification Object ([_notificationName] => FrontController.checkForUpdates,[_notificationObject] => ,[_notificationInfo] => Array (),[_notificationState] => 0,[_notificationCount] => 0))) called at [/homepages/16/dxxx/htdocs/piwik/libs/Event/Dispatcher.php:284]#6  Event_Dispatcher->postNotification(Piwik_Event_Notification Object ([_notificationName] => FrontController.checkForUpdates,[_notificationObject] => ,[_notificationInfo] => Array (),[_notificationState] => 0,[_notificationCount] => 0), 1, ) called at [/homepages/16/dxxx/htdocs/piwik/core/PluginsManager.php:531]#7  Piwik_PostEvent(FrontController.checkForUpdates) called at [/homepages/16/dxxx/htdocs/piwik/core/FrontController.php:251]#8  Piwik_FrontController->init() called at [/homepages/16/dxxx/htdocs/piwik/index.php:59]

logged issue in Archiving doesn't work anymore on 1.1.x with the cron script · Issue #1974 · matomo-org/matomo · GitHub

Try the fix here:

http://dev.piwik.org/trac/changeset/3649

im having the same kind of problems on version 1.1.1, but my email message says: no permission

but the .sh file permission is sett at 777, and i applyed the patch file fix, but still know luck.

budgirless, did you check the script group? try to run the command in: How to Set up Auto-Archiving of Your Reports - Analytics Platform - Matomo in “Test the cron command” it will run the script as your cron user

[quote=matthieu]
budgirless, did you check the script group? try to run the command in: How to Set up Auto-Archiving of Your Reports - Analytics Platform - Matomo in “Test the cron command” it will run the script as your cron user[/quote]

FIXED!!

i got it to work on ubuntu with your [dev.piwik.org] patch & the wget command.

example: “5 * * * * wget http://mydomain.com/piwik/misc/cron/archive.sh” thats all no /dev/null or anything else.

email example: [i]HTTP request sent, awaiting response… 200 OK
Length: 3291 (3.2K) [text/x-sh]
Saving to: `archive.sh.2’

 0K ...                                                   100%  250M=0s

2011-02-17 22:40:02 (250 MB/s) - `archive.sh.2’ saved [3291/3291][/i]

Thats its now right, i dont need to do any-else do I?

wget fetches a copy of the script; wget doesn’t execute it

[quote=vipsoft]
wget fetches a copy of the script; wget doesn’t execute it[/quote]

so any idea’s what i can do to execute this file in ubuntu’s crontab?

UPDATE: ok so i managed to sort it out part of the problems was a wrong path that i added, but i now have a new error about the php &mysql, here is some of the log file:

[b]PHP Warning: Module ‘mysql’ already loaded in Unknown on line 0
PHP Warning: Module ‘mysql’ already loaded in Unknown on line 0
Starting Piwik reports archiving…

Archiving period = day for idsite = 1…
PHP Warning: Module ‘mysql’ already loaded in Unknown on line 0

<?xml version="1.0" encoding="utf-8" ?> [/b]