Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > General

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 28th April 2011, 20:03
brt brt is offline
Junior Member
 
Join Date: Feb 2007
Posts: 10
Thanks: 0
Thanked 1 Time in 1 Post
Default Problem with awstats-7.0 from ISPConfig-2.2.38

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
Quote:
PHP Warning: mkdir(): File already exists in /root/ispconfig/scripts/shell/awstats.php on line 95
i changed:


PHP Code:
                    if (!@is_file($stats_path)) 
to:


PHP Code:
                    if (!@is_dir($stats_path)) 
now the errors are gone
Reply With Quote
Sponsored Links
  #2  
Old 29th April 2011, 09:28
jnsc jnsc is offline
rotaredoM
 
Join Date: Mar 2006
Location: Lausanne, Switzerland
Posts: 525
Thanks: 10
Thanked 172 Times in 77 Posts
Default

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
Reply With Quote
  #3  
Old 12th May 2011, 17:28
jlaughy jlaughy is offline
Member
 
Join Date: Aug 2005
Posts: 50
Thanks: 4
Thanked 1 Time in 1 Post
Default

Errors are gone, bur NO stats... at following pages:

http://www.mydomain.com/stats/www.my...lasthosts.html

I have to roll back to 2.2.37
Reply With Quote
  #4  
Old 16th May 2011, 16:09
JohnMH JohnMH is offline
Junior Member
 
Join Date: Mar 2010
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Any ideas on fixing awstats?
Reply With Quote
  #5  
Old 7th June 2011, 17:27
brt brt is offline
Junior Member
 
Join Date: Feb 2007
Posts: 10
Thanks: 0
Thanked 1 Time in 1 Post
Default awstats in ISPConfig 2.2.39

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 :
Code:
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:
Code:
# Launch all other awstats output
.
.
.
   $OutputFile=($OutputDir?$OutputDir:"")."awstats.$OutputSuffix.$output.$StaticExt";
to:

Code:
# 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

Last edited by brt; 7th June 2011 at 19:44.
Reply With Quote
  #6  
Old 7th June 2011, 19:54
brt brt is offline
Junior Member
 
Join Date: Feb 2007
Posts: 10
Thanks: 0
Thanked 1 Time in 1 Post
 
Default

Quote:
Originally Posted by jnsc View Post
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:

Code:
                    if (!@is_file($stats_path))
instead of

Code:
                    if (!@is_dir($stats_path))


also a bit strange on line 226:

Code:
                        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:

Code:
if (!is_file("$stats_path/index.html") || (!preg_match("/awstats.$web_real_name.$year-$month.html/",file_get_contents("$stats_path/index.html")))) {

Last edited by brt; 8th June 2011 at 13:33.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Version 1.3 of the ISPConfig 3 Manual is finally available! falko General 44 2nd December 2011 12:04
Control Panel - E-mail Tab is empty domi-nik General 15 14th April 2011 18:17
use jawstats / mawstats with ispconfig e100 Tips/Tricks/Mods 3 19th December 2010 11:33
PHP warnings after upgrade to ISP config 3.03 stevegjacobs Installation/Configuration 5 30th October 2010 14:31
ISPConfig DNS and virtual host configuration tips and problem Ripper Installation/Configuration 6 26th June 2007 00:29


All times are GMT +2. The time now is 08:26.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.