I know this isn't an answer to your question, but awstats has a long history of security problems, and you might want to think again about whether to use it. Although the author has been fixing them promptly, the fact that they kept cropping up made me lose confidence that the code had been written properly from the ground up with security in mind. At the very least, if you're going to use it you need to have an extremely disciplined procedure for checking for security updates.
Okay, I see. If I can't solve this error then I might just turn to something else. What do you recommend? Keep in mind of my setup. I would like for it to work with it.