Problems with awstats.pl system call from another scripts


 

Current User: Guest Login Register
Please consider registering

Search Forums:


 






Problems with awstats.pl system call from another scripts

Add a New Topic Reply to Post
UserPost

1:47 am
June 12, 2009


bharatkalyan99

Member

posts 7

Hi all,
        I have placed a system call like

system("perl awstats.pl -config=worldcircle -update >logerrors.txt");

in a seperate script(xyz.pl)  to update stats and  to create awstats  db files in specified path given by DirData parameter in the config file .


But this system call  is not getting executed when i run that program xyz.pl  from Cgi(from browser) and the logerrors.txt looks like that is it is looking for awstats.(ipaddress of the machine).conf(i.e say awstats.10.40.26.75.conf)  instead of looking for awstats.worldcirle.conf  in the current path .


But inturn this system call is getting executed and it is working  perfectly when i run this program xyz.pl with command line.

so my doubt is that is there any settings for executing program that contains awstats.pl system call  , from the CGI (browser).

Thanks in Advance………….

6:37 am
June 12, 2009


Jean-Luc

Admin

posts 686

Hi,


The problem is that AWStats "knows" that you started the program from the browser and it disregards the command line arguments. To solve that, you need to use an environment variable that says AWStats to work as if it had been started from the command line interface :


system("env AWSTATS_DEL_GATEWAY_INTERFACE=1 perl awstats.pl -config=worldcircle -update >logerrors.txt");

11:48 pm
June 15, 2009


bharatkalyan99

Guest

hello jean-luc,


                   Thanks a lot,i got my issue resolved,this system  call is perfectly working within the script…Thanks for responding…

Reply to Post


Reply to Topic:
Problems with awstats.pl system call from another scripts

Guest Name (Required):

Guest Email (Required):

NOTE: New Posts are subject to administrator approval before being displayed

Smileys
Confused Cool Cry Embarassed Frown Kiss Laugh Smile Surprised Wink Yell
Post New Reply

Guest URL (required)

Math Required!
What is the sum of:
1 + 11
   



About the InternetOfficer.com forum

Most Users Ever Online:

65


Currently Online:

11 Guests

Forum Stats:

Groups: 2

Forums: 7

Topics: 316

Posts: 1554

Membership:

There are 163 Members

There have been 181 Guests

There is 1 Admin

There is 1 Moderator

Top Posters:

cssfsu – 31

albert_newton – 30

x-plicit2009 – 14

Steve – 14

flwg – 12

dumpuse – 10

Administrators: Jean-Luc (686 Posts)

Moderators: Jean-Luc (686 Posts)