I'll post here, as this is an issue with AWstats with dynamic pages and mod_perl. As probably most people using AWstats Dynamic with the ISPConfig panel will end up in this thread, it'll go here.
I had very inconsistent performance of awstats, most of the time identified by awstats reporting I had not used a valid user, but couple of refresh pages later I suddenly did get a page. And after clicking a submenu item, that pointed to a new page, I suddenly found myself not being a valid user anymore. Initially I though this was a bug of Firefox 2 not being able to hold credentials, but as it looks now it has to do everything with the way AWstats is running in mod_perl.
IT DOES NOT SEND THE CORRECT HEADERS!
Sorry for the capitalization, but I believe this is a serious problem of awstats and it's in there for years. I fixed the code months (years) ago on my systems , but moving to a new server and a new version pointed me again to this.
If you have mod_perl2 and Apache2 running, there's no need to mess around with the code, as there's a mod_perl directive, which can solve this issue. You need to edit the .htaccess file where awstats.pl resides. If you use the install of this thread, you'll find it at
Add the following lines at the end:
<Files ~ (\.pl$)>
Presto. Now Awstats runs as expected, without throwing you out as an non-authenticated user, but yet your were.