QuickTopic (SM) free message boards QuickTopic (SM) free message boards
Skip to Messages
  Sign In to access your topic list  |New Topic |My Topics|Profile
Upgrade to Pro   Customize, show pictures, add an intro, and more:   QuickTopic Pro...and check out QuickThreadSM
Topic: Refer 2.0
Views: 1586, Unique: 772 
Subscribers: 1
What's
this?
Printer-Friendly Page
Subscribe to get & post, or stop messages by email Subscribe
All messages    << 26-41  10-25 of 41  1-9 >>
About these ads
Who | When
Messagessort recent-top   
Post a new message
 
John  10
06-11-2003 11:15 AM ET (US)
Edited by author 06-11-2003 11:54 AM
Thanks for the new version Dean.

Warning: Unknown modifier 'p' in /refer.php on line 241
Warning: Unknown modifier 'r' in /refer.php on line 241


Sometimes (but not always) I see these errors on my index.php page and the other pages of my site that include refer.php.

My host seems to run PHP 4.1.2 on some servers, and 4.3.1 on others. Is 4.1.2 not new enough for Refer 2.0?

John
johnkeyes.com
Dean AllenPerson was signed in when posted  11
06-11-2003 12:21 PM ET (US)
John -

Looks like versions of PHP as early as 4.1.x were really unforgiving about running regular expressions on data - I should have accounted for that.

I'll add a more thorough escaping mechanism in Refer 2.01, which should make those errors disappear.
Dean AllenPerson was signed in when posted  12
06-11-2003 12:33 PM ET (US)
Christopher -
Thanks, silly glitch.

Fixed in the forthcoming version or if you like you can delete the following three lines, starting at 148 in refer.php:

$pageprint = ($pageprint!='')
    ? '<a href="'.$page.'" target="_blank">'.$pageprint.'</a>'
    : '';
Shawn Yeager  13
06-13-2003 12:49 AM ET (US)
Hi, Dean. First, thanks for the great app.

All is working well except for a sub-directory wherein I have an existing .htaccess that adds "AddHandler server-parsed .html". Having modified my top-level .htaccess as directed by setupdb.php, the index.html in said sub-directory is now being forced to download rather than display.

Given that I'm no kind of .htaccess/Apache wiz, I'm not clear what's causing the conflict. Any ideas?

Thanks again.
Raena  14
06-13-2003 12:39 PM ET (US)
Hi Dean,

I'm really enjoying Refer! I'm using it on the quiet to track referrals to selected entries on my blog, which is a lot more fun than wading through the logs. Oy. What a lifesaver.

Anyway: I'd had some trouble reading the RSS feed of my install of refer in NetNewsWire - I think it's around line 172 of refer.php, where you're using tag('$stuff', p) to put p tags in the content. Both NNW and the feed validator at feeds.archive.org didn't like those p tags; NNW just displayed "pppp" as the description.

In the meantime, I edited mine to remove all the p's -
else if ($format=="rss"){
 $refer = htmlspecialchars($refer);

        echo '<item>',
        tag($when.' - '.substr($refer,0,25),'title'),
        tag('http://'.$refer,'link'),
        '<description>Referral to ' .$page.
        ' by ' .$refer.
        ' -- Visitor is from ' .$host. '.</description></item>';
   }


It made NNW happy and the validator, but is there a better way to do this?
Dean AllenPerson was signed in when posted  15
06-13-2003 01:13 PM ET (US)
Edited by author 06-13-2003 05:30 PM
Raena -
Thanks, there is a simple fix, which will be in the forthcoming version, if you want to keep the <p> tags:

    echo '<item>',
     tag($when.' - '.substr($refer,0,25),'title'),
     tag('http://'.$refer,'link'),
     tag(
      htmlspecialchars(tag(tag('Where: ','em').$page,'p').
      tag(tag('From: ','em').$refer,'p').
      tag(tag('Who: ','em').$host,'p'))
     ,'description'),'</item>';
Dean AllenPerson was signed in when posted  16
06-13-2003 01:19 PM ET (US)
Shawn -
Is the .htaccess in the subdirectory to enforce server-side includes or something?
Shawn Yeager  17
06-13-2003 03:20 PM ET (US)
That's exactly it, Dean. It's to force a .html file to SSI a .pl script.
Nick Feder  18
06-14-2003 11:33 AM ET (US)
Howdy! I got this for error message...

Fatal error: Cannot redeclare refer_list() (previously declared in /home/www/ferociouscheese/refer/refer.php:93) in /home/www/ferociouscheese/refer/refer.php on line 91

And because I'm a major idiot with this kinda stuff, does anyone want to give me a hint?
Michelle  19
06-14-2003 08:20 PM ET (US)
Hi, I get the same kind of message like Nick Feder above:

Fatal error: Cannot redeclare refer_list() (previously declared in /home/www/ferociouscheese/refer/refer.php:93) in /home/www/ferociouscheese/refer/refer.php on line 91

How can I get rid of this or, is this normal?
Christian MendozaPerson was signed in when posted  20
06-14-2003 09:32 PM ET (US)
Hello, I just installed Refer2.0 and I'm having some difficulties. First, the setup ran fine and create the refer table. I copied and pasted the code into my .htacess. But when I view refer/index.php, it doesn't log anything. But when I changed the $mydomain in the refer.php to my other domain (five30.com), it actually works and logs the referers fine. How come one works (five30.com) and the other doesn't (crishchun.com)? My refer directory is at http://crishchun.com/blog/refer/index.php. Also, is there a way I can block my IP so it doesn't record my hits whenever I refresh and update my site? Thanks for your help!

Christian
Lvcivs  21
06-15-2003 12:59 PM ET (US)
Dean, Refer is the bomb-diggity. It worked beautifully until I upgraded from 1.1 to 2.0, whereupon it broke. This is bad because I checked my referrers every day and was addicted to it (it's better than reality TV).

I think the problem is related to the PHP version, which problem you said you were fixing for 2.01. So my only point is that I eagerly await the release of the new version. :)
Vixy  22
06-15-2003 02:17 PM ET (US)
I really like Refer, altough 'one day' it just suddenly stopped tracking. I dont know why? and im not the sharpest knife in the drawer, so eep, can you help?
Amber  23
06-15-2003 03:10 PM ET (US)
Ahh, I'm dumb. I think I probably messed something up in the config so this is what I have: (I took out my pass)

<?php

/* _________________________________
      ________| |________
      \ | Refer | /
       \ | | /
       / |_________________________________| /___________) (___________
 Refer 2.0 - 5 June, 2003
 Copyright 2003 by Dean Allen - http://textism.com
 All rights reserved
*/


// edit these (must be inside 'quotes'):

 $usr = 'Amber'; // db username
 $pw = 'password'; // db password
 $host = 'localhost'; // MySQL server, frequently "localhost"
 $db = 'refer'; // database name
 $table = 'refer'; // any name you like - installer will create the table


// Fill these in to halt the recording of unwanted referrals
// (i.e., an overly frequent google search, or a robot that
// inserts a referrer for every page it visits) by matching a
// distinct phrase. To add more, just duplicate a line and put
// a different match phrase inside 'quotes'.

 $exclude[] = 'netnewswire';
 $exclude[] = 'newsaggregator';
 $exclude[] = 'syndirella';
 

// Your web domain, without 'www.'

 $mydomain = 'extasy-kissed.org';


// Display visitor addresses in the list? 'Y' or 'N'

 $showhost = 'Y';


// If displaying visitor addresses, trim down to top-level domain?
// (i.e., mindspring.com, tiscali.co.uk)? 'Y' or 'N'

 $trimhost = 'N';


// How many referrers do you want to view per page?

 $count = 50;


// Purge old referrers after how many days?

 $expire = 30;


// Name of your site (for RSS feed)

 $sitename = "Extasy Kissed";


// Enter the time difference in hours (i.e., +6 or -3)
// if any, between you and your webserver, otherwise use 0

 $tzoffset = 0;


// Delete the # at your preferred time format

 $tformat = "G:i"; // 12:00 (24hr clock)// END CONFIGURATION


--------------------------------
Help?
Vixy  24
06-15-2003 03:28 PM ET (US)
amber: when you set up a db username and db, it's something_nameofdb

like mine undulant_refer for both db username, and db. might be causing your problem. so login to your cpanel, and copy/paste your dbname and username.
Amber  25
06-15-2003 03:40 PM ET (US)
OKay, that worked, thanks.

Now I have this:

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/extasy/public_html/Refer/setupdb.php on line 70

Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/extasy/public_html/Refer/setupdb.php on line 74

Database connection OK.

Create refer table?

-----------------------------------
I can't see what line 70 is because when I open it, it's all different.
RSS link What's this?
All messages    << 26-41  10-25 of 41  1-9 >>
QuickTopicSM message boards
Over 200,000 topics served
Learn more Frequently asked questions  Acknowledgements
What they're saying about QuickTopic
 Questions, comments, or suggestions? Contact Us
Read our use policy before beginning. We value your privacy; please read our privacy statement.
Copyright ©1999-2008 Internicity Inc. All rights reserved.