[Tutor] Document URI?

Chris Heisel chris at heisel.org
Tue Dec 9 16:54:24 EST 2003


Thanks, I checked with the sysadmin he made some changes that broke the 
script but he fixed it and all is well...

Thanks again,

Chris

Magnus Lycka wrote:
> Chris Heisel wrote:
> 
>>Our server admin recently upgrade to Python2.3 and now Python is saying 
>>that there is no 'DOCUMENT_URI' key.
> 
> 
> Ok, but I'm not so sure those things are related... Whatever
> version of Python you use, you are just reading the environment
> variables provided by the operating system. The operating
> system won't make different environment variables available
> to a process depending on what version of Python you use.
> 
> If a change in the python installation caused a difference here,
> it's a difference in how Python scripts are executed, not simply
> a version change. Are you running the Python scripts as CGI scripts?
> What else changed? OS? Web server? Configuration?
>  
> 
>>Previously the os.environ['DOCUMENT_URI'] would return /foo/index.html 
>>but now its saying there's no value...
> 
> 
> Try printing out all the os.environ items from a CGI script.
> I think I showed an example of how to do this here a week
> or two ago...
> 




More information about the Tutor mailing list