Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • andy: As I understand things, Apache will not read .htaccess files in a directory unless some AllowOverride directive is enabled for that directory. I tried the following AllowOverride settings for my blog directory with the results noted:

    AllowOverride None
    Your stats plugin works fine. [I guess this is because Apache does not even look for .htaccess files at all, so your .htaccess file is simply ignored. (Most WordPress servers would not be set this way because fancy permalinks probably would not work.)]

    AllowOverride FileInfo (so WordPress permalinks work)
    Your stats plugin does NOT work UNLESS I remove the .htaccess file. [I guess this is because Apache now reads the file and finds the Allow statement is not allowed to be overridden and reports an error AND apparently denies all access to *.swf files in the stats directory.]

    AllowOverride FileInfo Limit
    or
    AllowOverride All
    Your stats plugin works fine in either case.

    I believe one of the latter Apache server configurations is NECESSARY in order for your stats plugin to work as is. I don’t think it is possible to fix this from within the .htaccess file itself. What you need is a conditional statement to check the AllowOverride directive status before the Allow statement and I don’t think such conditional statements exist.

    Of course, your .htaccess worked to override the users .htaccess file in the directory above because the Apache configuration had to have been set as indicated above or his .htaccess file would not have worked. But your fix broke it for others because of the (strange) way Apache behaves when it finds an unallowed statement in a .htaccess file.

    andy: There is nothing wrong with the .htaccess file. Rather, it is that some server admin (such as myself on my own server) have very tight security on the httpd server (apache) which provides public access to directories on the server.

    In order for apache to read .htaccess files in a given directory, that directory must have the AllowOverride directive enabled. This sort of issue is discussed here (under “Fixing Other Issues”) in connection with using WordPress permalinks.

    The AllowOverride directive is set in the httpd.conf configuration file for the apache httpd.
    I had used the restrictive:AllowOverride FileInfo to allow WordPress to use a .htaccess file to format permalinks for my blog, but that is not sufficiently permissive to allow the Allow from All directive that is in the .htaccess file included in stats 1.6.1 update. Hence apache stopped upon reading the .htaccess file and did not even try to open the .swf file. I could fix this without getting access to the httpd configuration file by simply removing the .htaccess file from the stats plugin directory. (The Allow from All directive was already set for my blog directory anyway in the httpd.conf file).

    To make sure that this explanation is correct, I went into the httpd.conf file and opened up the blog directory to any .htaccess file by replacing AllowOverride FileInfo with AllowOverride All and restarted the httpd server. Now my blog displays the stats with graphs using the original update 1.6.1 (with the .htaccess file) as distributed. This “fix” would not be available to the general user without admin privileges for the httpd server. I left my server set up this way so that the next update should work with no trouble.

    Sorry about the length of my response, but I wanted to be as clear as possible.

    Thanks andy!

    It was a problem with my server. My apache httpd server ver. 2.2.9 does not like the .htaccess file included in the new version of stats. I removed that file and it works fine now!

    I did notice the .htaccess file was in the new update but then did not try removing it to fix things….I tried almost everything else.

    Perhaps this will help others that are having this problem.

    Same problem. Blog hosted by my own server. Updated to WP 2.9.1 and WordPress.com stats 1.6.1. Now no stats graphs will display. The data is there.
    Reinstalled WordPress stats 1.6.1 plugin. Still does not display graphs.
    Used both Firefox 3.5.7 (with Adobe flash player 10) and IE 8 (with Adobe flash player 9) and neither display stats graph.
    Searched forums and found several reports of similar behavior but no fix suggested worked for me.

    I can see my blog stats (including graphs) by logging in to Worpress.com.

    It seems this problem has been floating around for over six months so I assume there must be a fix…I just cannot seem to find it.

    Any help would be appreciated.

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)