PDA

View Full Version : Awstats installation problem


WayneLVN
9-26-03, 09:29 PM
Normally I have no problem installing scripts and awstats looked like an easy install. I even read all the tips on here before I started. But after I install the scripts and configure them I get the following error message when attempting to use awstats.pl in my browser for the first time:

Error: Couldn't open config file "awstats.xxxx.com.conf" nor "awstats.conf" after searching in path "/www/u/user/cgi-bin/,/etc/awstats,/etc/opt/awstats,/etc,/usr/local/etc/awstats": No such file or directory

Of course xxxx is my real domain and u and user are my real names but...

1) the conf file is set up in etc/awstats like the directions say and
2) both this and awstats.pl in the cgi-bin are chmodded to 755.

I thought I may have used binary transfer but after reuploading in binary again I get the same message. Grrr....

Any ideas anyone?

Thanks

Jess
9-27-03, 09:54 AM
This is what worked for me. I had posted these directions in another, earlier thread, but here they are again:

In the awstats cgi-bin folder, you'll find awstats.model.conf. Make a copy of it, then edit these parameters:

LogFile="/www/u/username/logs/access_log" (your server path to access_log)
SiteDomain="http://yourdomainname"
AllowToUpdateStatsFromBrowser=1
DNSLookup=1
UseFramesWhenCGI=1

Save that file as awstats.conf

Create a new folder in your cgi-bin directory called aw. Upload these
files into aw: awstats.pl, awstats.conf, lang, lib, plug-ins.
(If you want awstats password protected, also upload .htaccess)

Set permissions for awstats.pl and awstats.conf to 755. Upload the icon
folder into your htdocs directory.

Then call up awstats.pl from your browser:
http://yourdomainname/cgi-bin/aw/awstats.pl

When AWStats appears, click the Update Now link.

For v.5.7:
To enable optional misc. features:

Add the following HTML code at the end of your index page (before </BODY>) :
# <script language=javascript src="/js/awstats_misc_tracker.js"></script>

Upload awstats_misc_tracker.js (from the awstats js folder) to your htdocs/js directory.
(If you don't have a js directory, create one.)
In your awstats.conf file, set ShowScreenSizeStats and ShowMiscStats to 1.
And set: MiscTrackerUrl="/js/awstats_misc_tracker.js"

Also, in order to get the "Add to favorites" feature working (the value
reported is the count for IE /ratio of IE among all other browsers),
you must remove "robots.txt" and "favicon.ico" entries from the
SkipFiles parameter in your awstats.conf file.

WayneLVN
9-27-03, 01:40 PM
Well, must be jupiter's alignment with mars. I tried first thing this morning again and boom! There it was. Did the first manual update and set up cron to run every minute for a test and that worked fine too. Go figure.

Anyway, thanks Jess. I'll add that js tracker feature today and see how it runs on tonight's cron. Then if that works I'll modify the Favorites feature like you suggest tomorrow.

Thanks again. :)

vitriol
10-9-03, 07:59 AM
Thanks with your info Jess I manage to have everything work ok...exept one thing...the cron file...it does not update the stat

I follow all Powweb directive but :( not working...somebody have an idea?
Thanks

Jess
10-9-03, 09:04 AM
Originally posted by vitriol
Thanks with your info Jess I manage to have everything work ok...exept one thing...the cron file...it does not update the stat


My AWStats cron has been working just fine (same with Webalizer). If you post your cron text here, we can have a look at it and see what the problem might be.

vitriol
10-9-03, 09:40 AM
Hello Jess here are the text

30 0 * * * /www/l/lespasseurs/cgi-bin/awstats/awstats.pl -config=lespasseurs.com -update

Seame all ok for me...what is wrong?
Thanks

Jess
10-9-03, 10:01 AM
Originally posted by vitriol
Hello Jess here are the text

30 0 * * * /www/l/lespasseurs/cgi-bin/awstats/awstats.pl -config=lespasseurs.com -update


Do you actually have a directory called "awstats"? If not, that line should be:
30 0 * * * /www/l/lespasseurs/cgi-bin/awstats.pl -config=lespasseurs.com -update

Also, don't forget to hit the enter or return key on your keyboard to add one or two blank lines after the first line. And be sure to upload the file to your etc directory in text mode, not binary.

vitriol
10-9-03, 12:43 PM
Hello again Jess

Yes I do have a directory called "awstats" and I upload the file in ascii mode.
After that I remove the .txt from the file (crontab.txt) so it become crontab and I remarked the status from the file change from document text to binary file...so it dont stay "text mode" I still don't know what to do.

I do my upload with WS ftp

Thanks for awnsering

Jess
10-9-03, 01:09 PM
Vitriol,

Here's the actual cron text I use (configured to your domain/set-up):

30 0 * * * /www/l/lespasseurs/cgi-bin/awstats/awstats.pl -config=www.lespasseurs.com -update >>/www/l/lespasseurs/logs/cronaw.log 2>>/www/l/lespasseurs/logs/cronaw.err

Try that. I know the tutorial says not to use www after the config part, but when I didn't add that, it didn't work. Now it does. So whatever, works. :p

By the way, the server is case-sensitive, so make sure you didn't capitalize "awstats" when you created that directory. And of course, you'd need to change the time to see it work immediately; as you currently have it, it's set to update 30 minutes past midnight PDT.

vitriol
10-9-03, 02:34 PM
Thanks Jess

I have try and it does not work...don't update

:(

Jess
10-9-03, 11:15 PM
Check your cronaw.err file in the logs folder and see what it says. That might give you a clue to the problem.

vitriol
10-10-03, 10:16 AM
Hum sorry to bother you again Jess

But when I check in in log folder, I don't have a cronaw.err file ...This for me is saying my crontab it is not working at all??? Am I right assuming that?

Like I tell you when I upload the crontab:

«I upload the file in ascii mode. After that I remove the .txt from the file (crontab.txt) so it become crontab (without a .) and I remarked the status from the file change from document text to binary file...so it dont stay "text mode" I still don't know what to do. I do my upload with WS ftp»

The name of that file should be crontab ...exact???
or .crontab or crontab. or just plained crontab (this is what I have now)

Thank to help me understanding this whole situation...it is mystery for me.

(jj)
10-10-03, 11:03 AM
After that I remove the .txt from the file (crontab.txt) so it become crontab and I remarked the status from the file change from document text to binary file...so it dont stay "text mode" I still don't know what to do.

Are you meaning that you uploaded the crontab file in binary mode?

The crontab should be uploaded in ASCII mode, not binary. If you uploaded it as a binary then you should delete it and upload it again in ASCII mode.

vitriol
10-10-03, 11:32 AM
JJ
I upload it in ASCII mode, so when I remove the .txt at the end of the (crontab.txt) it became a binary file...that is what it mark on the WS ftp.

So my question is ...do this file crontab are ok or not and if not what I do wrong???

I upload (contab.txt) in ASCII mode, remove the .txt from the file and nada...nothing work....:( :( :(

(jj)
10-10-03, 08:32 PM
Ok, lets start with what program are you using to edit the crontab file? You must use a text editor, not a word processor or Word Pad. Note Pad is ok if that is all you have, if you are on a Windows system.

Make sure that you do not use word wrap and that the complete crontab text is all on one continuous line.

Hit "Enter" or "Return" to add 1 or 2 blank lines after the crontab text.

vitriol
10-10-03, 08:50 PM
JJ
that is exacly what I have done...I create the file with note pad with no word wrap and that the complete crontab text is all on one continuous line, plus Hit "Enter" to add 1 or 2 blank lines after the crontab text.

After that I upload it with WS ftp making sure to upload it in ASCII mode.

When I remove the .txt at the end of the (crontab.txt) it became a binary file...that is what it mark on the WS ftp.

And now I am back to square one...it is very frustrating...