Customisation
> I would like to use my own logo in the W3Perl homepage, how do I proceed ?
This image is located within the $logo variable in your configuration
file, the default file is /resources/logo.png, you'll need to put your image with this name in /resources/.
With the latest package, you can specify a file located in a your web tree or in a different server.
> I don't have any graphs in the HTML pages. What's wrong ?
Something is missing....make sure you have Fly somewhere in your system. Check also the path for
Fly in your configuration file.
> I would like W3Perl to output reports in my own language
Everything is located in the /resources/lang/ directory. Copy the uk.pl to
another file to replace the second part of each line with your own words.
When everything have been done, contact me to include your work in the
next release.
> I would like to use a background image
In the administration interface, you can choose to use a background image file. There are
three ways to fill the field :
- Use an URL like http://www.foo.com/background.gif
- Use an absolute link to your website like /background.gif
- Put your background file in the W3Perl resources directory (default is paper_background.gif)
But best is to change the w3perl.css stylesheet.
Installation
> Can I use W3Perl with my virtual server ?
Of course you can. You just need one separate configuration file for
each of your server. W3Perl will load your configuration file and save data for
each server according to your configuration choices. W3Perl need to be
installed only once.
> Should I install all the package in my cgi-bin ?
No, only part of the package need to be located in your cgi
directory. HTML documentation files and graphics files ressources need
to be located in a web directory. Note that W3Perl can be installed
on a host without cgi, it just means web administration are not available.
> I would like to install W3Perl on my provider. What do I need ?
You'll need to use the 'provider' installation. First ask your
provider if you have a cgi-bin directory (are you allowed to launch
scripts ?), where are located the logfiles (access to data), where is Perl (is
Perl installed ?) and your server path (where your server have been installed).
If you can't run W3Perl on your provider host, you can still install
W3Perl locally, download your logfiles from your provider and process
locally the files.
> Your configuration file seems to be too complex for a beginner like me.
Use the administration interface. If you find something unclear, ask me and
I'll add more help. You should have a Web server running in order to
run the admin interface scripts (located in a cgi directory).
> Could you install the package for me ?
I'm sorry but I can't do that due to the lack of spare time. If you
have any trouble, feel free to contact me, I will help you as much as
I can.
> Can I install W3Perl on a standalone PC without any server running ?
- Windows
First, you'll need to download the w3perl.exe binary
for Windows.. Forget about the administration interface which is build around cgi (and which need a server to run).
You'll have to build your configuration file manually. Use
config/config-win.pl as a template. See /docs/uk/config_manual.html
for help.
You can also use the online tool to build your configuration file but your file will be available to all as a
template.
Run cron-w3perl.pl -c config-win.pl with the '-a' flag to init or the '-e' flag to update.
- Unix
Uncompress and untar the package where you want. Edit the install.pl
script to modify the $pathw3perl path (forget other path) and run it.
Second, edit one of the configuration file provided inside the config directory and modify it
with your own paths. Or you use the online tool to build your configuration file.
Then run cron-w3perl.pl -c <config_file>.
Use the '-a' to init and '-e' to update.
(if you use Reverse DNS, your computer should be connected to Internet to
make request to a DNS server)
> When using the RPM package, I have the following server error : "Forbidden - You don't have permission to access /cgi-bin/w3perl/confstat.pl on this server". What's wrong ?
It means you can't use cgi on your server. In order to be able to use them, edit your httpd.conf and add these two
lines 'Order allow,deny' followed by 'allow from all' in the <Directory /var/www/cgi-bin> directive.
> Why can't I use the latest Fly 2.0.0 ?
The latest Fly is based on the latest gd1.8 which don't have anymore support for GIF output. Fly 1.6.5 is the
latest package which support GIF output. Some linux distribution provide a patched Fly 2.0 with gif support.
Logfile
> I've changed my webserver logformat from CLF to ECLF
Good idea ;) You'll need to modify your configuration file. Just specify ECLF instead of
CLF !
> I was using ECLF format but now I'm using Squid which can only output CLF logfiles.
Squid store referer and agent logfile in separate files. So you'll need to modify your
configuration file in order to give W3Perl the location of these files. That's all you
need to modify. The main stats will still parse your logfile as ECLF but will ignore
the missing data.
> Any support for FTP logfile format or others formats ?
FTP support have been added since February 2007. Tests have been done
with Proftpd and wu-ftpd servers.
SMTP support have been added since May 2007 with exim,postfix and
sendmail servers.
Queries for Domino and Firewall logfiles have been asked.
> I do not have access to my logfile
Put the following javascript tag inside each page you want to
monitor. Best is to include this tag just before the </body> tag.
<script type="text/javascript" src="/<w3perl_install_dir>/resources/js/w3perl_tag.js"></script>
where <w3perl_install_dir> is the directory where w3perl have
been installed.
A daily logile will be created. You'll have to wait
the next day before computing the stats. Don't forget to password
protect the w3perl /logs/ directory and make sure this directory is
writeable by the webserver
W3Perl should have been installed at the web server root or you'll
have to alter the src target in the provided javascript tag.
PHP should be enabled within your server.
> I want to process my logfile which is only one day long
If you have a warning message when running the stats for the first time which
tells you you need to have a two days long logfile, you can remove this
warning by editing the cron-pages.pl script and comment the line :
next if ($date eq $today);
Setup
> W3Perl is unable to open the log file...
The server's logfile should be readable by users (but not writeable
of course !). Ask nicely your admistrator system to rectify this.
A 'chmod 644' on the log file is enough to run W3Perl.
> Permission denied when running scripts from the web interface
The output directory should be writeable by the server, and usually
the user which run the server have the fewer privilege. Create the
output directory manually and change the permission owner to able your
server to write in.
Another problem could arise if you run a scripts at the command line
with your account and try then to launch the script from the web
interface. People have more privilege than the web user so from the
web interface, the script won't be able to read/write your own file.
> I can't run the stats from the web interface
If your browser send you back the script instead of running it, it
means there was an error during the processing. Check the perl modules
you want to use are installed. Run the check_modules.pl script and
install the missing modules. Problem fixed in 2.994.
> Setting the reverse dns on take hours.
Querying a DNS can take several seconds for each IP ... To get things
speed up, you can use the geo::ip module which is a DNS reverse local
file. You can also convert your IP's logfile with some specific tool like
jdresolve or fastresolve which will make multiple concurrent DNS queries.
Output
> There are several text holes in the countries list. Why ?
There are missing country codes in the file "pays-conv" (found in the resources directory). Mail me
about the missing country code and I'll fix this.
> I don't find my hosts server in the file produced. Why ?
* You should first scan your local domain ($locallog = 1).
* Maybe have you put your host in the nolog option ? Remove it so.
* Or maybe your host don't have a right reverse DNS table. In this case,
you should find your host in the unknow country list.
* The package assume name site are no longer than 9 fields.
> I've choosen to log the domain activity but the package show no activity from my domain accesses.
Well, two possibilities : nobody use your server from your
local domain or maybe you have made a mistake in the $localserver
variable. Check this.
> Cron-pages.pl stop telling me nothing will be output
* Check your $tri variable. It should be "/" if you want to scan all
your log file or a subdirectory to scan only a part of your log file. Perhaps
you try to scan the logfile with a directory you don't have in your server.
* Maybe you are excluding all your server from being scanned ! Check @excluderepert in
config.pl
* Log file should be more than one day long to run cron-pages.pl.
Wait the next day to have a bigger logfile or use this tip.
> No files are produced.
Are your directories writeable ? Have you selected one language ouput in @lang ?
> The initialisation is very slow (cron-pages.pl)
Check your configuration file. Avoid to use the reverse dns option as each
lines of your logfile could take seconds to proceed ! Best is to use a
local reversedns cache file (available with Geo::IP module). If you have large
logfile, use a precision level lower (from 4 to 3). You can also
compress your logfile to speed up computation.
> I just need to run stats between two date or I want stats about a specific day
Use cron-page.pl -s <date1> -r <date2> where date1 and date2 have the following syntax : <day>-<month>-<year>
(day, month and year are two digits number).
Use cron-inc.pl -j <date> where date have the following syntax : dd/Mmm/yyyy
dd is the day in two digits format, Mmm is the month with first letter upper and yyyy the year in
a 4 digits format.
> The daily graph show me only few days ago but I would like to view stats deeply in the past.
Use cron-day.pl with the -d flag. Specify the number of days you want to get
back in past.
> I would like to exclude stats from some countries.
In your configuration file, your should add in the @nolog variable, the name
of the countries you want to exclude. (@nolog = ('.fr') to exclude french accesses)
> I have some JSP files on my server and don't see them in the report
First you should see them in the 'filetype' area. If you need in fact to treat jsp file
as html files, add 'jsp' in @extension (eg : @extension = ('html','jsp');)
You can do the same for other filetype (xml,asp...)
> Trying to launch the script from the admin interface, I have a 'Problem creating directory' warning.
If you want to run the stats from the web interface, the server should be allow to make the stats directory
you have defined in your configuration file. Usually a web server have very limited permission (security) so
most of the time, it won't be allow to create a directory. You'll need to manually do the job and set
permission to 777 to allow the server to write in.
> I want to exclude my own robot, how do I proceed ?
Edit the robot.txt file located in the resources directory. You'll just need to add a new entry in the form :
"string_identifying_robot_in_my_logfile", "Robot_name",
where the first field is a string assuming to identify your robot in the agent field of your logfile. Have a
look inside your logfile to detect this string. The second field is just a more readable form for the
display. Of course, you can send me your new entry so I'll be able to add it in the current release and you
won't have to modify the robots file each time you want to upgrade the package.
> The script report no session found.
The session stats are based on html pages rather than hits, this is something more accurate and more
reliable than hits accesses. In facts, session are based on the filetype you put in your @extension
inside your configuration file. So if you need, let's say, session only about mp3 files, just add
this filetype in @extension. But if no requested filetypes are found in the logfile, the script
will report an 'no session found'. So be sure also your requested files have right status code and
have not been rejected by your server.
> I want to see my php files as html files.
Just add the php extension in @extension.
> How to activate screen size stats ?
You'll have to add a small piece of javascript in your most popular
HTML pages. The script is located in the resources/js/ and named
misctstats.js. You'll have to create a js directory on your server root
and put this script inside. Then add the two lines found in the script
comments in some of your HTML pages (basically homepage).
The location of the miscstats.js can be changed but you'll need to
change also the links in these two lines.
> The logfiles are located on another host on my provider host.
The latest W3Perl is able to retrieve remote log files if they are
available from http or ftp.
> I don't want to use my provider CPU.
So the best way is to retrieve your log files locally and run W3Perl
on your own computer. Look inside the tools directory. There are
scripts to retrieve log files from a provider and the running the stats.
The latest W3Perl is able also to retrieve remote logfiles.
How can I upgrade the referer spam blacklist
Latest blacklist files can be retrieve from this ReferrerCop
> I would like to add my own file extension which are seen as 'Unknown' in the output
Edit the fileext file located in the resources directory. You'll just
need to add a new entry in the form :
<File extension name> <space> <extension>
<space> < extension category>
for instance : AVI movie (.avi) 4
where "AVI movie" is the file extension name, "(.avi)" is the file extension
and "4" the category (here Multimedia, see the first few lines of the file).
> Some hosts are seen as referer spam but are in fact trusted hosts, how can I remove them from this list ?
The list of referer spammer is in the file resources/referrer-standard.txt
Edit this file and remove the unwanted hosts.
> I just want to refresh the main page
Just run the cron-pages.pl script with the -u flag (u for 'update').
> Is there a way to check who downloaded mp3 files.
Yes you can, you'll need to make another configuration file using : @extension = ('mp3'); and
activate the highest level of precision ($precision = 4).
Windows
> Does W3Perl run on Windows 2000, Win XP or Vista ?
Yes. You need to have an Web server running and ActivePerl installed in order
to run w3perl. If you don't have any web server running, you
should use the w3perl.exe binary (see below).
> I don't have an IIS server running, but I would like to process my provider logfiles
Use w3perl.exe which just need Perl to run. You'll be able to process
your own logfiles locally. Configuration file need to be edited manually or you can
use the online tool. See documentation or ask for help in the forum.
If your logfiles are available from an URL, W3Perl will be able to
retrieve them before processing.
> I have trouble running W3Perl for the first time
If your server send you the following message : "
The specified CGI application misbehaved by not returning a complete set of HTTP headers", most likely you have
used '\' instead of '/' for the path in your configuration file. Backslashes are special characters in Perl and
ActivePerl can cope with unix pathname so use forward slashes '/' instead.
> I'm using the Microsoft logfile format instead of the W3C default. How to change the default IIS configuration file ?
Use the web administration interface and select the 'modify
configuration' section. Then change the default W3C logfile format to
Microsoft. Submit the forms until the last page to save the modified
configuration file. You are then ready to launch the stats.