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


In reply to Nobody runs programs? by heezy

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.