Current User: Guest Login
Please consider registering


Lost Your Password?

Search Forums:


 






Minimum search word length is 4 characters – Maximum search word length is 84 characters
Wildcard Usage:
*  matches any number of characters    %  matches exactly one character

Problems with awstats.pl system call from another scripts

Reply to Post Add a New Topic
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 1125

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:
5 + 11
   


About the InternetOfficer.com Forum

Forum Timezone: UTC 1

Most Users Ever Online: 302

Currently Online:
14 Guests

Currently Browsing this Topic:
1 Guest

Forum Stats:

Groups: 2
Forums: 9
Topics: 638
Posts: 2709

Membership:

There are 257 Members
There have been 302 Guests

There is 1 Admin
There is 1 Moderator

Top Posters:

cssfsu – 55
deepakgupta – 34
albert_newton – 30
cosminpana – 20
DTNMike – 19
ahtshun83 – 17

Recent New Members: raju, todd2taylor, sbdcunha, mansigill1987, ThomasDuh, ThomasKic

Administrators: Jean-Luc (1125 Posts)

Moderators: Jean-Luc (1125 Posts)