Strange behavior with os call in cgi script

Dennis Benzinger Dennis.Benzinger at gmx.net
Sun Feb 5 15:53:58 EST 2006


sophie_newbie schrieb:
> I have written a cgi script that seems to run perfectly from the
> command line when I simulate some cgi input using
> os.environ['QUERY_STRING'].
> 
> The thing is that when I run it from the browser, one of my os.system
> calls, which gets excecuted fine when running the program in the
> interpreter, doesn't seem to get excecuted, or gets excecuted but does
> nothing.
> 
> Does anyone know whats going on or how I could debug this problem?
 > [...]

Probably the environment is different when your program is executed by 
your web server. So either PATH is wrong and your program is not found 
or some other environment variable is wrong and you could debug it by 
printing the environment in your program.





More information about the Python-list mailing list