Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Archiving doesn't work anymore on 1.1.x with the cron script #1974

Closed
anonymous-piwik-user opened this Issue · 8 comments

3 participants

@anonymous-piwik-user

Hello,

I'm using piwik with the option (in french) "Autoriser l'archivage de Piwik se dclencher lorsque les rapports sont visionns depuis le navigateur" set to "no", I'm using so a cron to execute the "archive.sh" every hours, but since my update to 1.1.1 this morning my piwik doesn't show any new data today.
So I tried to execute the script manually :

root@Apollo:~# su -c '/home/piwik/public_html/misc/cron/archive.sh' piwik
Starting Piwik reports archiving...

root@Apollo:~#

As you can see it doesn't do anything.
I setted back the option to "Yes" and the new data are shown, so I suppose that the script doesn't work anymore.

Ask if you want more details :)

Keywords: archive cron

@robocoder
Collaborator

What do you get when you execute these from the shell?
```php5 -v
php -v

@anonymous-piwik-user

I got this : (Debian Squeeze)

root@Apollo:~# php -v
PHP 5.3.3-6 with Suhosin-Patch (cli) (built: Dec  7 2010 12:47:03) 
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
    with eAccelerator v0.9.6.1, Copyright (c) 2004-2010 eAccelerator, by eAccelerator
    with Suhosin v0.9.32.1, Copyright (c) 2007-2010, by SektionEins GmbH

@mattab
Owner

Maybe related, see forum post: http://forum.piwik.org/read.php?2,70783

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 (http:// => )) 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]

@mattab
Owner

MANY users have this issue: http://forum.piwik.org/read.php?2,70638

@robocoder
Collaborator

(In [3649]) refs #1974 - Notice: Undefined index: SCRIPT_NAME (occurs when using php-cgi)

@anonymous-piwik-user

Fixed, sorry, It was a problem of permissions, with the -x option of sh, I saw the script said "Coudn't write on ....' I changed the permissions and now it works.

Sorry for the inconveniance.

@robocoder
Collaborator

(In [3652]) fixes #1974 - force the execute bit (if needed)

@anonymous-piwik-user

No, the problem of permissions wasn't here, it was because some directories of my piwik installation weren't writable by the user with who I started the script.

It's because I had to change the user of my "/home/piwik/public_html" to www-data (user used by Apache on Debian) to do the update via the website because I didn't install suPHP or other tools to make the script be executed by its owner (piwik in my case). I forgot after that to restore the original permissions that made fail the archive script.

It would be useful that the archive.sh verify that it can write in the diretories it needs, the administrator would see immediatly where is the problem. :)

@anonymous-piwik-user anonymous-piwik-user added this to the Piwik 1.2 milestone
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.