heezy has asked for the wisdom of the Perl Monks concerning the following question:
Hi monks
I already have a script that uses a system call to open a Star Office6 macro (and it works wonderfully) But the final goal is to get this to run from a cgi script. So I modified it slightly...
#!/apps/PERL5/bin/perl use CGI qw(:standard); use CGI::Carp qw/ fatalsToBrowser /; # remove for production print header; print "<p>Trying to use SOffice6 macro...</p>\n"; $sOfficePath = "/usr/dist/share/staroffice,v6.0/program/soffice"; $convPath = "/webroot/service/servicelist-automation/sl-conversion"; $LRDate = "23Oct2002"; system "$sOfficePath \"macro:///Standard.Module1.batchUpdate(\"$convPa +th\", \"$LRDate\")\""; print "<p>Finished</p>\n";
This works when run from a terminal window by myself but when executed as a cgi script from a browser (by Mr Nobody-user) it fails
did not produce a valid header (name without value: got line " canno +t open display; display environment variable is not set")
This is a real pain, the macro (when I run it) does not produce any kind of GUI or need any user input. It just takes a few parameters and performs a few file conversions.
The Question...(at last)
Please could someone explain (or provide a good link to) the limitations of the nobody user. Does anyone have any suggestions on how I can overcome this? I'm very stuck!
Thanks all, this place is an invaluable resource of knowledge, I thank everyone who has even taken the time to read this posting!
M
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Nobody runs programs?
by blokhead (Monsignor) on Oct 23, 2002 at 17:46 UTC | |
by heezy (Monk) on Oct 23, 2002 at 17:56 UTC | |
by Anonymous Monk on Oct 23, 2002 at 22:23 UTC | |
by heezy (Monk) on Oct 24, 2002 at 14:55 UTC | |
|
Re: Nobody runs programs?
by sch (Pilgrim) on Oct 23, 2002 at 17:41 UTC | |
by heezy (Monk) on Oct 23, 2002 at 17:46 UTC |