Forum: Windows IIS statspath problem


« Back To Thread List

4139 days ago
Windows 2003, IIS 5.0

No matter what I set the "statspath" to, I cannot get the program to load my stats file. Maybe its an NTFS permissions issue (?), I could not find any documentation stating what permissions are needed. I gave the IUSR_[machinename] full permissions to the folder and still no luck.

Toying around with the code I found that inside of clsAWStats.php the function GetLogList(), it cannot call opendir() on $sFilePath. No matter how I have the path set, for example I set it to relative "../../etc." or absolute it never is able to open the directory. I put in some debug code like is_dir() on the same path, it errors and says no. I tried \\ slashes instead of / and still no luck.

Here is my config (xxx = my site):

"statspath" => "d:/awstats/sites/xxx/",
"updatepath" => "D:/awstats/",
"siteurl" => "",
"sitename" => "xxx",
"theme" => "default",
"fadespeed" => 250,
"password" => "no",
"includes" => ""

4138 days ago
AT a bit of a loss as to what to suggest here, not because I don't want to help, but because permissions issues require intimate knowledge of your system.

Furthermore you've already said, "I put in some debug code like is_dir() on the same path, it errors and says no", which is where I would have started.

Without wanting to state the obvious as you clearly have experience here, double check spellings and write more tests away from JAWStats to open the folder. Can I clutch at straws and say "D" as opposed to "d" ala your updatepath?

Good luck, please let me know whatever the outcome.
4138 days ago
I do not think its a permission issue. I just put that in there, just in case others found a resolution based on permissions.

I put my AWStats file in the same directory as the config.php file, updated the "statspath" to "./" and I was able to get past the problem with GetLogList() and opendir() method. However this is not feasible to deploy with the AWStats file in the same directory as the php files. I need to be able to path to these files and have the php load it. Any thoughts as to why the local file works and the remote file does not?
4138 days ago
You're right, there is no reason for your AWStats data files to be in your JAWStats directory - in fact most of the time it doesn't make sense to do so.

What I am saying is that you've either entered the wrong path name, or PHP or your web server doesn't have permissions to open that folder which is what your "is_dir()" test suggested.

When you say "remote" files, they do sit on the same filesystem as your JAWStats code though, don't they?
4138 days ago
Yes, same computer. I meant "remote" as in not on the same drive or not in the same directory. Everything works fine when all of the AWStats files are in the same directory as JAWStats.

The path name is correct, as I can copy-paste that path into Start-Run in windows and it jumps me into a file listing for that path. Either / or \\ work the same.

I am going to look into permissions and will post back if I find anything. IIS has a guest user account created called I gave the IUSR_[machinename]. I have already given this user full permissions to the folder that contains the JAWStats data, and php still errors when trying to read this directory.
3940 days ago
I had a similar problem but needed to escape the C:/ to become c\:/

Now getting an error message it can not find the stats file, which is interesting as it's giving the wrong format it says it should be looking for.

Also when I copy the data file and rename it to this format, it still doesn't pick it up!

The data file being looked for is in folder C\:/AWStats/data/
3813 days ago
this settings really works with Windows 2003/IIS6/PHP5.2x

// individual site configuration
$aConfig[""] = array(
"statspath" => "D:\\Stats\\AWSTATS\\\\",
"updatepath" => "../cgi-bin/",
"siteurl" => "",
"sitename" => "xxxxxxxx site",
"theme" => "default",
"fadespeed" => 250,
"password" => "no",
"includes" => "",
"language" => "it-it"

I've placed the jawstats folder under the wwwroot folder of Awstats (so I have to use "../cgi-bin/" as updatepath.

I've changed the line 257 of index.php (ver.0.7 beta)
3753 days ago

What you have changed in line 257 of index.php. This would help everyone. Here it is half solution. Thanks

« Back To Thread List

Participate in this discussion


You must be logged in to post in this thread.


Version 0.7 beta available now

Released 25th Janury 2009

Try the online demo or download now.

Latest JAWStats News:

Version 0.7 Beta Released

Sprechen Sie Deutsch? Multi-lingual JAWStats v0.7 is finally here.

posted 25th Jan '09. read more »

Help JAWStats

Please donate a dollar (or more!) towards the hosting costs for this site. This money doesn't go anywhere near my pocket, it is purely used against my hosting bill.


Get $50 off your webhosting

You could do far worse than choose Dreamhost. I've used them for 6 years and they're great. Simply enter the promo code: JAWSTATS on signup!