More specifically, you are trying to do things as a CGI script, which has nothing to do with mod_wsgi. For information on CGI and Python in Apache, see:
http://webpython.codepoint.net/cgi_tutorial Graham On 04/10/2013, at 4:47 AM, Jason Garber <ja...@gahooa.com> wrote: > Steve, this email clearly demonstrates that you have not read the modwsgi > documentation. Please do that first. > > On Oct 3, 2013 2:33 PM, <scholmqu...@gmail.com> wrote: > I'm trying to understand what is going on with our server. > > if I try to run a standard "Hello world" python script it fails. > My browser just displays plain text showing all of the code. > > Here is the code I'm running: > > hello.py > #!/usr/bin/python > > print "Content-type: text/html" > print "" > > print "Hello, World" > > But, if I run the hello.py through a php exec() function it works. > > test.php > <?php > echo $path = exec('pwd'); > echo "<br>"; > // exec python script > echo exec('python hello.py'); > ?> > > What I need to know is how to explain to our sysadmin how to configure our > server to execute .py files normally without the need to wrap them in a php > wrapper. > > Thanks! > > Steve > > -- > You received this message because you are subscribed to the Google Groups > "modwsgi" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to modwsgi+unsubscr...@googlegroups.com. > To post to this group, send email to modwsgi@googlegroups.com. > Visit this group at http://groups.google.com/group/modwsgi. > For more options, visit https://groups.google.com/groups/opt_out. > > -- > You received this message because you are subscribed to the Google Groups > "modwsgi" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to modwsgi+unsubscr...@googlegroups.com. > To post to this group, send email to modwsgi@googlegroups.com. > Visit this group at http://groups.google.com/group/modwsgi. > For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups "modwsgi" group. To unsubscribe from this group and stop receiving emails from it, send an email to modwsgi+unsubscr...@googlegroups.com. To post to this group, send email to modwsgi@googlegroups.com. Visit this group at http://groups.google.com/group/modwsgi. For more options, visit https://groups.google.com/groups/opt_out.