snippet library logo
in category
PHP / Statistics / ServerStats 2.1.7
Snippet details
ID: 491
Viewed: 17308
Added: 2007-01-15
Version:
View Sample Page

User Rated at: 4 Stars
Rate This:
Snippets in this catagory         
Ever wanted to see who enters your site and how? With this program you can do just that. ServerStats is a RealTime PHP (Apache) Log Analyzer that parses your servers log file to list variable components. It lists IPs, Domains, Referrer's, OSs, Browsers, Pages visited, HTTP Errors, and Unique and Total hits in a nice easy to view page. Now with admin login!

Install script included for easy install.

Read the Readme.txt to find out more.

php 4.1+
mysql 3.23.53+

// fixes
few bug fixes, new robot additions

// existing users prior to 2.0
can update easily now with update script.

found a bug or have something you wanted added to the stats, report it here http://www.snippetlibrary.com/contact.php

Please do not link from the download.php file. If you must link from this site, do it from this page ONLY. If not, you WILL get a 403 error (access denied). Also, if you have Privacy Control Software installed, you will need to let my site see your reference pages.

General Details
Snippet uploaded by:
Email : webmaster@snippetlibrary.com
Snippet By: Snippet / Torrent

serverStats2.1.7.zip
Zip file


Subject: ...
Comment By: andy on Tue 05th 2004f October 2004 02:51:37 PM
    it works, but does so terribly slow :(
Subject: slowness
Comment By: snippet on Tue 05th 2004f October 2004 03:26:51 PM
    it all depends on your server setup. I did a 5mb file is 15 seconds. but that same file on a 350Mhz server took 102 seconds. if you have issues please contact me and we will try to clear it up :)

thanks
Subject: The script bails on lines from virus attacks.
Comment By: on Tue 07th 2004f December 2004 04:36:16 AM
    When the script finds a line that does not match the proper form it bails. So on the many virus attempts on my main logs this script fils.
Subject: not a natural log file?
Comment By: snippet on Tue 07th 2004f December 2004 04:59:26 AM
    what did you expect? the virus attempts is not part of a default system log. send the line(s) to me if you could and I will see what I can do to check for it. I can't fix it if I don't know about it :)
Subject: database
Comment By: on Thu 06th 2005f January 2005 11:18:32 PM
    It's useless, it doesn't support MySQL >4
Subject: mysql support
Comment By: snippet on Fri 07th 2005f January 2005 02:52:53 AM
    read again, serverStats supports from mysql 3.23.23 to mysql 4.0+. I have it running on mysql 4.x right now on this server, no problems. let me know what problems you have and maybe we can determine what the issues is. don't automatically say it doesn't support something without reading or asking.
Subject: Problem with MySQL
Comment By: Sander on Tue 01st 2005f February 2005 09:28:26 PM
    I have the nem XAMMP (A complete server package with MySQL 4.1.x) and i says that I don't have the proper MySQL version. Gues it's a version problem then huh...
Subject: sql problems
Comment By: basti on Sat 05th 2005f February 2005 07:39:16 AM
    got the same problems...

VERSION ERROR:
Problem:
ServerStats requires Mysql version 3.23.23 or above.
Remedy:
Upgrade to a more recent version of Mysql

i use suse 9.2 with mysql 4.0.21
Subject: Mysql Versions
Comment By: Snippet on Sat 05th 2005f February 2005 08:34:42 AM
    well, I have issues with 4.0+ since it came out. I guess I wil have to take the check out as it is unpredictable as to what version it comes back with.

sorry for the confusion. new version uploaded.
Subject: invalid default value for 'id'
Comment By: Wohtohai on Sun 24th 2005f April 2005 06:09:08 PM
     I am getting this error
DB TABLE ERROR:
Problem:
Invalid default value for 'id'
Remedy:
Check that tables stats_login does not exist from a previous installation
Environment: Win 2k Server, Apache 2, php 4.1, mysql 4.1.8
Username, password, and db name in mysql has been checked and rechecked. Any help is appreciated. Thanks.
Subject: mysql error
Comment By: snippet on Sun 24th 2005f April 2005 07:01:28 PM
    what did you change? are you install it over an existing installatiion? if not try deleting the tables and try again.
Subject: invalid default value for 'id'
Comment By: Wohtohai on Mon 25th 2005f April 2005 02:50:29 AM
    No changes made to your script, fresh install gives that error. MySQL gives error on "id smallint(6) DEFAULT '0' NOT NULL auto_increment". Recreated this error using phpMyAdmin and I got this result "#1067 - Invalid default value for 'id' ". If I remove DEFAULT '0' it creates the table. stats_login. Also I got error in $stTblA on " FULLTEXT KEY stats_referrer (stats_referrer)". SQL from phpMyAdmin is "MySQL said: #1214 - The used table type doesn't support FULLTEXT indexes". Thanks.
Subject: Re: invalid default value for 'id'
Comment By: snippet on Mon 25th 2005f April 2005 05:41:40 AM
    thank you for the update. I have made some changes and a new version is out. the main problem is your table setup is not MyISAM by default. fulltext will only work in MyISAM table types. I have made it so this is installed with it. please let me know if you have any problems with the new version.
Subject: Im not able to download it
Comment By: Vips on Wed 27th 2005f April 2005 08:46:44 PM
    can some one help me to download it
Subject: unable to install
Comment By: on Fri 29th 2005f April 2005 06:34:16 PM
    It is recommended that you turn register globals to Off. You have them ON and this script and the serverStats script might not work properly. FILE ACCESS ERROR:
Problem:
Unable to create config_inc.php file for writing
Remedy:
Ensure ServerStats has write access to the installation folder.
Subject: Re: unable to install
Comment By: snippet on Sat 30th 2005f April 2005 04:49:03 PM
    you have to chmod the folders so serverStats has permissions to write to it. read the readme.txt file.
Subject: redirect loop
Comment By: on Tue 10th 2005f May 2005 07:31:03 PM
    I'm having trouble with a redirect loop. I think it's caused by a bad check against the cookies, because after bypassing the login all went well. I've commented out the following

if (!$_COOKIE["STATS_AUTH_USER"]) {
header("location: index.php");
}

Also the countries don't work for me. Ideeas?
Subject: Re: redirect loop
Comment By: snippet on Wed 11th 2005f May 2005 01:45:15 AM
    how can that be bad? it is a default cookie by the server. what error ar eyou getting? maybe you don't accept cookies in your browser.

if countries don't work than I suspect that means your log format is not of the correct configuration. I have never heard of countries not working. what exactly is not working on the countries?

please email me.
Subject: Redirect loop
Comment By: Andrei Neagoe on Wed 11th 2005f May 2005 03:01:41 PM
    Ok... I've found your problem. You set the cookie with the following lines in admin_login.php:

setcookie("AUTH_USER", $useradmin, time()+3600 ,"/");
setcookie("AUTH_PASS", $pass, time()+3600 ,"/");

but you check for it in stats.php with:

if (!$_COOKIE["STATS_AUTH_USER"]) {
header("location: index.php");
}

when you should actually check for AUTH_USER and not for STATS_AUTH_USER.
Subject: Re: Redirect loop
Comment By: snippet on Wed 11th 2005f May 2005 03:11:15 PM
    yes, you are correct. I missed that setting. I have made the changes and they reflect in the next version. my aplogies.
Subject: great script
Comment By: seocunsultant on Mon 16th 2005f May 2005 12:18:41 AM
    Great script even I haven't test it yet.
Subject: cool
Comment By: Budi on Wed 22nd 2005f June 2005 02:29:17 PM
    cool script
Subject: Problem
Comment By: Tariq on Thu 04th 2005f August 2005 08:09:21 AM
    It says:

Warning :
You don't have any data to process. Please click on "Update Now" link to make the data.

So I click "Update Now", then it says:

This script can't find the log file to process. Make sure you gave the correct
path or you put the log file in the same directory as this script.
Please fix the path or put the file in this directory and then push Refresh in your browser.

Which log file do I need to replace? Or where do i change the path?

Thanks.
Subject: Re: Problem
Comment By: snippet on Thu 04th 2005f August 2005 02:34:41 PM
    the log file is your access.log file. you set this in the config file. did you run the install? you shoudl have seen this.
Subject: help downloading
Comment By: chad on Sat 20th 2005f August 2005 10:40:53 PM
    I cannot download this ...403 error
http://www.snippetlibrary.com/download.php?siteid=491
Subject: Re: help downloading
Comment By: snippet on Sat 20th 2005f August 2005 10:57:58 PM
    you have to click on the zip file above. you cannot go any other way.
Subject: Problem with install.php
Comment By: Daniel on Thu 25th 2005f August 2005 04:00:49 PM
    Hello.

When I submit install.php I am redirected to /cgi-bin/php4-fcgi-starter

Im running PHP with fastcgi in a jailed System. Other applications do work, no problems so far. What could be the problem?

Regards,
Daniel
Subject: Re: Problem with install.php
Comment By: snippet on Fri 26th 2005f August 2005 01:46:21 AM
    That is a good one. I do not go by any directory listing except load the stat file. if you have rediect problems than it would be the server not the script. although you are the first to use it with fastcgi I do not have a answer for you at this time.

what part of the install do you have problems on? does it go all the way? does the database tables get written? feel free to email me on the contact page if you wish to discuss it further.
Subject: jsp script for the same
Comment By: rohit on Tue 27th 2005f September 2005 12:17:49 PM
    Hi,
Please provide this particular script in jsp mail me at: rohit.kapoor@sca-tech.com
Subject: Re: jsp script for the same
Comment By: snippet on Tue 27th 2005f September 2005 02:54:56 PM
    for one can jsp connect to mysql? if so I do not know jsp. you write one and give it to me and I will give you full credit and dispaly it here.
Subject: No config file
Comment By: annelions on Thu 06th 2005f October 2005 06:47:47 PM
    I downloaded this and tried to install it, but there is no config_inc.php file as stated on line 29 of index.php:
require_once("config_inc.php");
Subject: Re: No Config file
Comment By: snippet on Fri 07th 2005f October 2005 03:11:53 AM
    yes you are very correct. that is why you have to run the install.php and it will create it.
Subject: MySQL_probs again
Comment By: Michele on Thu 10th 2005f November 2005 11:05:53 AM
    snippet wrote:
> serverStats supports from mysql 3.23.23 to mysql 4.0+.

Installation went fine, MySQL-Tables have been created, but when I run "Update now" I get

>Database error:
>Invalid SQL: LOAD DATA LOCAL INFILE '200511.txt' INTO TABLE stats
>FIELDS TERMINATED BY ',' LINES TERMINATED BY ' %% '
>mysql error: The used command is not allowed with this MySQL
>version

PHP Version 4.3.3, MySQL 4.0.15-Max on SuSE Linux 9

What the hell have I done wrong :( ;)

Michele
Subject: MySQL_probs again
Comment By: snippet on Fri 11th 2005f November 2005 02:52:45 AM
    Please read the readme file that came with the script. just because you have mysql 4.0.15 doesn't mean the client is the same version. if it is then you don't have permission to run it or mysql has not been compiled to use that command.

FRom Mysql:

In MySQL 3.23.49 and MySQL 4.0.2 LOCAL will only work if you have not started mysqld with --local-infile=0 or if you have not enabled your client to support LOCAL. See section
Subject: Great for one site, what about multiple URL's?
Comment By: RecentCoin on Thu 14th 2006f September 2006 07:59:44 PM
    I'd like to say that this works amazing well for one site, I manage several and I'd like to be able to do a couple of things.

1) automate (via cron) the adding of the logs to the database. This will mean adding a variable that lets me specific the log file path, as well as handling some wild card/multiple file names so that I don't miss anything due to log rotation
Subject: Thank you
Comment By: snippet on Fri 15th 2006f September 2006 02:20:03 AM
    Hi,

It is impossible to have the script do more than one domain at a time. The script is only programmed to read one access.log file per domain. Not saying you can't upload others to the stats directory and update the database with that. But programming it to do more than one is impossible as I can't read file paths to other servers. Unless maybe they are on the same server.

i will look into the cron job, i like that idea as well.
Subject: Can't read log file
Comment By: paipals on Wed 22nd 2006f November 2006 12:14:06 PM
    I configured location correctly and even tried copying access.log into directory where script is located but still same "This script can't find the log file to process. ....".
During install I noticed message "You are working with MySql 5.0.24a-standard-log, make sure it is greater than 3.23.23 or serverStats will not work."
Does this mean it can't read log of 5+?
Subject: Re: Can't read log file
Comment By: snippet on Wed 22nd 2006f November 2006 03:19:13 PM
    It has nothing to do with mysql, the access.log file has to be in the same folder as the script for it to work. Make sure you only put the log file name in the config file then it should work. again you are not parsing a mysql log but a Apache log. big difference.
Subject: Nice tool
Comment By: john a t benden d o t co d o t uk on Sat 10th 2007f February 2007 10:36:42 AM
    Good tool, however get upset with large log file volumes (like everything else I guess). It might be worth having summary tables that are updated in the update.php stage, keeps the stress off the mysql server !


Please completely fill out the form below if you want to review this snippet. All reviews are subject to validation.


Subject:

Reviewed By:

Write a review:



Terms of Conditions
Powered By
Avian Hosting
© 2005 snippetlibrary.com All Rights Reserved.