Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: python as cgi |
|
Author |
|
harisGTJ
Joined: 14 Jul 2011 Posts: 2
|
Posted: Thu 14 Jul '11 14:19 Post subject: python as cgi |
|
|
Hi
Im running windows 7 x64bit.
I downloaded apache 2.2 and Im trying to run a python cgi script.
Here is http conf file relevant bit
<Directory "C:/Program Files (x86)/Apache Software Foundation/Apache2.2/cgi-bin">
AllowOverride None
Options +ExecCGI
Order allow,deny
Allow from all
</Directory>
Also included:
AddHandler cgi-script .cgi .py
Im getting the following error
[Thu Jul 14 13:03:14 2011] [error] [client 127.0.0.1] (OS 5)Access is denied. : couldn't create child process: 720005: localEnvironment.py
[Thu Jul 14 13:03:14 2011] [error] [client 127.0.0.1] (OS 5)Access is denied. : couldn't spawn child process: C:/Program Files (x86)/Apache Software Foundation/Apache2.2/cgi-bin/localEnvironment.py
Tried running Apache Monitor as administrator and still got the same error
Help please |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7364 Location: Germany, Next to Hamburg
|
Posted: Thu 14 Jul '11 15:31 Post subject: |
|
|
I made a test phython script inside my htdocs folder, cause I never liked the cgi-bin folder
config
Code: |
AddHandler cgi-script .cgi .pl .py
|
Code: |
#!C:/Python27/python.exe -u
print "Content-type: text/html\n\n";
print "Hello World! <br><br>";
print "<br><br>\n";
|
Where did you install phython? |
|
Back to top |
|
harisGTJ
Joined: 14 Jul 2011 Posts: 2
|
Posted: Thu 14 Jul '11 16:24 Post subject: |
|
|
Got it working, just didnt get the python path set up properly, the file i was using had a unix path at the top, slightly noobish, thanks
James Blond wrote: | I made a test phython script inside my htdocs folder, cause I never liked the cgi-bin folder
config
Code: |
AddHandler cgi-script .cgi .pl .py
|
Code: |
#!C:/Python27/python.exe -u
print "Content-type: text/html\n\n";
print "Hello World! <br><br>";
print "<br><br>\n";
|
Where did you install phython? |
|
|
Back to top |
|
|
|
|
|
|