SourceFiles.org - Use the Source, Luke
Home | Register | News | Forums | Guide | MyLinks | Bookmark

Related Sites

Latest News
  General News
  Reviews
  Press Releases
  Software
  Hardware
  Security
  Tutorials
  Off Topic


Back to files

################################################################################

##                    OpenWebStats Version 1.0                                ##
##                                                                            ##
##        (c)2005 mathews_dm - <Davidmathews@open-creations.com>              ##
##                                                                            ##

################################################################################ ## Special Thanks to the following 2 programs who gave me pieces and parts ## ## That way I did not have to recreate things such as the .inc files, images ##

## and other odds and ends.                                                   ##
##                                                                            ##
## Pascal Toussaint <pascal@pascalz.com> - Apache Logs Reader                 ##

## I used Pascal's apache reader and modified the heck out of it to make it ## ## use a db and make it run as a standalone file as well as a plugin to my ##

## OpenWebStats.  Thanks for helping me get the reader going.                 ##
##                                                                            ##
## Scoutt  <webmaster@snippetlibrary.com> - serverStats.php                   ## 
## Torrent <torrent@ski-info-online.com>  - serverStats.php                   ##

## Gave me the ideas and a basic framwork for the awstats like displaying of ## ## my db data. Also was the place I got the premade .inc files for domains, ##

## robots, and search engines.                                                ##
##                                                                            ##
## This program is free software; you can redistribute it and/or modify       ##
## it under the terms of the GNU General Public License as published by       ##
## the Free Software Foundation; either version 2 of the License, or          ##
## (at your option) any later version.                                        ##
##                                                                            ##
## This program is distributed in the hope that it will be useful,            ##
## but WITHOUT ANY WARRANTY; without even the implied warranty of             ##
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the              ##
## GNU General Public License for more details.                               ##
##                                                                            ##
## You should have received a copy of the GNU General Public License          ##
## along with this program; if not, write to the Free Software                ##

## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ## ################################################################################

Requirements
Server Tested on Apache/1.3.12 (Unix) PHP >= 4.1.2 (will not work on anything below 4.1) MySQL (tested with 3.23.23 and above) Must have the FILE privilege on the server host in order to use this script A web-browser

Configure:

  1. Edit the config.php file giving your db info and log file locations Note: Make sure you can read the logfiles and have created a db for the database
  2. Import the db table sturcture via openwebstats.sql Example: mysqlimport -h yourhost -u youruser -pyour_pass databasename openwebstats.sql Example2: mysql -h yourhost -u youruser -pyour_pass databasename < openwebstats.sql
  3. Test the setup: shell:> php class_apache_logs_import.php If all goes as planned and no errors you can move on otherwise check the errors and try to fix them. Only error is probably not finding or permissions on the log files.
  4. Set your crontab to allow the updating of the db Example: 59 * * * * /usr/bin/php /$yourpath/openwebstats/class_apache_logs_import.php >/$yourpath/openwebstats/apache_log_import.log 2>&1
  5. Set your browser to the location of the stats dir there you go. You can also test that the web update works by clicking the "Stats Update Now" link.
    Summary
    OpenWebStats was created out of a need for my personal website. I was in need of an awstats type program that I could use on my site, that would be php based. After having issues with awstats in the past due to code injection I was wanting to find a nice php version. My only requirement was that the program read in the apache logs and use a mysql db for the backend. To my amazement, I could not find one that did that already Then while searching I found (Apache Logs Reader) that would read the logs and give stats from them but did not store them in a db. As I searched more I found (serverStats.php) that read from a db but only displayed one month worth of apache logs. After a few days of seeing that I could not find what I needed I decided to combine the two apps and morph it into my own php stats program. Now I believe I have achieved what it is that I set out for.

OpenWebStats has the following features:

  • Apache Log file reader
  • Mysql DB Support
  • PHP web-based monitoring
  • Awstats*ish reports
  • Live Updating via cron
  • On demand updates via the web
  • Free of Cost

Thanks for using this software and if you have any issues while using it you may email me for limited support. If I have time I will help you in any way I can.

Thanks Again,

David Mathews
Site: Open-Creations.com
Email: davidmathews@open-creations.com


Other Sites

Discussion Groups
  Beginners
  Distributions
  Networking / Security
  Software
  PDAs

About | FAQ | Privacy | Awards | Contact
Comments to the webmaster are welcome.
Copyright 2006 Sourcefiles.org All rights reserved.