cgi

G

Gigs_

i have simple page and form that ask for name and color and cgi script that
print that name in another page and background in chosen color

all the time this error pop:
Error response

Error code 501.

Message: Can only POST to CGI scripts.

Error code explanation: 501 = Server does not support this operation.

i run it on windows xpand this is server that i use:

webdir = '.'
port = 80

import os, sys
from BaseHTTPServer import HTTPServer
from CGIHTTPServer import CGIHTTPRequestHandler

os.chdir(webdir)
srvraddr = ("", port)
srvrobj = HTTPServer(srvraddr, CGIHTTPRequestHandler)
srvrobj.serve_forever()

can someone help me?



thanks!
 
F

Fabio Z Tessitore

Il Wed, 29 Aug 2007 19:24:54 +0200, Gigs_ ha scritto:
i have simple page and form that ask for name and color and cgi script
that print that name in another page and background in chosen color

all the time this error pop:
Error response

Error code 501.

Message: Can only POST to CGI scripts.

I think this should be your problem,

change GET with POST in the form

bye
 
G

Gigs_

Fabio said:
Il Wed, 29 Aug 2007 19:24:54 +0200, Gigs_ ha scritto:


I think this should be your problem,

change GET with POST in the form

bye
it is post in form.
 
F

Fabio Z Tessitore

Are you sure your script is in the right dir?

On my home computer, php script will work in /var/www but my python
script need an other dir to work properly (i don't remember which now ;-))

bye
 
G

Gigs_

Fabio said:
Are you sure your script is in the right dir?

On my home computer, php script will work in /var/www but my python
script need an other dir to work properly (i don't remember which now ;-))

bye
i think that it is in right dir because other script in same dir work.
dir is: cgi-bin
 
G

Gigs_

Gigs_ said:
i think that it is in right dir because other script in same dir work.
dir is: cgi-bin


sorry...................



for waisting your time,
somehow in html page in form i forgot to put right script addr



thx anyway


work now
 
F

Fabio Z Tessitore

Il Wed, 29 Aug 2007 23:11:53 +0200, Gigs_ ha scritto:
sorry...................



for waisting your time,
somehow in html page in form i forgot to put right script addr



thx anyway


work now

no prob, bye
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,739
Latest member
Clint8040

Latest Threads

Top