Forums | Mahara Community
Support
/
User Statistics - Logins Not Being Recorded
05 May 2011, 20:51
Hi All,
In site statistics our user logins have stopped being logged. Since the 3rd of April on the Site Statistics page, all user logins are now registering as 0, although the Cron status is "Running Normally". We've made no changes to Mahara since April, aside from adding Google Analytics. Strangely enough, user creations are still being logged correctly.
Any advice or recommendations on what I can do to debug this issue?
- Mahara 1.3.3
- Red Hat Enterprise Linux Server release 5.5
- PHP 5.3.5
Cheers,
Scott
06 May 2011, 2:32
Hi Scott,
This is a bug I ran across recently too. It'll be fixed in the upcoming 1.4 release, but if you can't wait, these are the patches you need to apply:
https://gitorious.org/mahara/mahara/commit/cf4a91adaafe91fdc5fbcba10ecfc82388a1adfe
https://gitorious.org/mahara/mahara/commit/55bf5bdcb5667793e663cf02f2a752d449a88462
04 October 2011, 4:49
Hi Richard,
I am using 1.4.0 currently but it seems that the login statistics are still not working.
I checked the sources and it seems that the patches were applied to 1.4 as you stated. Do you think it can be the same issue ?
04 October 2011, 15:55
Hi Laurent, for us the bug was fixed by those patches (basically, counting the dataroot size was taking too long), and it's been fine ever since.
Perhaps you could have a look at your cron log and see if there are any errors in there when the stats are processed.
25 December 2011, 3:17
Hi Richard,
the same problem here. May be you're right, that this depends on problems with cron. For months my cron has worked fine. No problem. To push the cron I use cronjob.de that calls every five minutes cron.php. But since three weeks site statistics have shown, that cron is not working. But cronjob.de logs show that cron.php was called unfailing. I 've noticed, that sometimes the cronjob has been working and sometimes has not. Most of the time it has not been working. (Btw Where is the cron log file?)
How can I clear this?
Thanks in advance
Conrad
PS: Here same Error Messages from the common log
[Sun Dec 25 05:00:22 2011] [error] [client 87.106.xx.x] * log_message("curl_setopt() [function.curl-setopt]: CURLOPT_FOLL...", 8, true, true, "/home/.sites/383/site150/web/portfolio/lib/web.php", 3045) at /home/.sites/383/site150/web/portfolio/lib/errors.php:446, referer: http://cronjob.de/?id=549242
[Sun Dec 25 05:00:22 2011] [error] [client 87.106.xx.x] * curl_setopt(resource(#52), 52, 1) at /home/.sites/383/site150/web/portfolio/lib/web.php:3045, referer: http://cronjob.de/?id=549242
[Sun Dec 25 05:00:22 2011] [error] [client 87.106.xx.x] * mahara_http_request(array(size 2)) at /home/.sites/383/site150/web/portfolio/blocktype/externalfeed/lib.php:315, referer: http://cronjob.de/?id=549242
[Sun Dec 25 05:00:22 2011] [error] [client 87.106.xx.x] * PluginBlocktypeExternalfeed::parse_feed("http://www.npo-consulting.net/blogs/lector.php?tem...") at /home/.sites/383/site150/web/portfolio/blocktype/externalfeed/lib.php:258, referer: http://cronjob.de/?id=549242
[Sun Dec 25 05:00:22 2011] [error] [client 87.106.xx.x] * call_user_func_array(array(size 2), array(size 0)) at /home/.sites/383/site150/web/portfolio/lib/mahara.php:1184, referer: http://cronjob.de/?id=549242
[Sun Dec 25 05:00:22 2011] [error] [client 87.106.xx.x] * call_static_method("PluginBlocktypeExternalfeed", "refresh_feeds") at /home/.sites/383/site150/web/portfolio/lib/cron.php:96, referer: http://cronjob.de/?id=549242
[Sun Dec 25 05:00:26 2011] [error] [client 87.106.xx.x] * log_message("curl_setopt() [function.curl-setopt]: CURLOPT_FOLL...", 8, true, true, "/home/.sites/383/site150/web/portfolio/lib/web.php", 3045) at /home/.sites/383/site150/web/portfolio/lib/errors.php:446, referer: http://cronjob.de/?id=549242
[Sun Dec 25 05:00:26 2011] [error] [client 87.106.xx.x] * curl_setopt(resource(#56), 52, 1) at /home/.sites/383/site150/web/portfolio/lib/web.php:3045, referer: http://cronjob.de/?id=549242
[Sun Dec 25 05:00:26 2011] [error] [client 87.106.xx.x] * mahara_http_request(array(size 2)) at /home/.sites/383/site150/web/portfolio/blocktype/externalfeed/lib.php:315, referer: http://cronjob.de/?id=549242
[Sun Dec 25 05:00:26 2011] [error] [client 87.106.xx.x] * PluginBlocktypeExternalfeed::parse_feed("http://freecrmstrategies.wordpress.com/feed/") at /home/.sites/383/site150/web/portfolio/blocktype/externalfeed/lib.php:258, referer: http://cronjob.de/?id=549242
[Sun Dec 25 05:00:26 2011] [error] [client 87.106.xx.x] * call_user_func_array(array(size 2), array(size 0)) at /home/.sites/383/site150/web/portfolio/lib/mahara.php:1184, referer: http://cronjob.de/?id=549242
[Sun Dec 25 05:00:26 2011] [error] [client 87.106.xx.x] * call_static_method("PluginBlocktypeExternalfeed", "refresh_feeds") at /home/.sites/383/site150/web/portfolio/lib/cron.php:96, referer: http://cronjob.de/?id=549242
[Sun Dec 25 05:00:37 2011] [error] [client 87.106.xx.x] * log_message("curl_setopt() [function.curl-setopt]: CURLOPT_FOLL...", 8, true, true, "/home/.sites/383/site150/web/portfolio/lib/web.php", 3045) at /home/.sites/383/site150/web/portfolio/lib/errors.php:446, referer: http://cronjob.de/?id=549242
[Sun Dec 25 05:00:37 2011] [error] [client 87.106.xx.x] * curl_setopt(resource(#59), 52, 1) at /home/.sites/383/site150/web/portfolio/lib/web.php:3045, referer: http://cronjob.de/?id=549242
[Sun Dec 25 05:00:37 2011] [error] [client 87.106.xx.x] * mahara_http_request(array(size 2)) at /home/.sites/383/site150/web/portfolio/blocktype/externalfeed/lib.php:315, referer: http://cronjob.de/?id=549242
[Sun Dec 25 05:00:37 2011] [error] [client 87.106.xx.x] * PluginBlocktypeExternalfeed::parse_feed("http://feeds.feedburner.com/TheCuriousAndWondering...") at /home/.sites/383/site150/web/portfolio/blocktype/externalfeed/lib.php:258, referer: http://cronjob.de/?id=549242
[Sun Dec 25 05:00:37 2011] [error] [client 87.106.xx.x] * call_user_func_array(array(size 2), array(size 0)) at /home/.sites/383/site150/web/portfolio/lib/mahara.php:1184, referer: http://cronjob.de/?id=549242
[Sun Dec 25 05:00:37 2011] [error] [client 87.106.xx.x] * call_static_method("PluginBlocktypeExternalfeed", "refresh_feeds") at /home/.sites/383/site150/web/portfolio/lib/cron.php:96, referer: http://cronjob.de/?id=549242
[Sun Dec 25 05:00:42 2011] [error] [client 87.106.xx.x] * log_message("curl_setopt() [function.curl-setopt]: CURLOPT_FOLL...", 8, true, true, "/home/.sites/383/site150/web/portfolio/lib/web.php", 3045) at /home/.sites/383/site150/web/portfolio/lib/errors.php:446, referer: http://cronjob.de/?id=549242
[Sun Dec 25 05:00:42 2011] [error] [client 87.106.xx.x] * curl_setopt(resource(#62), 52, 1) at /home/.sites/383/site150/web/portfolio/lib/web.php:3045, referer: http://cronjob.de/?id=549242
[Sun Dec 25 05:00:42 2011] [error] [client 87.106.xx.x] * mahara_http_request(array(size 2)) at /home/.sites/383/site150/web/portfolio/blocktype/externalfeed/lib.php:315, referer: http://cronjob.de/?id=549242
[Sun Dec 25 05:00:42 2011] [error] [client 87.106.xx.x] * PluginBlocktypeExternalfeed::parse_feed("http://feeds.feedburner.com/optivo") at /home/.sites/383/site150/web/portfolio/blocktype/externalfeed/lib.php:258, referer: http://cronjob.de/?id=549242
[Sun Dec 25 05:00:42 2011] [error] [client 87.106.xx.x] * call_user_func_array(array(size 2), array(size 0)) at /home/.sites/383/site150/web/portfolio/lib/mahara.php:1184, referer: http://cronjob.de/?id=549242
27 December 2011, 15:41
Conrad, in your case you won't have a separate cron log file - it looks like you're calling cron via the web rather than on the command line.
It's hard to tell what the problem is because the error message is being truncated, but this looks like the issue:
curl_setopt() [function.curl-setopt]: CURLOPT_FOLL...
From looking at the code, I'd say that your php settings (possibly open_basedir) are disallowing the CURLOPT_FOLLOWLOCATION option on curl. You could change your php settings, or comment out the line that causes the error (line 3046 of lib/web.php - "curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);"). Commenting out that line might stop some feeds from being updated, amongst other things, but that's better than the cron job failing altogether, so I'll file a bug for this.
31 January 2012, 8:52
Hi Richard,
after weeks and some contacts with my provider ... here is, what my provider told me:
"There exist some misunderstanding.Open_basedir inhibits access to directories outside the local path. CURL addresses webpages (HTTP) outside . These are two different things."
They ask for the URL which is addressed outside the local paths, to go on checking.
I suspect, that there is no perspective in going on checking this with my providers support.
31 January 2012, 15:17
When the open_basedir restriction is enabled, you cannot set the CURLOPT_FOLLOWLOCATION setting when using php's curl function. You get the error "Warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set..."
From 1.5, Mahara will no longer try to use CURLOPT_FOLLOWLOCATION when open_basedir is on (bug #909168). This may stop some curl requests from completing correctly when redirects are required, so there will be a warning in the admin area whenever open_basedir is in effect.
It's likely you'll get a few other warnings and errors when using open_basedir too, and you may need to modify the local path in the open_basedir setting. The list of paths must include at least your main code directory and your dataroot directory. I also had to add /tmp and /usr/share/misc/magic (on Ubuntu), because those directories are used during file uploads. If you continue to get open_basedir warnings, and your provider won't let you modify the paths, you may have to find another provider. All we can really do is try to detect more of these problems and write clearer error messages.
- «Previous page
- 1
- 2
- 3
- »Next page