|
Cookbook /
TotalCounter-ArchiveTotalCounter ArchiveOld, archived discussions about TotalCounterGreat recipe! I wonder if it's possible to have a referrer statistic per page in order to find out which page is accessed by which other page within the wiki? (I admit that this might not fit the original design philosophy of "counting totals" :-) --Henning December 28, 2005, at 05:32 AM Well, it is certainly possible, but this would mean to have a statistics page for every wiki's page and it would start to be quite cumbersome. This looks more like the job for a log analyzer which is really not what TotalCounter is supposed to be... I just wrote it to have some basic stats when the hosting service doesn't provide the logs.
Blues December 29, 2005, at 04:49 AM
Thanks for the answer! Though I do indeed have some (not very smooth) way of accessing the logs, an integrated tool that keeps tracks of everything without postprocessing overhead would of course hold considerable attraction. However, I don't think that it would be a good idea to turn an elegant tool into a complex kludge for that purpose! :-/ --Henning December 30, 2005, at 04:30 AM It's a matter of points of view... As you understand, making the logging at the time of the page view adds an overhead every time a page is viewed (and anyway the logging is already done by the webserver, so is double work) while a log analyzer has an overhead just when the logs are processed, not interfearing with normal page views.
Blues January 03, 2006, at 03:40 AM
I admit that I had thought of the administrator's overhead and not of the system's, but of course you have a very good point there! --Henning January 03, 2006, at 05:27 AM
$TotalCounterBlacklist[Pages]=array("");$TotalCounterBlacklist[Users]=array("");$TotalCounterBlacklist[Referers]=array("");?totalcounter page will display some errors until a webbot searches your site.Thanks for reporting the problems, a new version is available (1.1) which now works with both UserAuth and AuthUser and fixes the bug that appears when no web bot is present yet. About the blacklist I couldn't reproduce the problem... any more info?
Blues January 03, 2006, at 03:40 AM
Warning: Invalid argument supplied for foreach() in cookbook/totalcounter.php on line 224 Warning: Invalid argument supplied for foreach() in cookbook/totalcounter.php on line 237 Warning: Invalid argument supplied for foreach() in cookbook/totalcounter.php on line 251 Maybe this will help. I've also encountered the same errors you're describing but after declaring those 3 aforementioned variables before the inlcude statement, the errors disappeared. Here's how my config file looks:
$TotalCounterBlacklist[Pages]=array("");
$TotalCounterBlacklist[Users]=array("");
$TotalCounterBlacklist[Referers]=array("");
include_once('cookbook/totalcounter.php');
soxiam
I uploaded a new version (1.1b) that hopefully will correct the problem, along with some other things. I have to admit that I had to go blindly since on my computer it works fine (PHP 4.3.11). Thanks for your patience.
Blues January 05, 2006, at 08:32 AM All items afore mentioned problems I encountered are fixed in 1.1b. Thanks for the quick updates Blues. Also like the fix of Group/Page and Group.Page problem. How crazy would it be to get the option to change the display preference on that (slash or dot?)? TheWag 6 January 2006 at 10:35
The markups for TotalCount and PageCount didn't work in 2.1beta20. Jean DEMARTINI posted a fix on the pmwiki mailinglist:
Markup('','<','/\\{\\$PageCount\\}/e',$PageCount);
Markup('','<','/\\{\\$TotalCount\\}/e',$TotalCount);
Peter Brink 17 January 2006 at 12:59
Thanks for the info, I uploaded a new version (1.1c) fixing this problem.
Blues January 17, 2006, at 07:52 AM
tthelen January 28, 2006
Blues January 30, 2006, at 02:57 AM
Blues January 30, 2006, at 04:23 AM
tthelen January 26, 2006
Blues January 26, 2006, at 06:22 AM
Philippe January 23, 2006
Blues January 23, 2006, at 03:12 AM
No error, only time-out. I've made some tests without the farm and without any recipes except this one. The first time I call the page it's OK (as for the farm). Any next call remains without any answer. When I've deleted the file .total.counter and the folder .total.counter.lock, I can play again once. The access rights for .total.counter are 644 and for .total.counter.lock 755. Unfortunately I'm not allowed to change the access rights (for security reason on the server).
Philippe January 23, 2006, at 08:30 PM
Blues January 24, 2006, at 03:04 AM
Blues January 24, 2006, at 03:38 AM I've deleted the total.counter files with ftp and uploaded the version 1.2. The symptom remains the same. I've tried to remove the code associated with the lock folder ($lock) in totalcounter.php. With this, I can call the pages and the counter counts ! But I can imagine the effects of removing the lock...
Philippe January 23, 2006, at 08:30 PM
Blues January 25, 2006, at 02:36 AM As I've said a little higher the permissions are 755 for the lock directory and 644 for the file. It's what my ftp tool tells me... Maybe be it's a limitation of the web server (chmod is forbidden under php for example). Don't hesitate to request me some test. I will do my best.
Philippe January 25, 2006, at 11:16 PM
Blues January 26, 2006, at 03:00 AM
Blues January 26, 2006, at 03:07 AM Sorry, I hadn't catch your question, but the permissions are still the same even with the last version. And the problem is still there... Free.fr runs in safe_mode. If I've understood correctly that means he checks if the script has the same UID than the file being used...
Philippe January 27, 2006, at 09:16 PM I've just checked on free.fr ... rmdir PHP function is forbidden. So, no way. Sorry for inconvenience.
Philippe January 28, 2006, at 09:05 AM If all you need is a lock flag, use a file instead of a directory, using : unlink($lock) instead of rmdir($lock),and touch($lock) instead of mkdir($lock)I tried on Free.fr, it works for me (changes made on v1.2b) Emmanuel January 28, 2006, at 10:11PM (UTC)
Blues January 30, 2006, at 02:57 AM
Blues January 30, 2006, at 04:23 AM You forgot to change rmdir in your lock loop (line 91). And could you please tell me where to find official information about atomic operations in php (in my mind, touch and unlink are atomic operations...), I couldn't find anything. Thanks.
Emmanuel January 30, 2006, at 10:30AM (UTC)
Blues January 30, 2006, at 09:10 AM Thanks a lot. Seems to work perfectly now.
Philippe February 03, 2006, at 09:39 PM |