Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Since upgrading my PHP installation to 5.3, I have not been able to access jawstats with error:

JAWStats could not open an AWStats log file

Is the specified AWStats log file directory correct? Does it have a trailing slash? The problem may be the variable "statspath" in your config.php file.

The data file being looked for is awstats20125.test.com.txt in folder /var/lib/awstats/

When I check the contents of var/lib/awstats/ then month/year is in a different order. E.g: awstats052012.test.com.txt. From reading the documentation I have made sure that I added statsname, although it doesn't seem to be taking any notice of this.

Config.php

  // core config parameters
  $sDefaultLanguage      = "en-gb";
  $sConfigDefaultView    = "thismonth.all";
  $bConfigChangeSites    = true;
  $bConfigUpdateSites    = true;
  $sUpdateSiteFilename   = "xml_update.php";

  // Default Site Config
  $config = array(
    "theme"       => "default",
    "fadespeed"   => 250,
    "password"    => "DGlxSLKT5k",
    "includes"    => "",
    "language"    => "en-gb"
  );

  // individual site configuration
  $aConfig["test.com"] = array_merge(array(
    "statspath"   => "/var/lib/awstats/",
    "statsname"   => "awstats[MM][YYYY].test.com.txt",
    "updatepath"  => "/usr/lib/cgi-bin/",
    "siteurl"     => "http://www.test.com",
    "sitename"    => "Test.com"    
  ), $config); 
share|improve this question

1 Answer 1

up vote 0 down vote accepted

I am an idiot, 5 mins after adding a bounty, I find that this error is caused because of the open_basedir being turned on.

share|improve this answer
    
How does open_basedir have to do with jawstats working? –  crosenblum Sep 4 '12 at 18:13
    
Because open_basedir was preventing jawstats from reading the apache log files –  John Magnolia Sep 5 '12 at 10:39

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.