473,472 Members | 1,717 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Python as CGI on IIS and Windows 2003 Server

Hi,

My python scripts are running as cgi scripts on an IIS on Windows XP.
I have to distribute it to IIS on Windows 2003 Server.
I tried to set python as cgi scripts in IIS on this machine in IIS
using advices from http://python.markrowsoft.com/iiswse.asp

No test with or without any " let the IIS execute python scrits as cgi.
Http Error code is 404 (but i'm sure that the file exists in the
requested path).

Is there any difference for python as CGI on IIS between Windows XP
prof. and Windows 2003 Server?

Thanks
Lothar

Jul 19 '05 #1
6 3188

lo********@gmx.de wrote:
Hi,

My python scripts are running as cgi scripts on an IIS on Windows XP.
I have to distribute it to IIS on Windows 2003 Server. .... Is there any difference for python as CGI on IIS between Windows XP
prof. and Windows 2003 Server?

....

Yes there is a difference!

I had this problem last year (developing on Win XP Pro and delivering
on IIS Server), I'll try to lookup the solution, but it might be
difficult (it's kind of a thing you do once and forget about later.)

Jean-Marc

Jul 19 '05 #2
Some bits are coming back to me: the problems stemmed from adresses -
getting the root of IIS was different so accessing files didn't work
the same way. I'm also quite positive that my desktop (developement
version) was IIS 5.1 which comes with XP Pro compared to 6.0 for IIS
Server. I changed the way I was dealing with file adresses.

Maybe there is a hint of direction for your own investigation...

Jean-Marc

Jul 19 '05 #3
jean-marc schrieb:
Some bits are coming back to me: the problems stemmed from adresses -
getting the root of IIS was different so accessing files didn't work
the same way.


thanks for that.
you are right, IIS versions are different.
Wich kind of adresses do you mean, http-adresses or paths in file
systems to root of IIS or to pythonscripts below IIS' root?

Unfortunately I couldn't find a way to solve the problem.
regards
Lothar

Jul 19 '05 #4


lo********@gmx.de wrote:
jean-marc schrieb:
Some bits are coming back to me: the problems stemmed from adresses -
getting the root of IIS was different so accessing files didn't work
the same way.


thanks for that.
you are right, IIS versions are different.
Wich kind of adresses do you mean, http-adresses or paths in file
systems to root of IIS or to pythonscripts below IIS' root?

Unfortunately I couldn't find a way to solve the problem.
regards
Lothar


I think it was due to the way of getting a reference to the IIS's root
- I think that all adresses in html (wheter from static documents or
those generated by python) need to use relative adresses (double dot
slash, or dot slash type of adresses).

If it still doesn't work maybe posting some culprit code could help
figure it out...!

Jean-Marc

May

Jul 19 '05 #5
Lothat <lo********@gmx.de> wrote:
No test with or without any " let the IIS execute python scrits as cgi.
Http Error code is 404 (but i'm sure that the file exists in the
requested path).


Have you checked the security restrictions? IIS6 has a new feature
whereby script mappings are disabled by default even if they are listed
in the configuration list.

To turn CGI on, go to the IIS Manager snap-in and select the 'Web
Service Extensions' folder. Select 'All Unknown CGI Extensions' and
click 'Allow'.

Incidentally, the string I am using is:

"C:\Program Files\Python\2.4\python.exe" -u "%s" "%s"

--
Andrew Clover
mailto:an*@doxdesk.com
http://www.doxdesk.com/

Jul 19 '05 #6
markemark
1 New Member
If you set 'All Unknown CGI Extensions' to Allow you will solve your problem as far as running python CGI but you will open up your server to the world to be hacked. The only time that I ever do that would be to test to make sure that I have coded my python CGI correctly. Once I get the cgi app to run properly with this setting, then I would set 'All Unknown CGI Extensions' to 'Prohibited' and configure my Web Server Extension the correct way.

Please let me know if there is anything that did not work for you from http://python.markrowsoft.com/iiswse.asp

Send python questions to python at markrowsoft dot com and I will address them.

Cheers,

Mark

MCSE MCSA

www.python.markrowsoft.com
Aug 4 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Chung Jiho | last post by:
Hello, We have been deploying our web application over win2k servers. It is written in Python and uses Active Scripting to meet our requirements that it must be ASP application. So far, it was...
1
by: Emile van Sebille | last post by:
QOTW: "If we get 2.3.3c1 out in early December, we could release 2.3.3 final before the end of the year, and start 2004 with a 100% bug-free codebase <wink>." -- Tim Peters "cjOr proWe vbCould...
48
by: meyer | last post by:
Hi everyone, which compiler will Python 2.5 on Windows (Intel) be built with? I notice that Python 2.4 apparently has been built with the VS2003 toolkit compiler, and I read a post from Scott...
0
by: Kurt B. Kaiser | last post by:
Patch / Bug Summary ___________________ Patches : 393 open (+15) / 3315 closed (+17) / 3708 total (+32) Bugs : 908 open (+22) / 5975 closed (+49) / 6883 total (+71) RFE : 223 open...
8
by: bhochstetler | last post by:
I am needing to build python 2.5 on Windows XP x64 Windows Server 2003 sp1 Platform SDK and am not finding anything documented on the process to use. Has anyone had any success with this? If so has...
24
by: Joe Salmeri | last post by:
I just upgraded from Python 2.4.2 to Python 2.5.1 and have found some unexpected behavior that appears to be a bug in the os.stat module. My OS is Windows XP SP2 + all updates. I have several...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.