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.