Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
anonymous-matomo-user opened this issue Jan 7, 2011 · 8 comments
Closed
Labels
Bug For errors / faults / flaws / inconsistencies etc. Critical Indicates the severity of an issue is very critical and the issue has a very high priority.
Milestone

Comments

@anonymous-matomo-user
Copy link

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
Copy link
Contributor

What do you get when you execute these from the shell?

php -v

@anonymous-matomo-user
Copy link
Author

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
Copy link
Member

mattab commented Jan 7, 2011

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
Copy link
Member

mattab commented Jan 7, 2011

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

@robocoder
Copy link
Contributor

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

@anonymous-matomo-user
Copy link
Author

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
Copy link
Contributor

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

@anonymous-matomo-user
Copy link
Author

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-matomo-user anonymous-matomo-user added this to the Piwik 1.2 milestone Jul 8, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. Critical Indicates the severity of an issue is very critical and the issue has a very high priority.
Projects
None yet
Development

No branches or pull requests

3 participants