I guess I found a bug in Sarg Report
-
Well, I was trying to generate reports with Sarg and what I got was an error saying that there's no index.html file in the dir.
With ssh, I saw that the index.html was created just in the sub-directories and not in the main.
In the /usr/local/etc/sarg/sarg.conf file, the directive 'index' was set to no, even if the 'Generate the main index.html' on the Sarg configuration was set to Yes.
What I did was editing one line in the /usr/local/pkg/sarg.inc:
From: $main_index=(preg_match('/main_index/',$sarg['report_options'])?"yes":"no");
To: $main_index=(preg_match('/main_index/',$sarg['report_options'])?"yes":"yes");And now the reports are generating just fine!
PS: I'm a newbie in pfSense so I still don't know how to edit this configurations in an expert way, I just know something about PHP/XML, if someone has an tutorial/article about how pfSense works, I'll be grateful to study and help the community.
-
To: $main_index=(preg_match('/main_index/',$sarg['report_options'])?"yes":"yes");
This fix does not make sense.
Can you check on sarg.conf file if this option is changing from yes to no according to your config on gui?
-
It stays always in No, whatever configuration in the GUI.
And I also think that doesn't make sense… 'if it's true, yes, if not, yes' but just is this way it got working.
-
Are you on latest package version? I use it here and config file changes when I change on gui.
-
Yes… that's wierd... I'll try to reinstall the package.