Yesterday I was upgrading some programs on my home laptop and realized I had an old version of MySQL, 5.1. The current version is 5.6. The 5.1 version of MySQL was installed when I used Microsoftâ€™s Web Platform Installer to install a test WordPress blog. This is a really easy way to checkout software when it works so I set out to upgrade MySQL to the latest version. Surprisingly there is no way to upgrade or remove MySQL using the Web Platform Installer. So I downloaded the community upgrade from www.mysql.com and ran the upgrade. It did not work. I kept getting an unhandled exception error message during the upgrade. Since I did not have any important information in the data base I uninstalled the current version and installed the 5.6 version. Now MySQL is working but I kept getting password errors when I tried to install a new blog using either the Web Platform Installer or Microsoftâ€™s WebMatrix. So I did a complete MySQL reinstall using these instructions for Windows 7 from serverfault.com.
- Uninstall MySQL using the uninstaller.
- Delete C:\Program Files\MySQL
- Delete C:\Program Files (x86)\MySQL
- Delete C:\ProgramData\MySQL
- Delete from any Users’ AppData folders. Example: C:\Users\rdoverby\AppData\Roaming\MySQL
- Reinstall MySQL
This did not fix my problems with Web Platform Installer or WebMatrix. Since I had phpMyAdmin working under IIS and a working version of MySQL, I opted to try â€œThe Famous 5-Minute Installationâ€. I copied an old WordPress installation to a new folder, followed the instructions, and in about five minutes I had a new WordPress blog working on my laptop.
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 awstats.pl 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, http://www.internetofficer.com/forum/awstats-iis-installation-and-configuration/awstats-wont-recognize-logname-cs-username-field/. It sure would have been nice if Awstats re-mapped cs-username to %other rather than %logname.
Every so often you find a tool you have never heard of. This week the tool that caught my attention was Performance Analysis of Logs (PAL). It was recommended by Bruce Mackenzie-Low in a newsletter from SearchWindowsServer.com and it looks it will be helpful with the â€œartâ€ of performance analysis. I played with it a little bit using the IIS and SQL templates. It seemed to provide some helpful insight into potential performance issues. My aim is to analyze our web server for IIS and database bottlenecks.