473,394 Members | 1,812 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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 MyThreadingMixIn:
def process_request_thread(self, request, client_address):
try:
self.finish_request(request, client_address)
self.close_request(request)
except:
print "MyThread::Except"
self.handle_error(request, client_address)
self.close_request(request)
def process_request(self, request, client_address):
"""Start a new thread to process the request."""
import threading
t = threading.Thread(target = self.process_request_thread,
args = (request, client_address))
t.start()
class MyCGIServer(MyThreadingMixIn, BaseHTTPServer.HTTPServer):
def close_request(self, request):
print "Svr::close_req() >> [%s]\n" % time.asctime()
import sys
server = MyCGIServer(('', 80), MyCGIHandler.MyCGIHandler)
try:
while 1:
sys.stdout.flush()
print "Running.."
server.handle_request()
except KeyboardInterrupt:
print "Finished"

--------------------test.py-----------------
import cgi
print "Content-type: text/html"
print
print "<html><head><title></title>"
print "</head>"
print "<body>"
print "<form name=form1 action=result.py>"
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><title></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 1450

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

Similar topics

6
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...
11
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
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...
1
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,...
0
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
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...
0
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...
4
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
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...
10
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.