Awstats reading old log file [Solved]

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Awstats reading old log file [Solved]

Postby abelmiah » 21. February 2008 03:11

I followed the steps from here. Awstats continues to read "access.log" (old) and not "access-full-clf.log" (new).

How do I tell awstats to read the new log file?

[Solved]
Last edited by abelmiah on 21. February 2008 17:39, edited 2 times in total.
abelmiah
 
Posts: 12
Joined: 28. January 2008 17:40

Postby Izzy » 21. February 2008 03:24

chuyskywalker wrote:In the file there are several important lines that you need to change:
1) Line 51.
LogFile="/var/log/httpd/mylog.log"

Change this line to the
XAMPP_PATH\apache\logs\access.log

I am assuming your followed the above instructions exactly instead of using your new log file name:
XAMPP_PATH\apache\logs\access-full-clf.log ???
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Postby abelmiah » 21. February 2008 03:30

Izzy wrote:I am assuming your followed the above instructions exactly instead of using your new log file name:
XAMPP_PATH\apache\logs\access-full-clf.log ???


Thank you! You're right. I fixed it by changing awstats.conf line 51 with "LogFile="C:\Program Files (x86)\xampp\apache\logs\access-full-clf.log". Now it works.

Does awstats only update from cmd line "XAMPP_PATH\perl\bin\perl.exe XAMPP_PATH\cgi-bin\awstats.pl -config=WWW_YOURHOST_COM -update"?.

If so, is there a way I can make a page that updates the file before it displays the stats (ie. batch file)?
abelmiah
 
Posts: 12
Joined: 28. January 2008 17:40

Postby Izzy » 21. February 2008 03:53

abelmiah wrote:... Does awstats only update from cmd line "XAMPP_PATH\perl\bin\perl.exe XAMPP_PATH\cgi-bin\awstats.pl -config=WWW_YOURHOST_COM -update"?.

If so, is there a way I can make a page that updates the file before it displays the stats (ie. batch file)?

Sorry, I can't help with this as it is off topic in the XAMPP for Windows forum.

Best place to ask your questions is over at the AWStats General Forum.
(I think your question is already in the list of questions at this forum
does AWStats allow real time updates?
Not sure if it will help but looks promising.
)

Also check out this page that was linked to from the post you referenced above, it has all sorts of goodies to check out.

Sorry I can't be more help than that.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Postby abelmiah » 21. February 2008 03:55

Thanks Izzy, you've helped plenty. No worries.

I'll be checking the links.
abelmiah
 
Posts: 12
Joined: 28. January 2008 17:40

Postby abelmiah » 21. February 2008 03:59

How about editing the the xampp page tools/navi? I would like to put a link to awstats there. Is this possible?
abelmiah
 
Posts: 12
Joined: 28. January 2008 17:40

Postby Izzy » 21. February 2008 04:04

abelmiah wrote:How about editing the the xampp page tools/navi? I would like to put a link to awstats there. Is this possible?

Try adding your link in the navitools.inc file and follow the links already there as a template guide.

Always make a backup of system files you want to edit, which make life easy if you have made errors and have to revert.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Postby abelmiah » 21. February 2008 04:09

Hmm. I was afraid you would say that, because all I get is a blank spot where the link should be.

I used PHPMyadmin as the template:
Code: Select all
<a class="n" target="_top" onclick="h(this);" href="/phpmyadmin/"><?php echo $TEXT['navi-phpmyadmin']; ?></a><br>

Add a new line with this:
Code: Select all
<a class="n" target="_top" onclick="h(this);" href="/cgi-bin/awstats/awstats.pl"><?php echo $TEXT['navi-awstats']; ?></a><br>

I've also tried replacing "_top" with "content" and it is still blank. I'm afraid I don't know enough about coding.
abelmiah
 
Posts: 12
Joined: 28. January 2008 17:40

Postby Izzy » 21. February 2008 04:24

Edit the xampp\htdocs\xampp\lang\en.php file and add your $TEXT entry - look under the $TEXT['navi-tools'] = "Tools"; section.

Just tested a cgi file in the cgi-bin using the path you have shown above and it loaded just fine and it showed the entry in the menu after the above language file edits.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Postby abelmiah » 21. February 2008 04:52

Hmm, still not working. My directory tree looks like this.
Code: Select all
xampp-|
      |cgi-bin-|
      |htdocs-|
              |web-|
                   |xampp-
      |phpMyAdminp


I added the new $TEXT line:
Code: Select all
$TEXT['navi-awstats'] = "Awstats";

Also changed the full path:
Code: Select all
<a class="n" target="content" onclick="h(this);" href="C:/Program Files (x86)/xampp/cgi-bin/awstats/awstats.pl"><?php echo $TEXT['navi-awstats']; ?></a><br>
abelmiah
 
Posts: 12
Joined: 28. January 2008 17:40

Postby Izzy » 21. February 2008 04:57

Just use the path you entered in your first post above:
Code: Select all
<a class="n" target="content" onclick="h(this);" href="/cgi-bin/awstats/awstats.pl"><?php echo $TEXT['navi-awstats']; ?></a><br>


BTW - just a heads up with regard to AWStats.
It has been, and may still be, a serious security risk, as it used to have more security holes in it than a secondhand dart board - keep an eye out for issued security bulletins using your favorite search engine, from time to time.
Google - awstats security
Last edited by Izzy on 21. February 2008 05:02, edited 1 time in total.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Postby abelmiah » 21. February 2008 05:02

Thanks for the heads up. I had no idea. It's not that important to me, but I do need some kind of stats.

Anyway, still showing up with a blank spot where the link should be. I've triple checked the en.php and navitools.inc but everything is coded properly. This is beyond me.
abelmiah
 
Posts: 12
Joined: 28. January 2008 17:40

Postby Izzy » 21. February 2008 05:08

Please clear your browser's cache as it is your worst enemy when developing at localhost level - and do it often or set to load on every visit in your browser's configuration.

... but I do need some kind of stats

Have you clicked on Webalizer as that is an included stats script?


Izzy wrote:Just tested a cgi file in the cgi-bin using the path you have shown above and it loaded just fine and it showed the entry in the menu after the above language file edits.


Here is how I did it:
Add the bold entry to your en.php file
$TEXT['navi-tools'] = "Tools";
$TEXT['navi-phpmyadmin'] = "phpMyAdmin";
$TEXT['navi-webalizer'] = "Webalizer";
$TEXT['navi-mercury'] = "Mercury Mail";
$TEXT['navi-printenv'] = "Sys Environment";
$TEXT['navi-filezilla'] = "FileZilla FTP";
$TEXT['navi-jpgraph'] = "JpGraph";


Add the bold entriy to the navitools.inc file:
<a class="n" target="_top" onclick="h(this);" href="/phpmyadmin/"><?php echo $TEXT['navi-phpmyadmin']; ?></a><br>
<a class="n" target="content" onclick="h(this);" href="/webalizer/webalizer.php"><?php echo $TEXT['navi-webalizer']; ?></a><br>
<a class="n" target="content" onclick="h(this);" href="phpswitch.php"><?php echo $TEXT['navi-phpswitch']; ?></a><br>
<a class="n" target="content" onclick="h(this);" href="/cgi-bin/printenv.pl"><?php echo $TEXT['navi-printenv']; ?></a><br>

Clear the browser's cache and reload the Welcome Page.
Click on the Sys Environment link to show your system environment variables.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Postby abelmiah » 21. February 2008 05:26

Cleared the cache and still the same.

Webalizer is not bad. Something to think about.
abelmiah
 
Posts: 12
Joined: 28. January 2008 17:40

Postby Izzy » 21. February 2008 05:43

abelmiah wrote:Cleared the cache and still the same.

Webalizer is not bad. Something to think about.

Webalizer is not as comprehensive but does a safe and reliable job for most users.


Well I am at a loss to understand the blankety blank as the example I posted above works flawlessly, as do any any similar entries I have made, just to try and get this blank spot.

The only time I get a blank entry is if I omit the language file edit or I make a typo in the same file.

Once I was able to see a menu item I then set about making path errors and errors in the inc file but they resulted, as expected, in server errors available in the error.log file and the access.log file - you may wish to check the log files for any clues.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Next

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 50 guests