Problems upgrading Awstats from 6.9 to 7.0

I have a working configuration for Advanced Web Statistics 6.9 (build 1.919).  When I upgraded to the latest release (Advanced Web Statistics 7.0 (build 1.971), it did not work. I ran into this problem in 2009 and backed off.  Now it is time to commit some brain power to fixing the problem.


When I tried to process a log file no statistical data was being collected. No error messages were generated even though many new records were processed. The data file remained very small.


I set up a test environment in which I could process the data with the new version and debugging turned on. To turn debugging on I changed DebugMessages from 0 to 1 in the configuration file and added "-debug=10" parameter to command used to process the log file. This gave me all of the debug messages printed to the screen. I started processing a log file and interrupted it after it had processed a few lines by hitting Ctrl-C. In the debug output I could see that 7.0 version was having problems with the log format. Some values were parsed correctly and others looked like they were offset by one variable. In my configuration I was using a custom logformat which used a combination of IIS column names and AWSTATS keywords. I don’t remember how I created it but I suspect I found an example on the Internet. It worked for the last two years but now it seemed to have a problem with cs-username(%logname).


My solution was to convert the IIS column names to the corresponding AWSTATS keywords. Even after using the AWSTATS keywords it was still not parsing correctly. To get the parsing to work correctly, I had to change %logname to %other. In my log files, the value for cs-username(%logname) is a single dash.   Obviously it is not important or necessary. When I look at the code, line 9027, I see a comment that says the regular expression code allows spaces to support Lotus Notes. As a result it puts two fields into one variable. Naturally the parsing for %other works correctly. After I knew what the problem and answer was, I could find the answer on the Internet. Here is someone else who experienced the same problem, It sure would have been nice if Awstats re-mapped cs-username to %other rather than %logname.

Creating a Portable Padre

Padre logo

I think I was bored on a slow Friday afternoon so I started updating non-critical software.   Somehow I found a portable version of Perl, Strawberry Perl, and an IDE for Perl called Padre. An IDE is a help for someone like me who does not use Perl very often. Since I have a love-hate affair with the Windows registry, I also prefer portable applications. Since all of my portable applications are applications, I prefer portable applications that fit in this framework. So I found a “portable” Strawberry Perl. However it was not in the Portable Apps framework. I found an installable version of Padre but not a portable version. I am guessing that there is a Perl/Padre version issue since they only build Padre for Perl 5.10. The “portable” version of Perl I was looking at is 5.12. So I decided to ignore the problems and create my first Portable Application. If it doesn’t work I won’t use it. Here are my steps for creating a Portableapps version of Strawberry Perl with Padre(45.7 MB).

  1. Download Portable Strawberry 5.12.
  2. Create PortableApps folder structure for new application called StrawberryPerlPortable
  3. Create StrawberryPerl Portable Application
    1. Install Portable Strawberry in "app" folder.
    2. Create appinfo.ini
    3. Create Launcher folder and StrawberryPerlPortable.ini pointing to portableshell.bat
    4. Create Portable application using Launcher
  4. Test
  5. Install Padre using cpanp. Ignore errors.
  6. Modify portableshell.bat to start padre rather than cmd.
  7. Test example scripts
  8. Final Test: Install my cidrmerge application.
    1. Install NetAddr::IP::Lite
    2. Install Net::CIDR::Lite
    3. Test cidrmerge.