Re: python cgi problem with textarea

2007-04-24 Thread Adrian Smith
On Apr 24, 8:00 pm, placid <[EMAIL PROTECTED]> wrote: > oops...i did read the problem description, but i when i tried the code > it worked for me and when i put spaces into the TextArea it wasn't > reflected correctly back. So i thought this was the problem. > > Adrian, can you still try replacing

Re: python cgi problem with textarea

2007-04-24 Thread placid
On Apr 24, 4:52 pm, Tim Roberts <[EMAIL PROTECTED]> wrote: > placid <[EMAIL PROTECTED]> wrote: > >On Apr 23, 1:01 am, Adrian Smith <[EMAIL PROTECTED]> wrote: > >> On Apr 22, 10:09 pm, placid <[EMAIL PROTECTED]> wrote: > > >> > i just tried it and its working. here it is > > >> >http://yallara.cs.rm

Re: python cgi problem with textarea

2007-04-23 Thread Tim Roberts
placid <[EMAIL PROTECTED]> wrote: >On Apr 23, 1:01 am, Adrian Smith <[EMAIL PROTECTED]> wrote: >> On Apr 22, 10:09 pm, placid <[EMAIL PROTECTED]> wrote: >> >> > i just tried it and its working. here it is >> >> >http://yallara.cs.rmit.edu.au/~bevcimen/form.html >> >> > maybe the internal server err

Re: python cgi problem with textarea

2007-04-23 Thread Peter Otten
Adrian Smith wrote: > ...and I get an internal server error if I have any spaces in the > textarea, which is really going to limit its usefulness to me. Oddly, While debugging you should put > #!/usr/bin/python import cgitb cgitb.enable() > import cgi > print "Content-type: text/html\n"

Re: python cgi problem with textarea

2007-04-23 Thread placid
On Apr 23, 1:01 am, Adrian Smith <[EMAIL PROTECTED]> wrote: > On Apr 22, 10:09 pm, placid <[EMAIL PROTECTED]> wrote: > > > i just tried it and its working. here it is > > >http://yallara.cs.rmit.edu.au/~bevcimen/form.html > > > maybe the internal server error is because mod_python isn't installed >

Re: python cgi problem with textarea

2007-04-22 Thread Graham Dumpleton
On Apr 22, 11:09 pm, placid <[EMAIL PROTECTED]> wrote: > On Apr 22, 4:08 pm, Adrian Smith <[EMAIL PROTECTED]> wrote: > > > > > This may be more a cgi thing than a Python one, but I'm trying to get > > this page: > > >http://adrian10.phpwebhosting.com/trial.html > > > consisting basically of this: >

Re: python cgi problem with textarea

2007-04-22 Thread Adrian Smith
On Apr 22, 10:09 pm, placid <[EMAIL PROTECTED]> wrote: > i just tried it and its working. here it is > > http://yallara.cs.rmit.edu.au/~bevcimen/form.html > > maybe the internal server error is because mod_python isn't installed > assuming your using Apache as your web server Yeah, but it wouldn'

Re: python cgi problem with textarea

2007-04-22 Thread Jim
On Apr 22, 2:08 am, Adrian Smith <[EMAIL PROTECTED]> wrote: > ...and I get an internal server error if I have any spaces in the > textarea, And what error appears in the server error log? -- http://mail.python.org/mailman/listinfo/python-list

Re: python cgi problem with textarea

2007-04-22 Thread Adrian Smith
On Apr 22, 11:40 pm, Jim <[EMAIL PROTECTED]> wrote: > On Apr 22, 2:08 am, Adrian Smith <[EMAIL PROTECTED]> wrote:> ...and I > > get an internal server error if I have any spaces in the textarea, > > And what error appears in the server error log? I've just asked my web provider why I don't appear

Re: python cgi problem with textarea

2007-04-22 Thread placid
On Apr 22, 4:08 pm, Adrian Smith <[EMAIL PROTECTED]> wrote: > This may be more a cgi thing than a Python one, but I'm trying to get > this page: > > http://adrian10.phpwebhosting.com/trial.html > > consisting basically of this: > > > > > > > ...to print out the contents of the textarea with thi

python cgi problem with textarea

2007-04-21 Thread Adrian Smith
This may be more a cgi thing than a Python one, but I'm trying to get this page: http://adrian10.phpwebhosting.com/trial.html consisting basically of this: ...to print out the contents of the textarea with this cgi script: #!/usr/bin/python import cgi print "Content-type: text/html\n" form

Re: Python CGI problem: correct result, but incorrect browser response.

2006-04-06 Thread Tim Roberts
"Sullivan WxPyQtKinter" <[EMAIL PROTECTED]> wrote: > >title:Python CGI problem: correct result, but incorrect browser >response. > >In one of my CGI program,named 'login.py', the script return a HEADER >to web browser: > >Set-Cookie: sessionID=LA

Python CGI problem: correct result, but incorrect browser response.

2006-04-06 Thread Sullivan WxPyQtKinter
title:Python CGI problem: correct result, but incorrect browser response. In one of my CGI program,named 'login.py', the script return a HEADER to web browser: Set-Cookie: sessionID=LAABUQLUCZIQJTZDWTFE; Set-Cookie: username=testuser; Status:302 Location:edit.py (blank line) but the I

Re: cgi problem

2006-03-09 Thread Thomas Guettler
Am Thu, 09 Mar 2006 00:35:25 -0800 schrieb Paul Rubin: > Tim Roberts <[EMAIL PROTECTED]> writes: >> Yes, but the CGI module doesn't write anything, so the advice of writing a >> "Location:" header still applies. > > Aha, it's coming from CGIHTTPServer.py:CGIHTTPRequestHandler.run_cgi() > where it

Re: cgi problem

2006-03-09 Thread Kent Johnson
Paul Rubin wrote: > Tim Roberts <[EMAIL PROTECTED]> writes: > >>Yes, but the CGI module doesn't write anything, so the advice of writing a >>"Location:" header still applies. > > > Aha, it's coming from CGIHTTPServer.py:CGIHTTPRequestHandler.run_cgi() > where it says > > self.send_respo

Re: cgi problem

2006-03-09 Thread Paul Rubin
Tim Roberts <[EMAIL PROTECTED]> writes: > Yes, but the CGI module doesn't write anything, so the advice of writing a > "Location:" header still applies. Aha, it's coming from CGIHTTPServer.py:CGIHTTPRequestHandler.run_cgi() where it says self.send_response(200, "Script output follows") I

Re: cgi problem

2006-03-09 Thread Tim Roberts
Paul Rubin wrote: > >Thomas Guettler <[EMAIL PROTECTED]> writes: >> > back to the originating url, i.e. I want the cgi to send a 302 redirect. >> >> I have this setup for a small script (for bigger things I use quixote)... > >Thanks. It looks like you've written your cgi

Re: cgi problem

2006-03-08 Thread Paul Rubin
Thomas Guettler <[EMAIL PROTECTED]> writes: > > back to the originating url, i.e. I want the cgi to send a 302 redirect. > > I have this setup for a small script (for bigger things I use quixote)... Thanks. It looks like you've written your cgi completely from scratch. I was hoping to use the cg

Re: cgi problem

2006-03-08 Thread Thomas Guettler
Am Wed, 08 Mar 2006 00:19:55 -0800 schrieb Paul Rubin: > I'm trying to write a simple cgi that reads a post from the user's > browser, does some stuff with the form data, and redirects the browser > back to the originating url, i.e. I want the cgi to send a 302 > redirect. Hi, I have this setup

Re: cgi problem

2006-03-08 Thread Kent Johnson
Paul Rubin wrote: > I'm trying to write a simple cgi that reads a post from the user's > browser, does some stuff with the form data, and redirects the browser > back to the originating url, i.e. I want the cgi to send a 302 > redirect. > > There's no obvious way in the cgi module to set the respo

cgi problem

2006-03-08 Thread Paul Rubin
I'm trying to write a simple cgi that reads a post from the user's browser, does some stuff with the form data, and redirects the browser back to the originating url, i.e. I want the cgi to send a 302 redirect. There's no obvious way in the cgi module to set the response code to anything but 200.

Re: CGI Problem on MS IIS 5.0 - Trying to access files on other machines

2005-09-16 Thread Pat [MSFT]
Don't change the account IIS is running under - that is a pretty big security issue waiting to happen. Change the authentication model for the web site to Basic, then logon as you. That will cause any execution to be in the security context you are expecting. Pat "paulp" <[EMAIL PROTECTED]>

Re: CGI Problem on MS IIS 5.0 - Trying to access files on other machines

2005-09-16 Thread paulp
Based on your comment, I finally realized that IIS is running under the IUSR_ account. So I changed the priveleges on this account on my test IIS server as related elsewhere in this note. So now I'm getting a different error. 1326, "LogonUser", "Logon failure: unknown user name or bad password"

Re: CGI Problem on MS IIS 5.0 - Trying to access files on other machines

2005-09-15 Thread paulp
Here is where my ignorance shows. What is a "double hop" issue? Paul "Pat [MSFT]" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Set the site to be Basic Authentication and login as you. I suspect that > the .exe is either running as IWAM/IUSER (i.e. GUEST) or you are running > i

Re: CGI Problem on MS IIS 5.0 - Trying to access files on other machines

2005-09-15 Thread Pat [MSFT]
Set the site to be Basic Authentication and login as you. I suspect that the .exe is either running as IWAM/IUSER (i.e. GUEST) or you are running into a double hop issue. Pat "paulp" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Greetings, > > I'm working on a CGI program tha

Re: CGI Problem on MS IIS 5.0 - Trying to access files on other machines

2005-09-15 Thread Roger Upole
You need to adjust your privileges before you call LogonUser. hth Roger "paulp" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Greetings, > > I'm working on a CGI program that will run under MS IIS 5.0 and will > browse folders on three other machines, building HTML page

CGI Problem on MS IIS 5.0 - Trying to access files on other machines

2005-09-15 Thread paulp
Greetings, I'm working on a CGI program that will run under MS IIS 5.0 and will browse folders on three other machines, building HTML pages that will provide links to these folders. Essentially, the CGI will connect to each machine in turn, doing the FindFirst/FindNext process based on the curren

Re: weird cgi problem w/ apache

2005-06-04 Thread Rick Kwan
If it is umask, then that would be umask for the Apache process, not the second script (which I presume doesn't run as Apache). The CGI script can explicitly set the permissions when creating the folder using mkdir() or makedirs() so that others can write into it. (Depending on how public or priv

Re: weird cgi problem w/ apache

2005-06-04 Thread Chris Curvey
could it be the umask? -- http://mail.python.org/mailman/listinfo/python-list

weird cgi problem w/ apache

2005-06-03 Thread nephish
Hello all. i have a strange problem with some python cgi scripts. the deal is. i keep loosing permission to write to a file created by a cgi script. the file is created in a directory created by a python script. but after the file is created by the cgi script, another script in the same folder

Re: Newbie CGI problem

2005-02-20 Thread Rory Campbell-Lange
On 18/02/05, Peter Otten ([EMAIL PROTECTED]) wrote: > Rory Campbell-Lange wrote: > > > #!/usr/bin/python > > import cgi > > print "Content-type: text/html\n\n" > > print "hi" > > > > Gives me the following in my browser: > > > > ''' > > hi > > Content-type: text/html > > > > > > hi > > ''' > >

Re: Newbie CGI problem

2005-02-18 Thread aurora
On Fri, 18 Feb 2005 18:36:10 +0100, Peter Otten <[EMAIL PROTECTED]> wrote: Rory Campbell-Lange wrote: #!/usr/bin/python import cgi print "Content-type: text/html\n\n" print "hi" Gives me the following in my browser: ''' hi Content-type: text/html hi ''' Why are there two 'hi's? You have chosen a ba

Re: Newbie CGI problem

2005-02-18 Thread m
Rory Campbell-Lange wrote: #!/usr/bin/python import cgi print "Content-type: text/html\n\n" print "hi" Gives me the following in my browser: ''' hi Content-type: text/html hi ''' Why are there two 'hi's? Thanks, Rory gives just one hi for me. -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie CGI problem

2005-02-18 Thread m
m wrote: gives just one hi for me. " Content-type: text/html hi " I get this -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie CGI problem

2005-02-18 Thread Peter Otten
Rory Campbell-Lange wrote: > #!/usr/bin/python > import cgi > print "Content-type: text/html\n\n" > print "hi" > > Gives me the following in my browser: > > ''' > hi > Content-type: text/html > > > hi > ''' > > Why are there two 'hi's? You have chosen a bad name for your script: cgi.py. It i

Re: Newbie CGI problem

2005-02-18 Thread aurora
Not sure about the repeated hi. But you are supposed to use \r\n\r\n, not just \n\n according to the HTTP specification. #!/usr/bin/python import cgi print "Content-type: text/html\n\n" print "hi" Gives me the following in my browser: ''' hi Content-type: text/html hi ''' Why are there two 'hi's

Newbie CGI problem

2005-02-18 Thread Rory Campbell-Lange
#!/usr/bin/python import cgi print "Content-type: text/html\n\n" print "hi" Gives me the following in my browser: ''' hi Content-type: text/html hi ''' Why are there two 'hi's? Thanks, Rory -- Rory Campbell-Lange <[EMAIL PROTECTED]> -- http://mail.python.org/mailman/listinfo/python-list