Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re: Getting system enviornmentals when running CGI

by dsheroh (Monsignor)
on Sep 21, 2015 at 07:23 UTC ( [id://1142605]=note: print w/replies, xml ) Need Help??

in reply to Getting system enviornmentals when running CGI

As already mentioned, .bashrc has no effect on code running under apache because apache is not bash and doesn't read .bashrc.

Instead, to set an environment variable for use in apache, you need to use the SetEnv command in your apache config file or .htaccess:

SetEnv DYNBLDHOME /some/path/or/other

Replies are listed 'Best First'.
Re^2: Getting system enviornmentals when running CGI
by Anonymous Monk on Sep 21, 2015 at 17:29 UTC
    The presence of other environment variables will tell you whether or not you are running under Apache. If so, all output from the script should be HTML formatted. If your program requires a SetEnv-supplied variable but does not see one, it must produce an error message output to that effect and should also make an entry in the Apache log.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1142605]
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2024-05-28 17:32 GMT
Find Nodes?
    Voting Booth?

    No recent polls found