View Full Version : Problem with awstats-7.0 from ISPConfig-2.2.38
brt
28th April 2011, 20:03
Hi,
the links on the generated overview-pages eg. awstats.www.mydomain.com.2011-04.html are broken, they point to eg. www.mydomain.com.2011-04.allhosts.html instead of awstats.www.mydomain.com.2011-04.allhosts.html.
i was able to "workaround" the problem by changing the symbolic link in the ispconfig/tools-directory back to awstats-6.9.
after this the pages were build with correct links again.
is there something wrong with the configuration or is this a known bug?
------
i also noticed some errors about mkdir trying to crate directories, when executing /root/ispconfig/scripts/shell/awstats.php
PHP Warning: mkdir(): File already exists in /root/ispconfig/scripts/shell/awstats.php on line 95
i changed:
if (!@is_file($stats_path))
to:
if (!@is_dir($stats_path))
now the errors are gone
jnsc
29th April 2011, 09:28
Thanks for your report.
I also noticed the link problem, but I didn't have the time to look at it. But it looks like that it's a AWStats 7 bug. For the 2 problem, I was certain that I already fixed it in SVN, but I will have to check that also.
Regards
jlaughy
12th May 2011, 17:28
Errors are gone, bur NO stats... at following pages:
http://www.mydomain.com/stats/www.mydomain.com.2011-05.lasthosts.html
I have to roll back to 2.2.37
JohnMH
16th May 2011, 16:09
Any ideas on fixing awstats?
just installed ISPConfig 2.2.39 and noticed that no detail pages were generated at all!
after some investigation i found out that i had to add some lines to /etc/awstats/awstats.shared.conf :
ShowSummary=UVPHB
ShowMonthStats=UVPHB
ShowDaysOfMonthStats=VPHB
ShowDaysOfWeekStats=PHB
ShowHoursStats=PHB
ShowDomainsStats=PHB
ShowHostsStats=PHBL
ShowRobotsStats=HBL
ShowSessionsStats=1
ShowPagesStats=PBEX
ShowFileTypesStats=HB
ShowOSStats=1
ShowBrowsersStats=1
ShowOriginStats=PH
ShowKeyphrasesStats=1
ShowKeywordsStats=1
ShowMiscStats=a
ShowHTTPErrorsStats=1
after adding this, detail pages were generated again :)
but the links on the mainpage are still leading to a 404 :(
this is how i fixed it:
in /home/admispconfig/ispconfig/tools/awstats/tools/awstats_buildstaticpages.pl:
change the following line #451:
# Launch all other awstats output
.
.
.
$OutputFile=($OutputDir?$OutputDir:"")."awstats.$OutputSuffix.$output.$StaticExt";
to:
# Launch all other awstats output
.
.
.
# $OutputFile=($OutputDir?$OutputDir:"")."awstats.$OutputSuffix.$output.$StaticExt";
$OutputFile=($OutputDir?$OutputDir:"")."$OutputSuffix.$output.$StaticExt";
take care to change only the line in section "Launch all other awstats output" but DO NOT CHANGE section "Launch main awstats output"
and voila, everything is working again :D
For the 2 problem, I was certain that I already fixed it in SVN, but I will have to check that also.
it seems it is still not fixed in 2.2.39, in /root/ispconfig/scripts/shell/awstats.php on line 93:
if (!@is_file($stats_path))
instead of
if (!@is_dir($stats_path))
also a bit strange on line 226:
if (!@is_dir("$stats_path/index.html"))
*edit*
"$stats_path/index.html" will never be a directory, so this condition does not make any sense at all, the code included in this condition will always be executed. well thats not a bad thing but the condition could just be ommited.
what would make sense would be to check if there is no index.html file or if the file does not contain a link to the current month, this could be like this:
if (!is_file("$stats_path/index.html") || (!preg_match("/awstats.$web_real_name.$year-$month.html/",file_get_contents("$stats_path/index.html")))) {
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.