Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

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


Description:

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).

Cheers,
KM

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!
  • 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
  • Outside of code tags, you may need to use entities for some characters:
            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?
    Username:
    Password:

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

    How do I use this? | Other CB clients
    Other Users?
    Others imbibing at the Monastery: (6)
    As of 2014-10-01 18:54 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      What is your favourite meta-syntactic variable name?














      Results (34 votes), past polls