HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Tips/Tricks/Mods (http://www.howtoforge.com/forums/forumdisplay.php?f=19)
-   -   Howto: Make Webalizer show full QueryString!! (http://www.howtoforge.com/forums/showthread.php?t=3030)

Zoon 10th March 2006 13:24

Howto: Make Webalizer show full QueryString!!
 
Have been looking for this little tip for so long, and luckily I happened across a posting by the author of Webalizer on the Yahoo Group :D

Here's what you need to do to make the changes to your webalizer system.

1. Download the source code for Webalizer from the website http://www.webalizer.org/download.html

2. You'll need to install GD, PNG, and zlib if they aren't already on your server. They are linked from the download page above on the Webalizer website or they are on Yum if you are using RedHat (gd, gd-devel, libpng-devel, not sure what zlib is as it was already on).

3. Untar the .tar file to somewhere safe in your home directory.

4. Issue the command "vi webalizer.c" or use your favourite editor.

5. If using vi, type "/isurlchar" to search for it.

6. Edit the following line
Code:

return (strchr(":/\\.,' *-+_@~()[]",ch)!=NULL); /* and a few special ones */
Include in the statement some or all of the additional characters depending how detailed you want to go: "?&"
Code:

return (strchr(":/\\.,' *-+_@~()[]?&",ch)!=NULL); /* and a few special ones */
7. If using vi, hit escape and then type : x to write out the file and exit.

8. Type "cd .."

9. Type "cp -R webalizerfoldername webalizer-compile"

10. Type "cd webalizer-compile"

11. Type "./configure"

12. If there are no errors thrown up, type "make"

13. Find the existing webalizer executable - for me I think it was in /usr/bin.

14. Make a backup of the webalizer executable using "cp /path/to/webalizer /path/to/webalizer.bkp"

15. Type "cp /path/to/webalizer-compile/webalizer /path/to.webalizer"

16. You can manually force an update of your stats by issuing the following command but its probably best to leave it to run automatically at 0040 as per the crontab task.
"/root/ispconfig/php/php /root/ispconfig/scripts/shell/webalizer.php &> /dev/null"

17. Have fun with your new output :)

Please be aware this will show full referrer querystring as well as full URL querystring on your website, so expect to see lots of hits for all options on your dynamic website under the URL section.

NetherBen 5th November 2007 03:12

If you want to show the ENTIRE Query string on referrers you will want to change the above line to: (the previous author excluded = signs)

Quote:

return (strchr(":/\\.,' *-+_@~()[]?&=",ch)!=NULL);
Another trick is if you are on debian you can do:

Quote:

apt-get source webalizer
cd [dirname]
vi webalizer.c
[make the changes]
dh_buildpackage
dpkg -i ../[packagename].deb
It seemed like he had a lot of steps on the above fix.

Anyway.. that's my 2 cents.

-Ben
http://www.hab.la - Chat with visitors to your website using your existing IM client
http://www.nethernet.com - Ruby, Python, Rails, Web development


All times are GMT +2. The time now is 20:26.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.