The referrers block has been updated, the following improvements are now available:
– fixed bug where empty reflog.txt would break script
– referrers now sorted by hits, from greatest to least
– referrers now have formatted display so long URLs don\’t mess up your page layout
– cron job instructions now included so reflog.txt is wiped at least once every 24 hours
Read \’more\’ for installation instructions.
September 3rd, 2002 at 12:03 pm
Hi!
I installed that referrer block but it doesn\’t work for me. It looks to
me that the lgf-reflog.php script doesn\’t write into reflog.txt but if i
put a url into taht file the refererrer block shows it correct as a
referrer, otherwise it always tells me \"no referrers yet today\".
I chowned reflog.txt und semaphore.ref to webserver user
(wwwrun:nogroup) and entered the correct path to the geeklog dir at
lgf-reflog.php, anything forgotten?
PHP 4.2.1
apache 1.3.26
Thanx for your help!
September 4th, 2002 at 5:32 pm
sounds like you\’ve done everything right, I would double check the permissions, even if you\’ve chowned the files make sure write permission is enabled for the apache user:
chmod u+w reflog.txt
then come into your site from a referring link to test it. Still failing that, find the following line in your lib-custom.php:
if(!$rfile = @file($reflog)) {
and get rid of the \’@\’ error suppression to find out what errors are being thrown.
September 5th, 2002 at 2:00 pm
Hi!
The permissions are correct because the web user can write to
reflog.txt, but if i remove the ‘@’ before “@file($reflog))” then the
output in the PHP-block at my site is: “could not find reflog file”.
structure at my geeklog site:
geeklog/reflog.txt
geeklog/semaphore.ref
geeklog/lgf-reflop.php -> $path = ‘/usr/local/WWW/
miklas.dasburo.com/geeklog/’;
geeklog/config.php
geeklog/system/lib-custom.php
geeklog/public_html/lib-common.php
Thanks for your help!
September 5th, 2002 at 5:29 pm
and it\’s not the space before miklas that\’s throwing off the path?
September 5th, 2002 at 6:21 pm
Unfortunately not, here is the original code from lgf-reflog.php:
$path = \’/usr/local/WWW/miklas.dasburo.com/geeklog/\’;
// Name of referrer log file
$reflog = $path . \’reflog.txt\’;
// Name of semaphore file
$semaphore = $path . \’semaphore.ref\’;
// Maximum number of referrers to log
$maxref = 50;
// Domain name of this site (minus \"http://www.\")
$mydomain = \’dasburo.com\’;
// From whence did Bunky come?
$ref = getenv(\"HTTP_REFERER\");