Help: I want a chat script!

only at example.com only at example.com
Sun Feb 10 14:24:04 EST 2002


Okay... you're a little confused about where the data from your form is
going. The data will not be STORED in script.cgi ...  script.cgi is
supposed to be a program (in this case, a python program) that processes
all of the VARIABLES (e.g. name, etc) from your form. Take a look at the
tutorial Devshed has and you will begin to understand how cgi works. 

http://www.devshed.com/Server_Side/Python/CGI/page1.html

Hope this helps.


In article <mailman.1013350037.30507.python-list at python.org>, "Chris
Gonnerman" <chris.gonnerman at newcenturycomputers.net> wrote:

> ----- Original Message -----
> From: "Flavian Hardcastle" <deathtospam43423 at altavista.com>
> 
> 
>> "Chris Gonnerman" <chris.gonnerman at newcenturycomputers.net> wrote in
>> news:mailman.1013316023.10782.python-list at python.org:
>> 
>> > "PERL type CGI's" should be read "scripts".  You can't run Python,
>> > Perl, Ruby,
>> > Lua, etc. from this particular server.
>> > 
>> > Try Xitami.  It is quite compatible with Python.  http://xitami.com
>> > 
>> Thanx. I'm downloading it as we speak.
> 
> I have used it a little; Steve Holden wrote about it in his book which I
> just finished reading.
>  
>> So with this server, will I be able to just send info direct from my
>> browser form to a file? If I can do that, then I'm up and running.
> 
> I'm not sure what you are saying here.  You don't send info "to a file,"
> you send it to a CGI script.  Your script must handle the data from
> there.
> 
>> [snip]
>> > 
>> > The form looks good, but where is script.cgi?
>> > 
>> In the same directory as the html form, cgi-bin.
> 
> Ah... what I meant was, that you should *post* the source to script.cgi.
>  Anyway, if your form is HTML it is bad form to have it in the cgi-bin
> folder.
> 
> GENERALLY (though it's not real safe to say this) CGI scripts can be
> stored in the cgi-bin folder, or in the htdocs/html/webroot folder; this
> depends on webserver settings.  The Xitami default allows CGI scripts
> only in the cgi-bin folder, but you can define that cgi-bin is actually
> the same as webroot.  Xitami recognizes executable files by extension on
> Windows, so your script should likely be called script.py (assuming it
> is Python).
> 
> Gah.  So.  Put script.py in the Xitami cgi-bin folder, and your form in
> the Xitami webpages folder, and if you are using the default
> configuration, you should be in good shape.  Start Xitami and then surf
> to http://localhost/yourform.html (whatever you called it) and when you
> click the Submit button, the form data is sent to
> http://localhost/cgi-bin/script.py (which should be in the action=
> attribute of the form tag, perhaps abbreviated as /cgi-bin/script.py).
> The script receives the data, does whatever, and then must send a new
> page to the web browser... this is why I want to see your script.
> 
> 
> 
>



More information about the Python-list mailing list