473,624 Members | 2,127 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

cgi in win2000 have multi-user problem....

may you help me??
thanks!!
I want to establish a environment to server multi-user in win2000
I run a cgi-multithread-server program,its name is cgisrv.py
and I write two programs to test it, one is named as test.py,another is result.py
test.py : it has a form and a submit button,submit to result.py, it's just a html page
result.py : use time.sleep(10) to wait 10 seconds,show the time before it and after it
IN WINDOW98 AND LINUX :a. I open single IE to conncet to the test.py and click the button ,it's correctly,
I can see the correct message
b.I open IE Browser 3 times TO connect to the test.py and click the button at the
same time, 3 browsers all has the correct message
IN WINDOW2000: a. I open single IE to conncet to the test.py and click the button ,it's correctly,
I can see the correct message
b. But when I open IE Browser 3 times TO connect to the test.py and click the button at the
same time, the lastest clicked browser has correctly message, the first and second browser
occur error
anybody can resolve this problem ............
please help me.....
thank you~

These are my 3 programs:

-------------cgisrv.py----------------
import SocketServer
import BaseHTTPServer
import MyCGIHandler
import time
class MyThreadingMixI n:
def process_request _thread(self, request, client_address) :
try:
self.finish_req uest(request, client_address)
self.close_requ est(request)
except:
print "MyThread::Exce pt"
self.handle_err or(request, client_address)
self.close_requ est(request)
def process_request (self, request, client_address) :
"""Start a new thread to process the request."""
import threading
t = threading.Threa d(target = self.process_re quest_thread,
args = (request, client_address) )
t.start()
class MyCGIServer(MyT hreadingMixIn, BaseHTTPServer. HTTPServer):
def close_request(s elf, request):
print "Svr::close_req () >> [%s]\n" % time.asctime()
import sys
server = MyCGIServer(('' , 80), MyCGIHandler.My CGIHandler)
try:
while 1:
sys.stdout.flus h()
print "Running.."
server.handle_r equest()
except KeyboardInterru pt:
print "Finished"

--------------------test.py-----------------
import cgi
print "Content-type: text/html"
print
print "<html><head><t itle></title>"
print "</head>"
print "<body>"
print "<form name=form1 action=result.p y>"
print "<input type=submit value='start'>"
print "</form>"
print "</body></html>"

-------------------result.py-----------------
import cgi,time
print "Content-type: text/html"
print
print "<html><head><t itle></title>"
print "</head>"
print "<body>"
print time.localtime( )
print "<br>"
time.sleep(10)
print "<br>"
print time.localtime( )
print "</body></html>"
Jul 18 '05 #1
0 1460

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

Similar topics

6
1771
by: Bart Nessux | last post by:
Hello, Auditors want us to log out a user if the computer they are logged onto has been unused/inactive for a set period of time. It's trivial to logout the user, but we're having trouble telling if the system is indeed inactive. If we could learn that information, then we'd need to measure how long it has been like this so we can all the logout function. How might this determination and measurement be approached? We're using Python...
11
1911
by: angel | last post by:
Hi I use python on win2000.I found python perhaps spend 10~15 second on starting. How to accelerate it? Thanx
0
1515
by: Scott Townsend | last post by:
We are trying to get the Microsoft ASPFileUpload to work on both Win2003 and Win2000 http://support.microsoft.com/default.aspx?scid=kb;en-us;q299692 We can now get large and small files on our Development machine. (Win2003 IIS6) Though now that we have posted it to the Production server we cant seems to upload small files. The Production machine is a Win2000 IIS5 machine. It can take large files just fine. The Small files are what...
1
2398
by: SAP BASIS Consultant | last post by:
Hello, I am installing SAP R/3 on Win2000/SQL Server. There is a CD with the SQL Server RDBMS, as well as another one with SP 3A (Both are from SAP). According to the SAP installation manual, after installing those I have to install 'QMF' for SQL Server. It indicates to check Microsoft's documentation on installing QMF on SQL Server. I searched Microsoft's Website, but I did not find any information on QMF. Any ideas on the procedure...
0
1422
by: natasha | last post by:
i develop applications in VisualStudio.net with win2003+iis6 and deploy them to the production server wich has win2000+iis5 on it. are there going to be problems on the production server?
1
2152
by: Dabeule | last post by:
Hello, I would like to make a DOS aplication with VC++ and Win2000 which use the serial port to communicate with another PC. I have downloaded DLPortIO (via port95nt.exe), but I cannot compile my program because VC++ find the error: "error LNK2001: unresolved external symbol _DlPortReadPortUchar@4" My program seems like this:
0
1151
by: Jo | last post by:
Hello, can someone help me? This is the code that I use: Dim rsSelectMandaten As New ADODB.Recordset Set rsSelectMandaten.ActiveConnection = DEData.CnnConnection rsSelectMandaten.CursorLocation = adUseClient
4
1685
by: Mac | last post by:
Hello Anyone has a list of software needed to be installed on below Operating systems to be able to run C# applications. a. Win98 b. Win2000 Pro Regards, Mac
4
1605
by: Strahimir Antoljak | last post by:
I completed a VB.NET application and it runs fine on WinXP. I wanted to run it on Win2000 and it is not working. Is it not supposed to work on Win2000 too? (I installed .NET framework distributable on the Win2000 machine). Any suggestion much appreciated. Thanks, -- Strah @ Langan
10
2397
by: JP Bless | last post by:
Hi all, I have a database Access/MSDE and would like to have a website so users can search the data and update some records/fields through the website.... And I have high speed internet connection. Is it possible to setup/host a website using WIN2000/XP machine? Must I have static IP and not dynamic one obtained when my router connects to the ISP? What kind of internet connection do I need to have to be able to have/host a website on my...
0
8234
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8172
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8620
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8335
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8474
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6110
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
2605
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 we have to send another system
1
1784
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1482
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.