PDA

View Full Version : For You Guys Bummed Out At The Loss Of Awstats...


dbmasters
05-28-2005, 01:37 PM
I have been working on something that will hopefully help people out a little.

http://scripts.dbmasters.net/files/dBStats.zip

This is a little script that will track much of the same info that AWStats did. It work with any PHP/MySQL system.

readme file:

This is a very simply little traffic analysis script which stores necessary information
in a series of MySQL database tables on any php driven web site.

This script will track visits to each page of your site each day and the pages that
were clicked through to get to that page. It also keeps logs of which useragents visit
your site monthly. These user agents will be analyzed as much as possible to show
which browsers and operating systems are visiting your site. Additionally it can tell
some browser front ends and addons that people are using such as Special Toolbars, MyIE2,
Maxthon front ends for IE and such other things. Lastly it will show you which bots,
spiders and crawlers are coming to your site on a monthly basis.

The database and data captured is designed to be as effecient as possible providing a
maximum of usable info from a minimum of consumed database space.

Installation is pretty easy:

fill out the logger_config.php file:

$domain=""; - should be self explanitory
$block_ip[0]=""; - list of IP's you wish to NOT have tracked add [1], [2] etc to add more
$admin_pass=""; - password to get into administration
$mysql_user=""; - database username
$mysql_pass=""; - database password
$mysql_db=""; - database name
$mysql_server=""; - database servername

upload all the files, log in to logger_admin.php and install the tables from the provided link.

Then include logger.php in to any page that you wish to track like so:
<?php include("path/to/logger.php"); ?>

Hopefully this will help ease a little of the pain of the loss of AWStats...

Leave any bug reports here, I'll try to keep up on it.

Donations happily accepted at http://scripts.dbmasters.net :)

Joe
05-28-2005, 03:32 PM
This is the only sanctioned Stats program (except for webalizer) by HostPC.

Awstats is NOT allowed, period, end of conversation - dont ask! :)

Donations happily accepted at http://scripts.dbmasters.net
I'd respectfully ask that you drop a couple $ in the donation bucket for this extremely useful script from a fellow community member.

Thank you.

Joe

thevillageinn
05-29-2005, 02:52 AM
I have to echo the request for donations to dbMasters'. I haven't yet used this new script, but if it's anything like the others, it's well worth a donation. Heck, share a little of the money you are saving on hosting (particularly with the new double quotas) with dbMasters' for his capable scripting and willingness to listen and work out bugs and issues, and just generally, generously support his scripts.

They really are worth a donation, really.

dbmasters
05-29-2005, 08:37 AM
Thanks guys, I appreciate the props :)

thomas
05-29-2005, 10:52 AM
dbmasters,
thanks for posting this.

Do you have any more info on your script? I looked around your web site but I could not find it listed there.

Screenshots would be helpful, but more specifically I would love to know if it tracks the following:

spiders (if yes, which ones?)
referrers (complete list? with complete URL?)
can you mask your own domain out of the referrers?
Keywords and Keyphrases?

thank you again,

Thomás

dbmasters
05-29-2005, 11:26 AM
be aware this is just the first version.

spiders, yes, many, many...
referrers, yes, full urls.
filtering out your own referrers, no, not yet, but likely in a few days...
keywords/phrases, sort of, I don't list them, but they can easily be seen in the URL's of the referrers, I am trying to figure out a way to parse them out for reporting.

In a few minutes I will be uploading a new version with some display fixes and imporovments, no database changes, just display changes.

There is nothing on any of my web sites, cuz I am not really widely "marketing" this script or anything, just trying to solve a specific problem for my virtual neighborhood. Therefore, I haven't sunk a lot of time into screen shots and marketing type stuff. It's easy to install and try out, if you don't like it, don't use it. Like I said, just trying to help solve a problem. I choose to make this as light duty as possible in regards to database space it uses, but still get as much info from it as possible...keyword/keyphrase extraction is something I want to work in at some point, the information is already in the database, I just need to make some really complex queries to get it out...

And as we all may or may not know, it stunning how many bots and stuff are out there...I am amazed at the numbers, so a feature I hope to add in the future is the ability to send selected bots elsewhere...effectively banning user-chosen bots.

dbmasters
05-29-2005, 11:45 AM
OK version 1.01 is at the same URL for download.

improved page details layout. When listing the monthly history popup report for any given page, you can now click on the day of the month to flip the report for referrers to the page for just that day as well as going back and getting the full months referrers list...

thomas
05-29-2005, 09:36 PM
thanks for the replies dbmasters,
tomorrow I have the day off, so I hope to give it a try.

Thomás

bluesguy
05-30-2005, 12:07 AM
This is a very simply little traffic analysis script which stores necessary information in a series of MySQL database tables on any php driven web site.

I guess this won't work for html sites.

I tried adding it to bluesparadise.com and got this error:

Warning: Division by zero in /home/blues/domains/bluesparadise.com/public_html/dbStats/logger_admin.php on line 282

Joe
05-30-2005, 12:16 AM
As soon as your first hit/referrer comes in, that'll clear.

bluesguy
05-30-2005, 12:36 AM
Originally posted by Joe@May 29 2005, 10:16 PM
As soon as your first hit/referrer comes in, that'll clear.
Quoted post


thanks.. I was trying to hit it myself and it wouldn't recognize it

dbmasters
05-30-2005, 01:05 AM
damn, I thought I fixed that error, crap...

1.02 is up now, no database changes, just laying the new files over the old ones (except the config file.

1.02 is just improved reporting, same data, just new ways of slicing and dicing it.

I was hoping 1.02 would be the final 1.x version, but I gotta fix that dang division by 0 thing...eh, I'll do it in the next couple days, I am kinda sick of this script right now...

As far as working on HTML sites, I dunno, if you can include it with

<!--#include virtual="path/to/logger.php"-->

it might work, I am not sure.

dbmasters
05-30-2005, 08:51 AM
I just installed 1.02 on a new site and got no "division by zero" errors.

Be aware, before clicking the link to install the database tables you will see loads of errors, but once the tables are installed you shouldn't.

bluesguy
05-31-2005, 12:38 AM
Originally posted by dbmasters@May 30 2005, 06:51 AM
I just installed 1.02 on a new site and got no "division by zero" errors.

Be aware, before clicking the link to install the database tables you will see loads of errors, but once the tables are installed you shouldn't.
Quoted post



it works fine for php.. couldn't get the <!--#include virtual="path/to/logger.php"-->
thing to work on html..

there are some pretty good html to php converters out there.. they work for straight html, but choke on java script...

danw
05-31-2005, 02:39 PM
Well, at the moment I've only got two visits logged, but it looks like a spiffy program.

For what it's worth to others, if you've got an "include" with a bunch of stuff that goes on every page, you can just add the 'include("path/to/logger.php");' line to that. That's what I did anyway.

Dan

dbmasters
06-01-2005, 10:01 AM
http://www.dbmasters.net/elements/dBStats.zip

1.03 - fixed an issue with single digit days reporting on the front page overview report also added a couple of new browser addons (toolbars n' crap) to the useragent report

danw
06-01-2005, 10:16 AM
Well, Dan, I like what I see so far. My concern, however, is over the database size: in less than 24 hours, the database for my site has grown to nearly 200 kB. That probably works out to 1.4 MB per week or about 75 MB/year--assuming the traffic doesn't grow!

dbmasters
06-01-2005, 10:22 AM
Well, yes, it will grow more in the first days as it logs page URLs, referrer URL's and useragent strings. AFter any given URL or useragent is logged once, for the entire rest of the logging it simply referrences that record with by that strings db record ID.

Obviously, since this is so new of a script, I haven't tested it much, but I did design it to use as little as possible. The last php/mysql logger I used took up 30MB within a month...so if mine only takes up 75 within a year, well, I'm happy...

That said, it should grow a lot in the first few days and slow after that. In the case of sites that constently have new pages, such as forums, well, then the database will grow a bit all the time.

if you look at the database schema (and understand it) you will see there is only one text field in the schema, all the rest are integers and dates, and NO field allows nulls, so this should, in theory keep it very high performing as well.

dbmasters
06-01-2005, 10:48 AM
Oh, I should also add in the next version I hope to implement an "export to excel" feature for monthly reports to archive reports and then purge those records...which would also help your database size stay in check.

I am personally finding it kinda sad that my home business site gets more bot visitors than real people :(

danw
06-01-2005, 11:02 AM
Originally posted by dbmasters@Jun 1 2005, 09:22 AM
AFter any given URL or useragent is logged once, for the entire rest of the logging it simply referrences that record with by that strings db record ID.
Quoted post


Duh, yes, of course. I even looked at the database schema before making that post, but it never clicked that any given page would be entered only once. Thanks for clarifying!

QuickGold
06-01-2005, 11:09 AM
Any screenshots? Demo?

dbmasters
06-01-2005, 11:57 AM
Originally posted by QuickGold@Jun 1 2005, 02:09 PM
Any screenshots? Demo?
Quoted post

nope, just put up for people that wanna try it.

If some real interest is generated I may put up a demo or something, but not as much has been as I expected...I wrote it to solve a problem for me. Figured if others wanna use it, take a crack at it.

danw
06-01-2005, 12:43 PM
The big feature I wish this had would be the ability to count visitors in addition to page views. Any way to add that?

dbmasters
06-01-2005, 01:01 PM
no, there is currently no click thru path tracking or session tracking.

come on, guys, give me a break here, this is a simple script for a simple task...the stuff like session tracking is where the REAL space gets chewed up...which is why I left it out.

dbmasters
06-02-2005, 12:10 AM
OK, I haven't published a newer version yet, but in development it now has the options to cut off querystrings of internal pages and/or referrers (each have their own config). I also may have devised a plan to get rough numbers of visitors (as opposed to page views) with the existing data...it will require more investigation tho...

danw
06-02-2005, 11:48 AM
Well, I'm a little confused. dBStats seems to be reporting between about 1.8 times more visits than any other traffic analysis program I've tried. Certainly, I like the numbers, but I don't believe them. Any ideas?

dbmasters
06-02-2005, 12:26 PM
Well, it's logging every hit coming in to your site, and not bloating anything in any way. I have found that mine is logging a lot more crawlers than most others do, so maybe some of the other logger ignore some hits based on some criteria that identifies them as something not worth reporting or something like that...

I can say that I am doing nothing to bloat the numbers in any way...

dbmasters
06-04-2005, 08:31 PM
v 1.5 now available (same location as above), and it's a required upgrade. A couple of security fixes, one that is pretty crucial.

This upgrade will require rerunning the install and running an additional .sql file to facilitate new features, including visitors by the hour and country tracking. Also a new, easier to use layout.

dbmasters
06-10-2005, 04:18 PM
While not released yet, the next update has useragent and referrer banning, which is kinda cool, at least for me since a couple of online casinos seem to have taken a liking to spamming my referrer logs recently...

::sigh::

I hate people...leave a guys logs alone for cryin out loud...

Oh, and it'll be able to filter out internal referral links too, so you see only referrers coming in from other sites.

dbmasters
06-18-2005, 02:48 PM
http://www.dbmasters.net/elements/dBStats.zip

version 2.0 - seems solid...

- added referrer filtering to remove from certain domians from the results
- add the ability to track or not track with querystrings on internal pages and referrers with separate control for each
- banning of referrers and useragents
- tracking by hours of day
- country tracking of visitors that seems to work most of the time (still trying to tune that).

And a cleaner report than originally launched...seems to be working well...

I have been monitoring database growth on a couple sites, and while initially it does grow pretty quickly, the way the database schema was designed, the growth decreases once page URL's, refer URL's and common useragents are logged once. Each string is saved once, and from then on it's just known by record ID, not saving the string multiple times...and the database size is appearing to stay at a much more reasonable size than many other MySQL driven traffic analyzers...but as always, time will tell.

danw
06-22-2005, 12:44 PM
2.0 offers some great additions!

But I'm having a problem:
"Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/danand00/domains/danandsherree.com/public_html/dBStats/logger.php on line 55"
appears on each page now. Ideas?

Dan

starfighter
06-22-2005, 01:22 PM
Originally posted by danw@Jun 22 2005, 11:44 AM
2.0 offers some great additions!

But I'm having a problem:
"Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/danand00/domains/danandsherree.com/public_html/dBStats/logger.php on line 55"
appears on each page now. Ideas?

Dan
Quoted post

Dan W,
I had the same problem, it looks like an extra table was added with the new version. I solved the problem by re-running the install script which added the new table and solved the error problems.


Dan

dbmasters
06-22-2005, 03:14 PM
Yeah, that error looks like the added tables were not installed. I prolly shoulda said

rerun the install script before using

A couple new tables were added, also, be sure to run the ip2nation.sql file to create the country related tables...

D9r
06-28-2005, 01:45 PM
Originally posted by Joe@May 28 2005, 01:32 PM
This is the only sanctioned Stats program (except for webalizer) by HostPC.
Awstats is NOT allowed, period, end of conversation - dont ask! :)
Quoted post

Could you please explain why? I'm sure you already have but I missed that conversation. Stats is such a common application that I'm surprised we have to resort to getting Dan to write his own custom program for us. I'm not complaining -- I'm happy he's willing to create an alternative for us. I'm just curious why there aren't any good stats applications already available.

dbmasters
06-28-2005, 03:49 PM
AWStats in particular has proven itself to have some pretty big security flaws, which is the reason for the banning of it. As to why mine wound up being the only HostPC approved logger, I dunno, I do not represent HostPC...

Make no mistake Joe didn't "get me to write a stats app", I did it of my own free will, and honestly, Joe didn't know about until the first version was almost done and I emailed him to say "hey, try this out".

I did it for my own selfish needs and after hunting and hunting and hunting I found no decent traffic logging system that was free, or even cheap, that did what I wanted...the ones I did find had some serious problems, when it came to php/mysql ones the problem was always generating a massive database quite quickly, the log analyzers the problem was often lack of features...the stand alone apps the problem was expense and the hassle of having to download logs...so I made one that did what I wanted and then some per some peoples requests that seemed logical even if I didn't use it...

Why others are not available, well, log analyzing is a hassle, servers have different formats that you have to account for, useragent parsing is pretty difficult...people put A LOT of time into such apps and good traffic analysis can be a VERY good thing for marketing reasons and to guide future development, therefore I guess people want some payback for the work...which I can't really blame them for.

D9r
06-28-2005, 08:46 PM
For a reseller account with multiple clients, can your script be installed once so it works for every domain, or does it have to be installed into each domain? If I have 10 clients, do I have to do 10 installs or 1 install?

dbmasters
06-28-2005, 09:16 PM
Originally posted by D9r@Jun 28 2005, 11:46 PM
For a reseller account with multiple clients, can your script be installed once so it works for every domain, or does it have to be installed into each domain? If I have 10 clients, do I have to do 10 installs or 1 install?
Quoted post


Currently, each domain needs to be installed by itself...I have been trying to figure out a way to do a global install...but can't really do it cuz it's database driven rather than log-driven...

dbmasters
07-01-2005, 11:15 AM
I am just curious about something. In planning the next update I am considering removing the browser addons and toolbar reporting, but if people actually use it or find it interesting (it is marginally interesting) I don't want to, I am just considering removing it because it's a processing pig.

I have been using it over a month now, so I had to wait for the next month to start to make sure some things worked like they were expected to, and it appears they do, which is cool. Once site has logged around 200,000 visits and the database is still under 5MB...so things are looking decent, it's just that damn country logging thing, I dunno why that stopped working...

skidawg
07-01-2005, 04:53 PM
Personally, I think the browser add-ons part is kind of interesting, but I wouldn't miss it at all if it was removed. I don't really pay that much attention to that section, just more as an idle curiousity is all.

I would vote to remove it, if it would help to ease the load on the server.

That just my $0.02 though.

pjk
07-07-2005, 02:35 PM
Hey Dan,

argh, I'm trying to get this dBStats running on my test server. (the redhat 9 box)

I dl the file, changed the config file :

$domain="192.168.151.125";
$domain_filter[0]="";
$domain_filter[1]="";
$filter_referrer=0;
$block_ip[0]="";
$page_querystrings=0;
$referrer_querystrings=1;
$send_bans_to="";
$admin_pass="test";
$mysql_user="root";
$mysql_pass="";
$mysql_db="stats";
$mysql_server="localhost";
?>


uploaded to my test box and ran the admin, then the install script.

This section of code:

$mysql_access = mysql_connect($mysql_server, $mysql_user, $mysql_pass);

if (!$mysql_access) { die("<p>Unable to connect to server</p>"); } else { echo ("connected to ".$mysql_server); }

if (! mysql_select_db($mysql_db, $mysql_access)) { die("<p>Unable to connect to ".$mysql_db); }


gives this result:

connected to localhost

Unable to connect to stats

I'm connecting to the server, but can't create the database, therefore can't create the tables inside the database.

I can go into phpMyAdmin and see that there's no database named stats. I can create the database, but I still can't connect to it.

Any ideas?

Thanks.

dbmasters
07-07-2005, 04:10 PM
dBStats does not create a database, it simply adds tables to an already existing database. The database (which should already be set up) is set in config, also, it might be nice to add the root password to the password variable...tough to connect with no password.

pjk
07-07-2005, 04:39 PM
hey, that did it. cool.

this is my internal test server, so i wasn't too critical with a password.

thanks.

Guest_Dingo_*
07-09-2005, 11:32 PM
Hey Dan...

Quick question here... My main page is already doing MySQL DB work, and when it goes to do some of that database work, it is trying to access the right table, but in the wrong database (My dB log DB instead)

Is there some limitation with the number of databases that PHP has open at once? (I'm going to go do research - but figured I'd ask in parallel)

Thanks :)

Guest
07-09-2005, 11:42 PM
Originally posted by Guest_Dingo_*@Jul 9 2005, 09:32 PM
Hey Dan...

Quick question here... My main page is already doing MySQL DB work, and when it goes to do some of that database work, it is trying to access the right table, but in the wrong database (My dB log DB instead)

Is there some limitation with the number of databases that PHP has open at once? (I'm going to go do research - but figured I'd ask in parallel)

Thanks :)
Quoted post


Never mind - changed the order of the includes of that php file - seems to have solved it :)

D9r
07-12-2005, 08:45 PM
Originally posted by dbmasters@Jul 1 2005, 09:15 AM
I am just curious about something. In planning the next update I am considering removing the browser addons and toolbar reporting, but if people actually use it or find it interesting (it is marginally interesting) I don't want to, I am just considering removing it because it's a processing pig.

Quoted post
^^My vote: if it doesn't supply really useful data and if removing it frees up resources, then remove it.

Regarding the database, would you suggest a separate database just for the stats, or not? Is there any advantage to having a separate database for the stats?

dbmasters
07-12-2005, 09:46 PM
Id suggest leaving it in the same database everything else is in...not really any pros or cons to either in this case...unless you want some feature like "our top ten referrers" or something like that which may need to pull data from the script...in that case you'd want to keep them in the same one for definate advantages.

dbmasters
07-15-2005, 09:36 AM
::sigh::

Well, due to ip2country no longer being available, my inabaility to get the current version working, and significant costs for licensing for any alternatives, it would appear the country feature will be discontinued in the next version :(

That bums me out, I HAD the feature working great at one time, then it quit working, now they quit maintaining it...likely due to it no longer working?

I dunno, it's disappointing though.

pjk
07-15-2005, 12:40 PM
that blows.

The data should be fine as it is, yes? The scripts don't do any external referencing? do they?

I'd like to eventually make some code to pick up a viewer's ip / country, and show some information, and/or disable some functions, based on where they're from.

Does this sound feasible? I haven't looked into it (or your code) yet.

dbmasters
07-15-2005, 01:22 PM
The code in mine does (in theory) grab the IP number of the visitor (that much I know works) and looks up the country for that IP based on a couple database tables that are created with the ip2country.sql file that I package with dB Stats.

I know taking that IP number and doing a direct SQL call in PHPMyAdmin works for any given IP, but in the context of my script it does not...haven't found why yet...

Regardless, what you are trying to do is certainly feasable, however, the problem is finding good information regarding the IP/Country relationship that can be queried directly (such as mine is) or hit as a web service with a remote call... In all fairness I haven't looked really hard, but I have a little bit...and haven't found a great way yet...IP2Country was very cool, but, well, I dunno...giving me static, and it's prolly my fault whatever it is, I just haven't found it.

D9r
07-15-2005, 03:24 PM
Here's a resource that may help; at the least it's educational:
http://dnsstuff.com/info/geolocation.htm

dbmasters
07-15-2005, 06:58 PM
Thanks, looks interesting...and one of the "pricey" solutions <_<

Dingo97
07-21-2005, 10:13 PM
Hey DB...

How can one reset all the stats?

Love it so far - thanks for the efforts :)

dbmasters
07-21-2005, 11:36 PM
glad you like it.

you can uninstall and reinstall the database tables to reset everything. It only takes a couple seconds.

pjk
07-22-2005, 11:01 AM
I'm liking it too, my corecomm hosting is giving me a funny cert for ssl, so I'm just using your dbstats for watching traffic.

a question or two, if you've time,

I'm getting the hits, say 100 per day. when I look at webalizer stats, it shows (for instance) 350 hits, with 20 visits. What's the difference, and how does your dbstats correspond to that (number wise).

Like if I get 100 in dbstats, does that correspond to , say like 10 visits.


Also, in my country part of dbstats, I'm getting all USA hits. Is this incorrect, with your script not working? or are they all from USA.

Oo, one other thing i just though of, the IP addresses aren't stored, are they? I didn't see them looking through the tables.

dbmasters
07-22-2005, 12:11 PM
The country thing is goofed up, read up the thread a bit I acknowledge that and will likely pull the feature from the next addition for reasons I epxlain above.

No, I don't store the IP of visitors anywhere, that would be some serious database bloat. It'd be easy to do, but that was a feature that didn't make the cut in the cost/benefit balance beam...

Webalizer sucks, I dunno how the heck they rank their numbers. Hoiwever, hits and visits are two different things. In theory, hits are ANY file getting pulled from your server space. html files, images, audio, etc...so one page visit can product 10 hits if you have 9 images on it. visits in theory is the number of people...if the one person visits 10 pages, it's still only one visit...

Page views is what dB Stats tracks, that is, as it would sound, the number of pages that are viewed. In the future I hope to also add visitor sessions to be able to determine pages per visitor ratio...

pjk
07-22-2005, 01:24 PM
cool, thanks for the info. that cleared up a bunch.

I just got out of a meeting with a kellysearch salesman. Any of your clients list with them? The service looks to be quite a good, lots of customers seem to have benefited alot from their listing.

dbmasters
07-23-2005, 08:11 AM
I do a lot of search engine work, and honestly, I have never heard of them.

pjk
07-24-2005, 03:03 PM
They're a index service, business listings, and the like. They stay out of the SEO field.

Kinda like the Thomas registry, for businesses. Thanks anyway.

ljmyers
08-22-2005, 04:25 PM
Dan,

Just wanted to say thanks bunches and add a comment. The only way you could have made the install on this script anymore user friendly would have been to come to my house and installed it yourself. I'm still a little fuzzy on mysql and some specific directions involving it and this was I think the easiest install I've done yet.

Smiles,
Lana

dbmasters
08-22-2005, 05:18 PM
Glad ya like it. Hopefully in coming days I'll have a new version out...don't worry tho, no db changes, just dragging new files in...that will hopefully make it quicker rendering.

D9r
09-03-2005, 07:30 AM
Originally posted by ljmyers@Aug 22 2005, 02:25 PM
Dan,

Just wanted to say thanks bunches and add a comment. The only way you could have made the install on this script anymore user friendly would have been to come to my house and installed it yourself. I'm still a little fuzzy on mysql and some specific directions involving it and this was I think the easiest install I've done yet.

Smiles,
Lana
Quoted post

Is this the same Lana who a year ago we were coaching to wean off of installatron and try installing some things on her own? Wow, now she's a php/mysql/cms expert. ;) Way to go, Lana. Next thing you know you'll be writing your own queries.

ljmyers
09-03-2005, 10:17 AM
Hahahahahaha....The one and most definately only D9r. LOL

Ummmmmm.....what's a queries???? Just kiddin' with ya. :lol:

Maybe I'll even be able to write my own php scripts so that I can customize for me and what (specifically speaking) "I" want. But that's a whole other chapter. lol

Ahhhhh.....some day ;)

dbmasters
09-03-2005, 02:34 PM
As I recall Lana came here from the Yahoo board where me and one other dude coaxed her into getting real hosting and learn to code html on her own and learn such things...Lana has come a LONG way...kudos.

ljmyers
09-03-2005, 08:02 PM
Ohhh my goshhhhh . . .you guys should have seen the original ljmyerscompany.com that I built with ms front page. On my pc it looked fine but I checked it out on the pc at the local library. "A Shameful Mess" are the only words for it really. LOL That is when I made Dan promise me that he had to be painfully honest when he checked out something for me and he also started teaching me html.

As I remember I kept that yahoo html board hot. I do know that when I rarely pop in there now, it's dead. I just figure it died when I left and came here to bug Dan and you guys instead. hahahahaha

On a serious note, thanks for the kudos guys . . . especially when it feels like I still know soooo little sometimes and in the scope of things; I'm sure that is at least partially true but when there is nothing else to learn, then it just gets boring. ;)

dbmasters
09-03-2005, 09:13 PM
I dunno Lana, I have been in this business many years, and every time I turn around I realize I know nothing...so the feeling is normal I think...

Be proud of what you have learned (ya should be) not bummed about what youy haven't learned yet...this is too fast moving of a biz to get all caught up in that circle...

ljmyers
09-04-2005, 09:51 AM
Nahhh Dan, I'm not really bummed out about it at all, a little flustered or overwhelmed on rare occasion maybe but never bummed out. Like I said, when you have learned it all and there is nothing else to learn, that is when it just gets boring. ;)

D9r
09-05-2005, 04:46 AM
My experience with web development is, the more I learn, the more I realize I don't know. There's so much to learn. Sometimes it gets overwhelming, but then I just get back to work on whatever the current project is and try not to think about it.

dbmasters
09-05-2005, 02:23 PM
Yeah, I get that overwhealmed feeling sometimes, I get a contract, get to the client, and find out they only told me half of the story...and the other half is something I don't know at all and/or have never worked with so I wind up being under the gun to learn something new quick. Which is OK cuz I love learning new stuff, but I don't like that kind of pressure...

I hope I get the job I interviewed for last week. It's for a web and multimedia producer for a very prestigious private college in Minnesota, a good gig, managing the further development of their homegrown content management system and streaming audio and video archives they have of various things...it's down to three candidates, I should hear next week...I think I have a good chance. Then I'd be back to full regular work, know exactly whats expected of me, have a regular pay, get to see benefits of my work...I like the indie thing like I am doing now, but it's stressful sometimes.

ljmyers
09-05-2005, 04:41 PM
X - X - X - X - X <<< This is me crossing me fingers and toes and anything else that's crossable for you Dan. Good luck; but then again, you really don't need luck with your experience. ^_^

dbmasters
10-04-2005, 09:48 AM
OK, version 3 of dBStats is available from http://scripts.dbmasters.net/files/dBStats.zip.

Big improvements...no migration from previous versions due to serious db schema changes.

it now tracks visits and visitors, IP's of visitors...URL's, referrers, useragents and IP's down to the day, visits and visitors to hour of day (hmmm, I already smell an upgrade).

It seems to be working pretty well. I have tested this database schema (or very similar) with up to a million hits and the only serious performance issue was while parsing useragents for browser and OS, other than that it performs very well. This should, in theory track over 2 billion visits, in theory, 4.5 billion...but, well, I have doubts how well it would perform...

The database will grow quite quickly at first while storing all the web site and referrer URLs, and useragent strings, but after a few days, but, it only stores each one once, so after a few days the growth should slow a great deal. The only database table that should get thousands or millions of rows is the visits logging table, which is all not null integers, so it should perform pretty well...but I'll let anyone who uses it be the judge of that...sorry, no public demos, but feel free to try it if you wish...

ljmyers
10-04-2005, 03:52 PM
Looking forward to trying it but I think I will wait a bit because of that update your smelling. haha

dbmasters
10-04-2005, 03:58 PM
the update is no database change, just reporting changes.

ljmyers
10-07-2005, 09:35 AM
Curious: Does dbstats have the option to "not log specific ip's" as a hit or visit or am I'm missing it - or - is this possible coming in the future?

dbmasters
10-07-2005, 11:02 AM
yeah, there is a "block IP" function in the config...I use it all the time to block my home computer from being logged. the next reporting update is coming over the weekend hopefully, huge improvemnet on aggregate reports. no db changes, just getting reporting down to a finer detail.

ljmyers
10-07-2005, 02:29 PM
Sounds peachie Dan; my goal is to get the dbstats updated next week sometime and I will look at the block ip thing then.

dbmasters
10-07-2005, 02:49 PM
I am considering adding a cookie option too, since the vast majority of people don't have static IP's, having an option in the admin to set a cookie on machines you don't want logged would be useful too.

ljmyers
10-07-2005, 09:53 PM
If it wouldn't be too difficult or time consuming, I think that would be really helpful.

Just a comment: I remember awstats had a section that logged when someone added one of your pages to there favs or bookmark one, I can't remember which one it was. I thought that was a neat little extra or add on.

dbmasters
10-07-2005, 11:55 PM
I wouldn't even begin to know how the heck any logger could know when somebody bookmarked your site...mine can tell when they CAME from a bookmakr or direct URL entry...tho that feature is buggy in this release, it's fixed in mine that will be released in full shortly, this weekend if I get time.

ljmyers
10-08-2005, 02:41 PM
I've been getting specific sites listed in the referres section. I like that because it's a little bit of a tale tale sign on who's linking to you yes, but more so how popular your site just might be with the average viewer/webmaster.

dbmasters
10-09-2005, 09:46 AM
go to google and type in "LINK: yourdomain.com" and it will show you everybody they have indexed that link to you, which is a pretty good way to gauge popularity as well.

ljmyers
10-09-2005, 12:06 PM
Yep, I've done that too. haha

I don't really take the time to mess with it anymore though -only very rarely.

dbmasters
11-01-2005, 08:35 AM
http://scripts.dbmasters.net/files/dBStats.zip is the newest version 3.5 of dB Stats. Much more detail, lower CPU usage in parsing data as the data a split between more screen, so you only see what you want to see. More detail per day and per month, click thru paths, IP lookup and more.

ljmyers
11-01-2005, 09:30 AM
Thanks Dan,

Just d/l'd and looking forward to it.

dbmasters
11-01-2005, 09:58 AM
Now hopefully I packaged it all correctly...I am such an idiot when it comes to packaging sometimes...I forget stuff or whatever...I really need some quality control person to watch me do that.

ljmyers
11-01-2005, 11:19 AM
hahahaha

kind of like your mama standing over you makin sure you did your chores right the first time. lol

pjk
11-02-2005, 12:09 PM
Hey, speaking of not having files . . .

I just installed the 3.5 on my test server, and it worked well. Went right over top of the 3 version of a few weeks ago.

I didn't update from 2.0 on my real sites, and just did so now. When the page comes up, there's the errors because of the databases not being there, no biggie, I'll just create the new ones needed for 3 / 3.5.

When I click on the reference button, I get the install / empty / uninstall section under the db sizes, but they link to a 'http://www.domain.com/dBStats/install_reference.php?ax=create' or empty or drop, whatever I mouseover. The install_reference.php file doesn't exist. Am I missing something?

This also happenes on my test server I just upgraded to 3.5. The program runs as planned, I get the data on the screen that was collected with 3.0, but the install / empty / uninstall links link to install_reference.php, which doesn't exist.

pjk
11-02-2005, 12:41 PM
I just did some looking around, I still have the ver3 files hanging around on my desk PC. I may try and run the 'logger_install.php?ax=create' and see what happens.

* *

That did it. It's working.

I totally dig that visitor log. Nice work Dan.

Joe
11-02-2005, 12:44 PM
Dan's having trouble logging in, but he's working on it... here's his email to me:

"PJK asked a question about my dB Stats in the top forum...the
answer is that's a wrong link, it should be pointing to
main_reference.php not install_reference.php...my bad."

pjk
11-02-2005, 12:46 PM
Thanks for the heads up Joe. I got it , but figured he'd want to change the code up for future DLs.

dbmasters
11-02-2005, 12:49 PM
ah, all logged in now...

Yeah,my bad, PJK, below is a much better version of the file with a few other fixes too, sorry for the long post:

<?php
////////////////////////////////////////////////////////////////////////////
// dB Masters' dB Stats, Copyright (c) 2005 dB Masters Multimedia
// Authored and Distributed by Dan Ball, dB Masters Multimedia
// dB Stats comes with ABSOLUTELY NO WARRANTY
// Licensed under the AGPL
// See license.txt and readme.txt for details
//
// dB Masters Multimedia - http://www.dbmasters.net/
// Community Manager - http://scripts.dbmasters.net/
////////////////////////////////////////////////////////////////////////////
ob_start();
$ax=$_GET["ax"];
include_once("logger_config.php");
include_once("logger_agents.php");
if($_COOKIE["admin_log"] == md5($admin_pass)){

// date functions
if($_GET["y"] != "" && $_GET["m"] != "")
{
$month=$_GET["m"];
$year=$_GET["y"];
$date_query=$year."-".$month."%";
}
else
{
$month=date('m');
$year=date('Y');
$date_query=$year."-".$month."-%";
}
$monthname=get_monthname($month);
?>
<html>
<head>
<title>dB Stats for <?php echo $domain; ?></title>
<link rel="stylesheet" href="style.css" type="text/css" title="style sheet" />
<script src="site.js" type="text/javascript"></script>
</head>
<body>
<div align=\"center\">
<table class="main">
<tr>
<td width="100%" class="bodymd">

<p class="bodylgbold">Database Statistics</p>
<?php
if($_COOKIE["admin_log"] == md5($admin_pass))
{
if(!$ax)
{
$result=mysql_query("SHOW TABLE STATUS FROM ".$mysql_db." LIKE 'logger%'", $mysql_access);
if(mysql_num_rows($result))
{
$db_size=0;
echo "<table cellpadding=\"2\" cellspacing=\"0\" class=\"list\">\n";
echo "<tr class=\"header\">\n";
echo "<td>Table Name</td>\n";
echo "<td style=\"text-align:right;\">Created</td>\n";
echo "<td style=\"text-align:right;\">Last Updated</td>\n";
echo "<td style=\"text-align:right;\">Rows</td>\n";
echo "<td style=\"text-align:right;\">Size(bytes)</td>\n";
echo "<td style=\"text-align:right;\">Size</td>\n";
echo "<td style=\"text-align:right;\">Max Size</td>\n";
echo "</tr>\n";
while($line = mysql_fetch_array($result))
{
echo "<tr class=\"secondary\">\n";
$count=0;
while(list($col_name, $col_value) = each($line))
{
if($count % 2 && $col_name=="Name")
{
$table_name=$col_value;
$db_size=$db_size + $col_value;
}
if($count % 2 && $col_name=="Create_time")
{
$table_created=$col_value;
}
if($count % 2 && $col_name=="Update_time")
{
$table_updated=$col_value;
}
if($count % 2 && $col_name=="Rows")
{
$table_rows=$col_value;
}
if($count % 2 && $col_name=="Data_length")
{
$table_size=$col_value;
$db_size=$db_size + $col_value;
}
if($count % 2 && $col_name=="Max_data_length")
{
$table_max_size=$col_value;
}
$count=$count + 1;
}
echo "<td style=\"white-space:nowrap;\">".$table_name."</td>\n";
echo "<td style=\"text-align:right;white-space:nowrap;\">".date($table_created)."</td>\n";
echo "<td style=\"text-align:right;white-space:nowrap;\">".date($table_updated)."</td>\n";
echo "<td style=\"text-align:right;white-space:nowrap;\">".number_format($table_rows)."</td>\n";
echo "<td style=\"text-align:right;white-space:nowrap;\">".number_format($table_size)."</td>\n";
echo "<td style=\"text-align:right;white-space:nowrap;\">".showSize($table_size)."</td>\n";
echo "<td style=\"text-align:right;white-space:nowrap;\">".showSize($table_max_size)."</td>\n";
echo "</tr>\n";
}
echo "<tr class=\"primary\">\n";
echo "<td>Total</td>\n";
echo "<td></td>\n";
echo "<td></td>\n";
echo "<td></td>\n";
echo "<td style=\"text-align:right;white-space:nowrap;\">".number_format($db_size)."</td>\n";
echo "<td style=\"text-align:right;white-space:nowrap;\">".showSize($db_size)."</td>\n";
echo "<td></td>\n";
echo "</tr>\n";
echo "</table>\n";
?>
<p class="bodylgbold">Install/Empty/Uninstall</p>
<ul class="bodymd">
<li><a href="main_reference.php?ax=create">Click here</a> to create (install) the database tables.<br /><br /></li>
<li><a href="main_reference.php?ax=empty">Click here</a> to empty the database tables data.<br /><br /></li>
<li><a href="main_reference.php?ax=drop">Click here</a> to drop (uninstall) the database tables.</li>
</ul>
<hr />
<p class="bodylgbold">Terminology, Glossary and Available Reports</p>
<ul class="bodymd">
<li><b>Terminology</b><br /><br />
<ul class="bodymd">
<li><b>Page Views</b> - This is the number of web pages that were actually viewed in a given time frame on your web site.<br /><br /></li>
<li><b>Referrers</b> - "Referrers" are web sites that people were visiting immediately before coming to yours. This often (though not always) indicates that the referring page had some sort of link on it which visitors clicked thru to get to your site. If the referring URL is from a known search engine it will generally also give you and indication of which keywords the visitor searched on, and, if you click back to that referrer you can see where you rank on that search engine for those words.<br /><br /></li>
<li><b>Visitors</b> - The "visitors" statistic represents the number of unique visitors that have visited your site, it is defined by the number of unique IP addresses that have been logged over a given time frame.<br /><br /></li>
<li><b>UserAgent</b> - The "UserAgent" is a stamp left behind by the client application that visited, studying your UserAgent logs can tell you which browser and operating system the visitors were using, if the visitor was a search engine you can tell which ones came to index your site.<br /><br /></li>
<li><b>IP</b> - An "IP Address" is a unique number that is assigned to any computer on a network, including the internet, much like a street address of a house, you can do research on that IP address with links to the tools I have provided to find out where the IP originates from, who owns and much more. Using the IP dB Stats can also calculate the approximate path by which the visitor clicked through your web site.<br /><br /></li>
</ul>
</li>
<li><b>Reports</b><br /><br />
<ul class="bodymd">
<li><b>Page Views</b> - This report is a list of the web pages that were actually viewed on your site.<br /><br /></li>
<li><b>Referrers</b> - This report is a list of web sites that people were visiting immediately before coming to yours.<br /><br /></li>
<li><b>Hourly Visits</b> - This report will break down the number of page views and visits down by hour of the day they arrived. The time is figured by the hour on the server, not the hour on the visitors computer.<br /><br /></li>
<li><b>Bots, Spiders and Crawlers</b> - This report will list all the known web crawlers that have visited your web site. It will hyperlink any available URL in the UserAgent string, any such URL generally leads to information about the crawler. You can use this information to determine if it's a wanted or unwanted crawler and ban accordingly.<br /><br /></li>
<li><b>UserAgent Analysis</b> - This report parses and analyzes the user agents that have visited your web site and determines wherever possible, the browser type and operating system that was being used by the visitor. Some applications allow users to change the UserAgent stamp, and some UserAgents give no such information, so it's not a perfect report, but it's a good overview.<br /><br /></li>
<li><b>IP</b> - The IP report lists all the IP addresses that have visited your web site, click thru the IP address and it will list out approximately how they clicked through your site. There are also links to many tools to get information about each IP address.</li>
</ul>
</li>
</ul>
<hr />
<p class="bodylgbold">Banning</p>
<p class="bodymd">It is possible to ban visitors coming with specific useragents, from specific IP's or from specific referrers.</p>
<ul class="bodymd">
<li>IP's can only be banned by exact matches.<br /><br /></li>
<li>UserAgents can be banned by only partial strings. For example banning "bot" will ban any useragent that has the word "bot" anywhere in the string.<br /><br /></li>
<li>Referrers are banned only by the first part of the string. For example, banning "http://www.google.com" will ban anybody that clicks through any link anywhere on "http://www.google.com" regardless of what the rest of the URL is.</li>
</ul>
<hr />
<p class="bodylgbold">Database Size and Schema</p>
<p class="bodymd">Users might be shocked at the size increase in the database very quickly. Don't be alarmed, the database is set up so each URL, page, date, IP and UserAgent is only stored once, after any specific one is stored once, from then on it's only referenced to by any additional visits. That being said, when dB Stats is first installed it grows quickly because it is finding and storing new data all the time. After a while many of the same pages will be visited, and UserAgents will be used, so the y will only be referecned not stored again. So, after a while the database will stop gorwing so quickly, as it will only be storing small bits of data referencing the existing large data strings (URL's, UserAgents, etc) which are already stored.</p>
<p class="bodymd">Dynamic web sites, such as message forums, can continue to grow the database in size due to the constant introduction of new pages and new URLs. However, each new page will still only be stored once. The impact that dynamic sites have can be minimzed by configuring dB Stats to not log querystrings of pages.</p>
<p class="bodymd">Jeezuz, I hope that made sense...</p>
<hr />
<p class="bodylgbold">dB Stats</p>
<p class="bodymd">dB Stats Version <?php echo $dbstats_version; ?> Copyright &copy; <?php echo date('Y'); ?>, <a href="http://www.dbmasters.net">dB Masters Multimedia</a>. All rights reserved.</p>
<p class="bodymd">dB Stats does not read server logs, it stores it's own proprietary data in a MySQL database for analysis and display.</p>
<p class="bodymd">dB Stats is covered by the <a href="license.txt">Affero General Public License</a>, and is property of <a href="http://www.dbmasters.net">dB Masters Multimedia</a>. Support is not promised in any way with this script, though you can possibly get help at <a href="http://scripts.dbmasters.net">dB Masters scripts web site</a>.</p>
<?php
}
}
else if($_GET["ax"]=="create")
{
$table[0]="CREATE TABLE `logger_agents` (
`agent_id` int(10) NOT NULL auto_increment,
`agent_value` varchar(255) NOT NULL default '',
PRIMARY KEY (`agent_id`),
KEY `agent_value` (`agent_value`)
) TYPE=MyISAM;";

$table[1]="CREATE TABLE `logger_bans` (
`ban_id` int(10) NOT NULL auto_increment,
`ban_count` int(10) NOT NULL default '0',
`ban_value` varchar(255) NOT NULL default '',
PRIMARY KEY (`ban_id`),
KEY `ban_count` (`ban_count`),
KEY `ban_value` (`ban_value`)
) TYPE=MyISAM;";

$table[2]="CREATE TABLE `logger_dates` (
`date_id` int(10) NOT NULL auto_increment,
`date_value` date NOT NULL default '0000-00-00',
PRIMARY KEY (`date_id`),
KEY `date_value` (`date_value`)
) TYPE=MyISAM;";

$table[3]="CREATE TABLE `logger_ips` (
`ip_id` int(10) NOT NULL auto_increment,
`ip_value` int(11) NOT NULL,
PRIMARY KEY (`ip_id`),
KEY `ip_value` (`ip_value`)
) TYPE=MyISAM;";

$table[4]="CREATE TABLE `logger_urls` (
`url_id` int(10) NOT NULL auto_increment,
`url_value` varchar(255) NOT NULL default '',
PRIMARY KEY (`url_id`),
KEY `url_value` (`url_value`)
) TYPE=MyISAM;";

$table[5]="CREATE TABLE `logger_visits` (
`visit_id` int(10) UNSIGNED NOT NULL auto_increment,
`page_id` int(10) NOT NULL default '0',
`ref_id` int(10) NOT NULL default '0',
`agent_id` int(10) NOT NULL default '0',
`ip_id` int(10) NOT NULL default '0',
`date_id` int(10) NOT NULL default '0',
`hour` int(2) NOT NULL default '0',
PRIMARY KEY (`visit_id`),
KEY `v_page_id` (`page_id`),
KEY `v_ref_id` (`ref_id`),
KEY `v_agent_id` (`agent_id`),
KEY `v_ip_id` (`ip_id`),
KEY `v_date_id` (`date_id`),
KEY `v_hour` (`hour`)
) TYPE=MyISAM;";


if($_GET["v"]=="y")
{
foreach($table as $sql_create)
{
$result = mysql_query($sql_create, $mysql_access);
if($result)
echo "<p class=\"bodymd\"><span style=\"font-weight:bold;\">".$sql_create."</span>:<br /><span style=\"font-weight:bold;\">successfully</span> executed.</p>\n";
else
echo "<p class=\"bodymd\"><span style=\"font-weight:bold;\">".$sql_create."</span>:<br /><span style=\"color:#FF0000;font-weight:bold;\">unsuccessfully</span> executed.</p>\n";
}
echo "<p class=\"bodymd\"><a href=\"main_reference.php\">return to reference</a>.</p>\n";
}
else
{
echo "<p class=\"bodymd\"><a href=\"main_reference.php?ax=create&v=y\">click here</a> if you are sure you want to create these tables.</p>\n";
}
}
else if($_GET["ax"]=="drop")
{
$table[0]="DROP TABLE IF EXISTS `logger_agents`;";
$table[1]="DROP TABLE IF EXISTS `logger_bans`;";
$table[2]="DROP TABLE IF EXISTS `logger_dates`;";
$table[3]="DROP TABLE IF EXISTS `logger_ips`;";
$table[4]="DROP TABLE IF EXISTS `logger_urls`;";
$table[5]="DROP TABLE IF EXISTS `logger_visits`;";

if($_GET["v"]=="y")
{
foreach($table as $sql_drop)
{
$result = mysql_query($sql_drop, $mysql_access);
if($result)
echo "<p class=\"bodymd\"><span style=\"font-weight:bold;\">".$sql_drop."</span>:<br /><span style=\"font-weight:bold;\">successfully</span> executed.</p>\n";
else
echo "<p class=\"bodymd\"><span style=\"font-weight:bold;\">".$sql_drop."</span>:<br /><span style=\"color:#FF0000;font-weight:bold;\">unsuccessfully</span> executed.</p>\n";
}
echo "<p class=\"bodymd\"><a href=\"main_reference.php\">return to reference</a>.</p>\n";
}
else
{
echo "<p class=\"bodymd\"><a href=\"main_reference.php?ax=drop&v=y\">click here</a> if you are sure you want to drop these tables.</p>\n";
}
}
else if($_GET["ax"]=="empty")
{
$table[0]="DELETE FROM `logger_agents`;";
$table[1]="DELETE FROM `logger_bans`;";
$table[2]="DELETE FROM `logger_dates`;";
$table[3]="DELETE FROM `logger_ips`;";
$table[4]="DELETE FROM `logger_urls`;";
$table[5]="DELETE FROM `logger_visits`;";

if($_GET["v"]=="y")
{
foreach($table as $sql_drop)
{
$result = mysql_query($sql_drop, $mysql_access);
if($result)
echo "<p class=\"bodymd\"><span style=\"font-weight:bold;\">".$sql_drop."</span>:<br /><span style=\"font-weight:bold;\">successfully</span> executed.</p>\n";
else
echo "<p class=\"bodymd\"><span style=\"font-weight:bold;\">".$sql_drop."</span>:<br /><span style=\"color:#FF0000;font-weight:bold;\">unsuccessfully</span> executed.</p>\n";
}
echo "<p class=\"bodymd\"><a href=\"main_reference.php\">return to reference</a>.</p>\n";
}
else
{
echo "<p class=\"bodymd\"><a href=\"main_reference.php?ax=empty&v=y\">click here</a> if you are sure you want to empty these tables.</p>\n";
}
}
}
?>

</td>
</tr>
</table>
</div>
</body>
</html>
<?php
}
ob_end_flush();
?>

pjk
11-02-2005, 01:03 PM
Thanks much Dan.

dbmasters
11-02-2005, 01:34 PM
And yes, version 3 is an entire new database structure...not sure if there were any changes in 3.5 but I don't believe there were, I think 3.5 was just some huge reporting updates.

I should have made 3.0 version 1 of some other product name, but I'm to lazy.

pjk
11-02-2005, 02:57 PM
I don't think anyone will complain, giving the price you're charging =)

thevillageinn
11-21-2005, 02:07 AM
I just downloaded and attempted an install of the most recent version.

I can't find an .sql file anywhere or any install.php or similar. Am I blind or did they possibly not make it into the package and those who upgraded didn't notice the missing file?

dbmasters
11-21-2005, 08:41 AM
I think the install is in main_maintenece.php or something like that...once you log in, go to mainenece and install from there...and actually, htere may be dsome broken links in there too...I can't remember if I fixed them or not.

chlucy
11-21-2005, 02:00 PM
I (finally) installed and everything seems fine.

Rather than insert the include("path/logger.php"); in each and every page, I stuck it in my header.php file which is included in every page. When I check the stats, I see index.php has 4 hits. No matter how many other pages I view, or how many times I view the homepage, index.php still only has 4 hits. I tried other browsers but that figure doesn't change. The only one that does change is the # of hits for logger.php and that seems to go up by 2 or 3 (or more) for each time I refresh the page.

So, is it not a good idea to put the include() inside a page that's included in the rest of the site? Or am I doing something else wrong?

Oh, btw, when I used: include("dBStats/logger.php"); I got an error about the basedir so I had to change the path to include("http://www.mydomain.com/dBStats/logger.php"); and that seems to be working - would that make a difference?

PS: db, you rock.

dbmasters
11-21-2005, 06:56 PM
relative or absolute, the include path shouldn't make a difference as long as it works.

I never recommend including includes in other includes...

chlucy
11-21-2005, 08:53 PM
Originally posted by dbmasters@Nov 21 2005, 05:56 PM
I never recommend including includes in other includes...


My theory was that (a) it was a time-saver and (b) since it was being included in every file anyway it didn't matter. But in thinking it through, I'm probably better off including it in each and every file. I'm just lazy. Thanks!

chlucy
11-21-2005, 09:11 PM
I just changed it so it's now included in every page. I checked a few pages of the site and then checked the stats (my IP is NOT excluded so my hits should be counted). The logger.php stats went way up and index.php is the only other file listed, still with only 4 hits. Did I configure something wrong?

thevillageinn
11-21-2005, 10:22 PM
yeah...broken links.

the main_maintenence.php (typo included) has a link to logger_install.php which I don't have.

I'll try another download, but it doesn't make sense that I'd be missing a file and everything else with the archive would be fine.

dbmasters
11-21-2005, 10:25 PM
logger_install shouyldn't be there, it should all be in the maintenece file now...the links to _install is wrong...I gotta fix that one of these days...

thevillageinn
11-21-2005, 11:16 PM
ok...but the only two things that can happen in main_maintenence.php is create and drop and neither work.

is this the correct version of the maintenance file?

dbmasters
11-21-2005, 11:36 PM
I just uploaded a new zip file, should be the same database schema...now just follow the "reference" button for all the install crap.

There is no "upgrade" route from older versions, I totally reworked this from pre-3 versions (or somewhere around there)

thevillageinn
11-22-2005, 01:43 AM
wow...I don't know what my problem is. I can't for the life of me get this working.

My main dbstats page looks like this:
http://www.danjcraig.com/screenshots/dbstats.jpg

my "reference" page looks like this:
http://www.danjcraig.com/screenshots/dbstats1.jpg

Where are the mySQL tables created? I tried this in IE and FF - cleared the cache, etc. I'm stumped at this point, and I'm sorry to be such a nag with these problems.

Charles
11-22-2005, 04:51 AM
I also had problems installing it. Of course I had problems before dbMasters "updated" the zip file. I just said the heck installing it as everything was not there. I will download the updated version and try to install it again when I get time.

Originally posted by thevillageinn@Nov 21 2005, 11:43 PM
wow...I don't know what my problem is. I can't for the life of me get this working.

My main dbstats page looks like this:
http://www.danjcraig.com/screenshots/dbstats.jpg

my "reference" page looks like this:
http://www.danjcraig.com/screenshots/dbstats1.jpg

Where are the mySQL tables created? I tried this in IE and FF - cleared the cache, etc. I'm stumped at this point, and I'm sorry to be such a nag with these problems.
Quoted post

dbmasters
11-22-2005, 08:38 AM
oh son of a...

dbmasters
11-22-2005, 08:44 AM
OK, try it now, it'll probably screw up again, but whatever...

chlucy
11-22-2005, 10:24 AM
I downloaded the new files (I think they're the updated ones but the readme file still says version 2.0 - is there a new link other than the one in the very first post in this thread?) and uploaded them, overwriting the old files. I ran the uninstall and reinstall for the tables. Now when I view the site and then go back to the stats, I see only the dbStats/logger.php file and no other pages listed.

thevillageinn
11-22-2005, 10:45 AM
d/l 'd and uploaded the new archive. main_reference.php and piechart.php were different from last night's archive.

also my readme.txt says v 3.5

also this time the "reference" page actually has links to create and drop the tables. Once the creation was complete the reference page has a lot more information now.

This is much more promising.

Thanks for the updated archive and patience.

chlucy
11-22-2005, 10:53 AM
How do I download the new archive? I've been using this link: http://www.dbmasters.net/elements/dBStats.zip since that's the one in the first post (I didn't read through every post in this thread - is there another link?)

pjk
11-22-2005, 12:23 PM
I ran through all this on page six. there's a new file

dbmasters
11-22-2005, 07:21 PM
my bad, new link: http://scripts.dbmasters.net/files/dBStats.zip

pieChart and a couple other files are part of some new stuff I am working on that got commented out of this package cuz they are not done/working yet.

chlucy
11-22-2005, 10:46 PM
Okay. Installed v3.5. Uninstalled the tables and reinstalled. No errors or problems but it's still only counting hits to logger.php.

I'm assuming I configured something wrong but the only place I need to enter or change data is in the logger_config.php file, right?

Oh, and db if you're still looking for a QA person, I'll volunteer to do spell-checking and whatnot. main_maintenence.php should technically be main_maintenance.php and there are a few minor typos in some other files. No biggie.

Charles
11-23-2005, 05:59 AM
Works Great!!
ty dBMasters

dbmasters
11-23-2005, 07:10 AM
I'll volunteer to do spell-checking and whatnot. main_maintenence.php should technically be main_maintenance.php and there are a few minor typos in some other files.
Honestly, I couldn't give a crap.

I am really this close [puts finger and thumb close together] to pulling every damn free script I have off the internet. :angry:

Okay. Installed v3.5. Uninstalled the tables and reinstalled. No errors or problems but it's still only counting hits to logger.php.

I'm assuming I configured something wrong but the only place I need to enter or change data is in the logger_config.php file, right?

Yes, that is the only place to change...if you are including the file in includes, well, that might happen, that isn't the instructions.

Works Great!!
ty dBMasters
Thanks. Glad it works for you.

This will be the last public release of dB Stats.

chlucy
11-23-2005, 10:25 AM
Originally posted by dbmasters@Nov 1 2005, 08:58 AM
I really need some quality control person to watch me do that.
Quoted post


Sorry db, I wasn't being critical, just responding to your comment from a few weeks ago. I do appreciate the work you've done and was just trying to figure out where I made the mistake. Won't ask anymore questions since I've apparently offended you.

dbmasters
11-23-2005, 04:53 PM
No, you haven't offended me, I'm just very tired of giving everything I do away only to be...oh, never mind...not offended, just very tired. I know you weren't being critical...but trust me, many people are...and it's funny, the most critical ones are the same ones that never donate to the cause, just expect everything to be picture perfect for them for free.

That not withstanding, this is the last public release of dB Stats...

thevillageinn
11-23-2005, 08:44 PM
It disappoints me that people are so particularly selfish when it comes to getting things for free / next to nothing.

I know that dbMasters' scripts have helped me a lot over the last few years, and I try to contribute to the effort, not only by being as helpful and respectful as I can but with monetary donations as well. The fact that others just demand and take is pathetic and mean, and not at all in the spirit of cooperation and sharing.

Sad in how many cases the actions of a few dictate what the majority gets or doesn't get (as the case may be).

dbmasters
11-23-2005, 09:12 PM
Thanks thevillageinn, and everybody else that helps and contributes...not only in money, but time testing, bug reporting, helping test and retest reported bugs and such other things...one of these days I am going to install BugZilla or something like that...eh, maybe a new CM module ticket tracker thingy...

dbmasters
11-24-2005, 01:03 PM
Just an FYI, this isn't the last version just cuz some people pissed me off or anything...it is more because there really isn't more I see coming from my direction on the script, plus, with the release of Google Analytics as a free option, well, it seems that my script had it's place, but it seems like may not be necessary any more. Origianlly i just built it for HostPC as an alternative for the loss of AWStats.

That said, I have been talking to a couple other sys admins and perl programmers I work with and they say that the vulnerabilities in AWStats have been fixed as long as the update from browser option isn't enabled...so perhaps a global install could be possible if there is a way to disable user installs...I dunno, food for thought.

psiu
11-25-2005, 09:54 PM
On a good note, I just installed and it appears to be working great, took a little bit of experimenting to get it to work with my cms (phpwebsite) but it's tracking everything.

Actually, I only had to put the include in the main index file, as everything else feeds off of that, it does break the pages down correctly. I was busy hunting for some of my pages before seeing what would happen with just the index include.

You should be getting a donation in a few days when my paycheck goes in :D

ljmyers
11-26-2005, 08:25 AM
with the release of Google Analytics as a free option, well, it seems that my script had it's place, but it seems like may not be necessary any more. Origianlly i just built it for HostPC as an alternative for the loss of AWStats.

1. I know I've added GA but I for one have become accustomed to dBStats and primarily use it Dan.

2. I know things can get a bit overwhelming at times but keep something in mind, you do alot of good with your scripts and I have learned first hand in the last week just how important they are and how much it helps Joe out in certain ways as well as the rest of us.

3. I don't have the knowledge to help out with testing or bug stuff or you know I would gladly help you out. I did pass on a small donation a little while back but I will send another shortly because I know this stuff can be time consuming and very flustering at times.

So perk up DUDE!!! It's a loooooooong holiday weekend!!! :D

dbmasters
11-26-2005, 10:16 AM
Originally posted by ljmyers@Nov 26 2005, 12:25 PM
So perk up DUDE!!! It's a loooooooong holiday weekend!!! :D
Quoted post

Oh, so that's your way to help cheer me up, by reminding me it's not only an inlaw weekend, but a long one too...jeezuz. ;)

I am glad you like the script, I actually like it a lot myself, and haven't personally found all the info in GA that I like to have...it may be there, but I haven't found it yet...

I did just realize things are spaced kinda funny in my script on IE...damnit...why to people use that P.O.S. browser anyway?

Charles
11-26-2005, 11:34 AM
Originally posted by dbmasters@Nov 26 2005, 08:16 AM

I did just realize things are spaced kinda funny in my script on IE...damnit...why to people use that P.O.S. browser anyway?
Quoted post


Good Question!!
I use either Safari or FF.

ljmyers
11-26-2005, 08:39 PM
ok Dan, don't even tell me you have to spend the WHOLE weekend with the inlaws, unlless they are in from out of town. haha

I haven't really taken the time to go through the GA either. Not really wel anyway and I hadn't even checked out dBStats in IE. I usually always use my mozilla.

Nick
11-27-2005, 09:20 PM
Dan or anybody else,

The logger_install file is not in the latest download
I didn't realize that till it was broke .. the file would be appreciated
Sorry to hear about the stats .. i love it .. its the only thing i use to keep up with who/what/where is viewing my sites

Thanks,
Nick

dbmasters
11-28-2005, 06:55 AM
Have you surfed around the new install? Installation moved, read back a few posts and it's discussed.

Nick
11-28-2005, 10:23 AM
http://scripts.dbmasters.net/files/dBStats.zip

I downloaded the new file ... but there is install file
went to maintenance file and it is looking for logger_install
I have errors everywhere .. I'm assuming it is b/c the script is looking for tables that don't exist in the DB

Thanks,
Nick

dbmasters
11-28-2005, 05:38 PM
then you redownloaded a cached file or something cuz I checked it today and it's fine.

psiu
11-28-2005, 10:11 PM
Originally posted by dbmasters@Nov 28 2005, 05:38 PM
then you redownloaded a cached file or something cuz I checked it today and it's fine.
Quoted post


He must have, I downloaded it...Sunday (?) night and installed, it went fine.

dbmasters
11-30-2005, 07:39 AM
Originally posted by chlucy@Nov 21 2005, 06:00 PM
I (finally) installed and everything seems fine.

Rather than insert the include("path/logger.php"); in each and every page, I stuck it in my header.php file which is included in every page. When I check the stats, I see index.php has 4 hits. No matter how many other pages I view, or how many times I view the homepage, index.php still only has 4 hits. I tried other browsers but that figure doesn't change. The only one that does change is the # of hits for logger.php and that seems to go up by 2 or 3 (or more) for each time I refresh the page.

So, is it not a good idea to put the include() inside a page that's included in the rest of the site? Or am I doing something else wrong?

Oh, btw, when I used: include("dBStats/logger.php"); I got an error about the basedir so I had to change the path to include("http://www.mydomain.com/dBStats/logger.php"); and that seems to be working - would that make a difference?

PS: db, you rock.
Quoted post


Ya know, I just realized, that is exactly how I use it, including it in the include, something I don't normally do, but that is what I am doing and it works fine.

Nick
11-30-2005, 07:20 PM
Dan,

Not sure what I was doing wrong

I was trying to go from an older version of stats

I just ended up dropping all the old tables and manually creating the tables

This is great .. thanks for sharing

Thanks,
Nick

dbmasters
12-01-2005, 12:55 AM
Glad everybody (or most people) like it :)

dbmasters
12-18-2005, 08:07 PM
Ihave around 700,000 page views logged in the current version and it's slowing down quite a bit. But, that 700,000 logged views is still a bit under 30MB, which still makes it WAY less space-heavy than the ones I was trying to improve on.

Anyone else have any stats they care to share? I suspect less dynamic site have much lower space usage, my site is dynamic, so lots of URL's being stored...

I'd be curious to know how it's working for people.

Nick
12-18-2005, 09:52 PM
Dan,

Love it .. does exactly what I want it too ..
I can't brag .. I'm only pushing 4000 page views in the past 2 months

Is it possible to track subdomains on the same database ??
of course the subs are /public_html/SUB but viewed SUB.maindomain.com

Have them logging .. but they show up on the index.php hits .. I can some what tell the number of hits b/c it also logs logger.php ..

just wondering if there is an easier way that I haven't seen

dbmasters
12-18-2005, 10:56 PM
hmmmm, hadn't thought about handling subdomains...I don't think that'd work as it is now...

pjk
12-21-2005, 03:14 PM
Started on November 2, through just now. the other dates for DBs were created with ver 2 (or 2.5, can't remember). Still under 1 meg.

Table Name Created Rows
logger_agents 2005-11-02 378
logger_bans 2005-11-02 0
logger_country 2005-07-21 7
logger_dates 2005-11-02 51
logger_ips 2005-11-02 1,612
logger_pages 2005-07-21 5,294
logger_time 2005-07-21 165
logger_urls 2005-11-02 1,080
logger_visits 2005-11-02 8,254
logger_week 2005-07-21 7
Total 993,301 970.02 KB

Month / Year Page Views Visitors
November 2005 4,844 1,011
December 2005 3,410 730

Nick
12-30-2005, 06:33 PM
MSN bot is wearing my web site out compared to other bots .. is this normal??

1,830 - msnbot/1.0 (+http://search.msn.com/msnbot.htm)

When you ban the IP via the stats script .. does that ban the IP from viewing the site or just from being logged?

Nick

dbmasters
12-30-2005, 08:02 PM
banning bans from the site.

ANd yeah, it's normal, MSNBot likes to suck up bandwidth, when it's in a "gathering" kinda mood, it's get aggressive.

dbmasters
03-19-2006, 11:37 AM
http://www.dbmasters.net/index.php?id=20

I released a small update, no db changes or anything, but adds flash-driven bar charts that are super cool and provides a quick dashboard view for the months stats...

psiu
03-21-2006, 09:40 PM
Originally posted by dbmasters@Mar 19 2006, 11:37 AM
http://www.dbmasters.net/index.php?id=20

I released a small update, no db changes or anything, but adds flash-driven bar charts that are super cool and provides a quick dashboard view for the months stats...
Quoted post


Okay, what's the best way to do an update, I'm running the previous version... I see there have been some new files added, and some removed/replaced.

new:

Charts directory
5 files of xml_*.php format
main_dashboard.php
main_delete.php

missing:

main_countries.php
pieChart.php
pop_dashboard.php

So just upload all files except for logger_config.php? And delete the 3 defunct ones? Or just upload the new ones and remove the 3 missing ones?

thanks :)

edit: best way to do update without losing data, of course ;)
and also, assuming wouldn't need to run maintenance afterwards as this would just use existing tables?

dbmasters
03-21-2006, 10:32 PM
there is no database changes from the last version, just upload all the new files, delete the old ones if you want to...doesn't matter.

Be aware I have my own forums for support, and don't look here that often for support issues of my scripts, so you are best off asking at mine.

psiu
03-22-2006, 06:56 PM
successful, and looks good too :D