How do I setup php-stats?

Requested and Answered by Carnuke on 2005/11/10 19:51:18

How do I setup php-stats?

Php-stats is an excellent free third party site monitoring sript. It is released under the GPL/GNU liscence. I have used it happily for three years and can highly recommend it.

php-stats is written by an Italian prgrammer, so it is a little difficult for non Italian speakers to setup. If yu want to see a demo of the stats program you can see it working on http://houseofstrauss.co.uk Here you will find the VIEW SITE STATISTICS in the left panel about half way down. Clicking VIEW FULL STATISTICS will open the full application (ecept admin of course)

Download php stats from http://www.php-stats.com/

php stats does have an english FORUM
if you need further help, although this guide should suffice.

If you want a quick and dirty setup guide here it is. Ive done this several times and its very easy
----------------------------------------
In stats/config.php. Set these parameters

$option['host']='localhost'; // Host
$option['database']='PhpStats019'; // Database name
$option['user_db']='user'; // User
$option['pass_db']='pwsd'; // Password
$option['script_url']='http://www.tuosito.it/stat'; // URL of stats script
$option['exc_pass']='pass'; // Password utilizzata da php-stats per abilitare l'esclusione degli ip dinamici.


=======================

For a first time installation:
1) Edit the config.php as above whith sqlhost, username, password stats' url etc....
2) Upload the whole folder to your webspace
3) CHMOD 666 or may be 777 the options folder, the php-stats.log and the config.php
4) Open your browser and go to the url http://www.mysite.com/stats/setup.php
5) choose your language and follow the istructions.
6) after you have set up the stats scripts you need to go to /stats/admin.php?action=preferenze and make any changes there
7) Also copy the Javascript code shown here;
"Javascript to put in your pages in order to activate stats monitoring
"
and place it just above the closing html tag in theme.html of your site. This makes the stats call to the script for every page served.

8) to get the counter on your pages, you need to generate code from the section;
"Javascript to put in your pages in order to view desired stats"
and put this in a custom block. save it as html. Several options can be created in this section and also different types of fonts etc.

This Q&A was found on XOOPS Web Application System : https://xoops.org/modules/smartfaq/faq.php?faqid=529