473,399 Members | 3,302 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Successful installation of mod_python on Apache on Win2k?

Has anyone had success getting mod_python to run on Apache on Win2K?
I'm writing up instructions on how to do this and need your help. When
completed, the instructions at the mod_python website and on
comp.lang.python crediting all those who contributed.
<p>
Here's what I've done so far - and where I get stuck:
<p>
1. I made default installations of the latest versions:
- apache_2.0.47-win32-x86-no_ssl.msi
- mod_python-3.0.3.win32.exe
<p>
2. I followed the installation/configuration instructions provided at
the end of the mod_python-3.0.3.win32.exe installation.
<p>
3. When I created and ran the following script shown at
http://www.modpython.org/live/curren...t-testing.html, my
browser displays the full text of the script instead of running the
script:
"from mod_python import apache

def handler(req):
req.write("Hello World!")
return apache.OK"

4. I've read Troubleshooting and FAQ, triple-checked my http.conf
file, and still can't get it to work.

ANY SUGGESTIONS?

Thanks,

Rolfe
Jul 18 '05 #1
2 1982
Rolfe wrote:
3. When I created and ran the following script shown at
http://www.modpython.org/live/curren...t-testing.html, my
browser displays the full text of the script instead of running the
script:
"from mod_python import apache

def handler(req):
req.write("Hello World!")
return apache.OK"

4. I've read Troubleshooting and FAQ, triple-checked my http.conf
file, and still can't get it to work.

ANY SUGGESTIONS?


This is my working conf (on Linux, though):

LoadModule python_module modules/mod_python.so

<Directory /usr/local/apache2/htdocs/test>
AddHandler python-program .py
PythonHandler mptest
PythonDebug On
</Directory>

/usr/local/apache2/htdocs/test/mptest.py works. If you have an
analogous conf, it might be an OS related issue.

Mit freundlichen Gruessen,

Peter Maas

--
-------------------------------------------------------------------
Peter Maas, M+R Infosysteme, D-52070 Aachen, Hubert-Wienen-Str. 24
Tel +49-241-93878-0 Fax +49-241-93878-20 eMail pe********@mplusr.de
-------------------------------------------------------------------

Jul 18 '05 #2
> From: Rolfe Dlugy-Hegwer [mailto:RDlugyHegwer at symmetricom dot com]
Sent: Thursday, September 25, 2003 7:53 PM
To: 'sholden at holdenweb dot com'
Subject: mod_python on Win2k question
Hi Steve,

I saw your thread on comp.lang.python: "I'm interested in installing
mod_python in two environments:1. Wind2000/Apache2"

Any joy getting mod_python to run on Win2k?
Oh, yes. To quote Stanley Unwin (of whom you've probably never heard)
"Deep joy in the fundimole".
I 1)downloaded fresh versions of apache and mod python, 2)made default
installations, 3)followed additional configuration
instructions for mod
python, 4) followed the tests recommended by mod_python
documentation, 5)
OK, well I [...] just downloaded the installer. I
had Python 2.2 installed, and I decided not to push the envelope by
recompiling for 2.3 (which I also had installed). I also chose the
somewhat older 3.0 mod_python, and then bolted the session and cookie
stuff on from the 3.1 alpha mod_python, which seems to work after a bit
of grotesque hacking an d one bug removal.
consulted the mod_python FAQ
and I can't get it to work. My browser displays the .py file
as text instead
of running it as a script.
It's probably the directory characteristics that need to change. If you
plan to use the publisher interface (probably about the most general
thing to do), you need to bear two things in mind:

1. Mod_python doesn't play well in script-aliased directories, so don't
try using your cgi-bin directory for mod_python scripts.

2. You'll need an .htaccess file that reads something like [ferkles in
/Inetpub/wwwroot/modpython ...] this:

DirectoryIndex index.py
AddHandler python-program .py
PythonHandler mod_python.publisher
PythonDebug On

Actually you don't need the DirectoryIndex line, and obviously you can
set up equivalent <Directory> lines in httpd.conf instread if you want.
I'm going find someone who has succeeded and will write up
instructions for
the mod_python FAQ and for comp.lang.python.

I'm sure that would be very useful. Let me know if this has helped! [...] ;-)

regards
--
Steve Holden http://www.holdenweb.com/
Python Web Programming http://pydish.holdenweb.com/pwp/
Interview with GvR August 14, 2003 http://www.onlamp.com/python/
Jul 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Patrick Useldinger | last post by:
Hi, I have the following configuration: - Apache 2.0.47 (win32) - mod_python 3.0.3 win32 - python 2.3 I have added the loadModule command for mod_python: "LoadModule python_module...
6
by: Piet | last post by:
Hi there, I cannot install mod_python v3.1.3 on either Win2k/ActivePython 2.3.2 or WinMe/Python 2.3.4. When I run the Windows installer, I get the following error message: Traceback (most recent...
0
by: Andrea Fiore | last post by:
Hello, i have compiled mod_python 2.7.10 on a Linux box with Apache 1.3.31, but after i restarted the web server, i had a strange warning that i did non understand.... ** bash-2.05b# apachectl...
0
by: Julien Cigar | last post by:
Hello, I'm using mod_python 3.1.3 with Apache 2.0.54 on a Debian box with the publisher handler and the Clearsilver template engine, and from time to time apache returns an 500 error code...
2
by: Robert J. Hansen | last post by:
I'm not entirely certain comp.lang.python is the proper newsgroup for mod_python questions, but "comp.lang.python.web" doesn't seem to exist, so... my apologies in advance if this is considered...
1
by: treelife | last post by:
I'm getting and internal server error when | run the following mod_python script. I am actually trying to run Django. Script: from mod_python import apache def handler(req):...
4
by: Gaurav Agarwal | last post by:
Hi, Am using WAMP5 and python 2.4.3. I tried to install mod_python 3.2.5 for python2.4. When i tried starting wamp, Firstly there was no error message in the apache error log. I saw error...
1
by: boney | last post by:
hello All, I am totally unknown to python language.. i need to install mod_python to embed python interpreter with the Apache server, in order to use Trac with Apache Web Server i am using...
5
by: m.banaouas | last post by:
Hi, bonjour, witch versions are suitable to use for apache & mod_python ? Can i install and use "Apache 2.2.3" & "mod_python 3.2.10" (most recent versions) without facing any known major...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.