[Tutor] CGI and ODBC questions

Karthik Gurumurthy karthikg@aztec.soft.net
Sat, 5 Jan 2002 22:14:03 +0530


for apache server,

Look for the file httpd.conf under the directory where you installed apache
in my case..this is the path.
D:\Program Files\Apache Group\Apache\conf

say Create a folder PythonScripts under \Apache

look for an already exiting entry for ScriptAlias in httpd.conf file.

You can copy the same and create a new one like this where you can put your
python files
....
ScriptAlias /python/ "d:/Program Files/Apache Group/Apache/PythonScripts/"
....
Look for a <Directory element entry.
eg: it would looklike this..

<Directory "d:/Program Files/Apache Group/Apache/cgi-bin">
    AllowOverride None
    Options None
</Directory>

Copy the same thing and change the folder name. So you will have another
entry like this.

<Directory "d:/Program Files/Apache Group/Apache/PythonScripts">
    AllowOverride None
    Options None
</Directory>

Then add the following entry to the httpd.conf file:

ScriptInterpreterSource Registry


Now you can place all your python cgi files in the PythonScripts folder
and acess it like this:

http://localhost/python/test.py

hope it works for you!

karthik.

-----Original Message-----
From: tutor-admin@python.org [mailto:tutor-admin@python.org]On Behalf Of
McCarney, James Alexander
Sent: Saturday, January 05, 2002 1:10 AM
To: 'tutor@python.org'
Subject: [Tutor] CGI and ODBC questions


Hail noble Python gurus!

Well Py is way cool, but I am sure you all knew that long before I ever
found out. ;-)

I am turning my attention to server-side cgi-bin processing.

What I have is this:

-platform: W 2000
-web server: (either Apache or IIS[gag]): would like to go w Apache, but may
have to port to IIS
- Python (yay!) v 2.1.1
- Access Database (ODBC driver) (Could go with mySQL, but Access is what I
have right now.)

What I want is this:

Reader/reviewer has some comments about nifty documents I may have penned.

Script serves a form he can fill in and commit to the dB.

Script also e-mails me and tells me that this event has occurred.


There is ample documentation on the cgi module, so I will do my homework
there.
But where is it written in Python/server cyberland about setting up Python
with the server on NT? Likely with the http server docs you may claim.

So has anyone gone down this road before? Does anyone have knowledge on
setting up Python with one or other of these servers?

And can anyone tell me how to get there from here?

Best regards to all of you and thanks for any constructive help you may
provide.


James Alexander McCarney, Technical Writer
M3i Systems Inc., 1111 Saint-Charles Avenue West
11th Floor, East Tower, Longueuil, Quebec, J4K 5G4
Canada
Telephone: (450) 928-3386 x2262
Fax: (450) 442-5076
http://www.m3isystems.com

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor