[mod_python] environment variables not visible?

Gregory (Grisha) Trubetskoy grisha at modpython.org
Thu Mar 27 08:04:31 EST 2003


I am guessing you are using the cgihandler. You can't see environment
variables from within the cgihandler-executed CGI scripts, it's mentioned
here:

http://www.modpython.org/live/current/doc-html/hand-cgi.html

Your options are to switch to using the publisher handler or write your
own handler.

Also, I may be wrong, but I think information that is gathered by the
sybase client from the environment can be passed to it by other means.

Grisha

On Wed, 26 Mar 2003, Steven D. Arnold wrote:

> Hello,
>
> I am attempting to use mod_python 2.7.8 with spyce 1.3.6.  In my project, I
> use a database module that connects with a Sybase database.  The module
> expects certain environment variables to be set, which I set directly using
> os.environ.  Nevertheless, the module doesn't seem to see the environment
> variables; the errors are exactly as if the environment variables are not
> present.
>
> When I execute the same code from the python interpreter, it works fine.
> Likewise when I run the pages from CGI rather than mod_python.  Thus, it
> seems as if this may be a mod_python issue.  Any idea what may be going on?
>
> Thanks,
> steve
> --
>
>
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://www.modpython.org/mailman/listinfo/mod_python
>




More information about the Mod_python mailing list