The Cache: Technology Expert's Forum
 
*
Welcome, Guest. Please login or register. September 18, 2019, 10:31:13 AM

Login with username, password and session length


Pages: [1]
  Print  
Author Topic: Installing Awstats  (Read 4241 times)
webinfoguy25
Journeyman
***
Offline Offline

Posts: 56


View Profile
« on: November 29, 2009, 11:19:11 AM »

Hello I am having trouble getting awstats to work on one of my websites.  In that past I have used awstats via the control panel of my previous host.  Now I am using dreamhost and the directions aren't helping me install it.  Does anyone know an easier way for me to get this to install correctly?  I keep getting this error emailed to me for the cronjob that I have setup for awstats.
sh: 0: command not found


Thanks,
Logged
webinfoguy25
Journeyman
***
Offline Offline

Posts: 56


View Profile
« Reply #1 on: November 29, 2009, 11:57:04 AM »

Nevermind I got it to work yippy skippy!

I just didn't edit the config file correctly, but now its showing up. 
Logged
webinfoguy25
Journeyman
***
Offline Offline

Posts: 56


View Profile
« Reply #2 on: November 29, 2009, 01:02:36 PM »

Ok maybe I spoke too soon, cause now I am able to visit the awstats page in my browser but im getting cronjob emails with this error:

sh: 0: command not found

Anyone know how to fix this, or what it means?

Thanks,
Logged
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #3 on: November 29, 2009, 03:42:33 PM »

Well, congrats on getting the web portion of the package installed - looks like about 30-40 minutes. Nice.

Re. the cronjob, what command is being executed in your crontab that is causing this? Can you post it here? Essentially that means that cron is trying to execute something that (the user who executes the cron) does not have permission for or know where it is. It'd be like typing "yeahBaby" into a shell ... it'd have no idea what you were talking about (unless you had an executable in the path named "yeahBaby.")
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
webinfoguy25
Journeyman
***
Offline Offline

Posts: 56


View Profile
« Reply #4 on: November 29, 2009, 07:06:19 PM »

0 3 * * * /usr/bin/perl /home/username/awstats/tools/awstats_buildstaticpages.pl -config=yourdomain.com -update -awstatsprog=/home/username/awstats/cgi-bin/awstats.pl -dir=/home/username/yourdomain.com/awstats/ >/dev/null


Logged
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #5 on: November 29, 2009, 07:44:41 PM »

Quote
/usr/bin/perl /home/username/awstats/tools/awstats_buildstaticpages.pl

That's the important part. See the part that says, "username" ? This probably means that you cut/pasted it from a website that was trying to tell you what to do, not exactly how to do it.

The inference there, is that /home/webinfoguy25/awstats/tools exists as a directory ... you need to modify the URL so that it points to the exact place where the awstats_buildstaticpages.pl script lives.

Additionally, you want to type "which perl" at the prompt, to make sure that perl is installed in the /usr/bin directory. That is *most likely* where it is, but there is no requirement that this is so. If you type "which perl" and the shell answers "/usr/bin/perl" then you're good to go. If it says something else, then the (something else) is what needs to be in that part of this command.

Hope that makes sense ...
/p
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
webinfoguy25
Journeyman
***
Offline Offline

Posts: 56


View Profile
« Reply #6 on: November 29, 2009, 07:52:42 PM »

I changed that to username cause I didn't want to disclose what it was on a forum.  I am going to see if there is something else wrong with this cron job tommorow I am too tired to website.   D'oh!
Logged
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #7 on: November 29, 2009, 08:17:35 PM »

LOL Gotcha, sorry if I was insulting. But the essence still stands - that command (the perl portion) and the first parameter (the script portion) are what need to be right. You can test this at any time by executing it right from the shell yourself, but kill the dev null part:

/usr/bin/perl /home/username/awstats/tools/awstats_buildstaticpages.pl -config=yourdomain.com -update -awstatsprog=/home/username/awstats/cgi-bin/awstats.pl -dir=/home/username/yourdomain.com/awstats/

... see how that complains. When you can get it to do the job from the shell, then put that successful command string into your cron job.
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
Pages: [1]
  Print  
 
Jump to:  

Perkiset's Place Home   Best of The Cache   phpMyIDE: MySQL Stored Procedures, Functions & Triggers
Politics @ Perkiset's   Pinkhat's Perspective   
cache
mart
coder
programmers
ajax
php
javascript
Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS!