pftq Forums

Software and Scripts => Other Scripts and Tools => Topic started by: riscphree on May 25, 2007, 06:20:33 PM



Title: Problem with stats script
Post by: riscphree on May 25, 2007, 06:20:33 PM
I've got a small problem with the stats script. My directory looks like this:

/  - Pages I want to track
/counter - the counter files
/admin - my admin panel of sorts

Well, I made a /admin/stats.php file, and then included the counter file using:

$discount_counter=true;
include("../counter/counter.php");

And when I try to export a variable using

 echo stat_("total");

I get this error:

Fatal error: Call to undefined function: stat_() in c:\www\lolnsfw\stats.php on line 122

I looked for the stat_() function, found it in the core file, I then tried to include that, but it did not work either. Any hints?





Title: Re: Problem with stats script
Post by: pftq on May 26, 2007, 01:36:28 PM
Moving to right forum..

Are you sure your stats.php file is in the admin directory?

The error claims this:
Quote
c:\www\lolnsfw\stats.php


Title: Re: Problem with stats script
Post by: thought on August 06, 2008, 05:16:54 PM
Hi,

Loving the potential of the counter, but having the same problem with call to undefined function.  I've tried everything I can think of, all the ip/datetime/entrypoint etc functionality is working great, but I cannot for the life of me get the stats_ to work.  My structure is...

root
   Admin - contains 'stats.php'
   counter - contains the 4 pq counter files
   (+Lots of other irrelevant stuff of course)

I've put all the required code on stats.php (basically your index.php pretty formatting for the client), included what's needed (as ../counter/files.php), there's no errors on the inclusions so I know they're being found, but keep getting the call to undefined function...

/data/http/provisual.com.au/counter/tracker.php on line 48

I notice your demo page with all the stats has to include pqcounter.php, as this file isn't in the zip I've tried including both counter.php and pqcounter_core.php?

Any clues?

Thanks! 


Title: Re: Problem with stats script
Post by: pftq on August 07, 2008, 06:49:06 PM
Include just the counter.php - that file includes the core as well.

What is the undefined function?

Could you post your tracker file or email it to me? The file I have up is only 45 lines long... so there can't be a 48?


Title: Re: Problem with stats script
Post by: thought on August 11, 2008, 06:33:12 PM
Sorry for the delay in replying, cold and flu season here.

Thinking I've probably screwed something up I've ditched my additions and gone back to your raw scripts until I understand what I'm doing to what you're doing.  All the problems are, of course, gone.

Thanks for a great script!