Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

How do I import Unix Specific Environment Var into CGI/Perl shell?

( #36503=categorized question: print w/ replies, xml ) Need Help??
Contributed by Anonymous Monk on Oct 13, 2000 at 00:55 UTC
Q&A  > CGI programming


used Unix export to load dynamic environment variable into shell ; use 'env' command and tried to import into CGI/Perl Shell and failed. Why?

Answer: How do I import Unix Specific Environment Var into CGI/Perl shell?
contributed by KM

You can do a few things. One of them is to add these things to the environment of the web user. Second, you can use the SetEnv (or PerlSetEnv if using mod_perl, and you want to) directive in your Apache config file (I assume you are on Apache, if not, check the server docs for your server).


Answer: How do I import Unix Specific Environment Var into CGI/Perl shell?
contributed by Anonymous Monk

Thanks, KM: But what if I want to 'dynamically' add to web server the Unix env var (say, the servername , database name and so on ) independent of the physical location of the program?

Please (register and) log in if you wish to add an answer

  • 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, 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, 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.
  • Log In?

    What's my password?
    Create A New User
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others having an uproarious good time at the Monastery: (9)
    As of 2016-02-08 15:17 GMT
    Find Nodes?
      Voting Booth?

      How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?

      Results (276 votes), past polls