Adding:
#! c:/python22/python.exe to the top of the script brings up a
DOWNLOAD FILE dialog. In that dialog, if I select RUN, the script
executes quickly in a DOS-like command line window and then exits.

Advertisements

Rolfe wrote:
> Thank you. I have rechecked my config (shown below) - but I still
> can't get the script (also shown below) to run in mod_python. I've
> tried it in both the /cgi-bin/, and in /htdocs/test/:

(just guessing)

1 The LoadModule path looks suspicous, on windows I would expect
mod_python.dll rather than mod_python.so

Advertisements

> 1 The LoadModule path looks suspicous, on windows I would expect
> mod_python.dll rather than mod_python.so
>
> 2 Did you restart the apache after changing the config file?
>
> Peter

Hi Peter, I checked C:\Program Files\Apache Group\Apache2\modules and
found mod_python.so there, so the LoadModule path was okay. When I
made a plain vanilla default RE-INSTALLATION of Apache and mod_python
(see instructions below) everything worked fine. I think I goofed
something up in the previous installation file.

RUNNING MOD_PYTHON/APACHE/WINDOWS2000

Hi, I struggled, and got mod_python running on Apache/Win2k. Follow
these instructions verbatim and you shouldn't have any trouble. These
instructions are based on
"http://www.modpython.org/live/current/doc-html/inst-testing.html".
I've added specific information such as Windows filepaths and
filenames so there's no ambiguity on what you should do. I encourage
you to copy and paste to avoid typing errors.
Cheers,

Rolfe

INSTALLING MOD_PYTHON

1. Make a default installations of the latest/best version of Apache.

2. Make a default installation of the latest/best version of
mod_python.

6. Assuming your sitting at the same machine that's running Apache,
enter the URL "http://localhost/test/mptest.py" in your web browser.
The browser displays "Hello World!" and nothing else. This confirms
that Apache can run cgi scripts in the /test/ directory.

7. Repeat step 6 using the URL "http://localhost/cgi-bin/mptest.py"
instead. The browser displays "Hello World!" and nothing else. This
confirms that Apache can run cgi scripts in the /cgi-bin/ directory.

PROCEDURE COMPLETED - mod_python works!

######## NOTES ######### Remove either of the following sections (from
<Directory to </Directory>) in order to disable cgi scripts in a
particular directory. I understand it is very poor security to run cgi
scripts under htdocs, so I'd try getting rid of that one first.

Share This Page

Welcome to The Coding Forums!

Welcome to the Coding Forums, the place to chat about anything related to programming and coding languages.

Please join our friendly community by clicking the button below - it only takes a few seconds and is totally free. You'll be able to ask questions about coding or chat with the community and help others.
Sign up now!