473,790 Members | 3,200 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.pytho n 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("Hell o 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 2025
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("Hell o 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********@mplu sr.de
-------------------------------------------------------------------

Jul 18 '05 #2
> From: Rolfe Dlugy-Hegwer [mailto:RDlugyHe gwer 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.pytho n: "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.publ isher
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.pytho n.

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
10072
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 modules/mod_python.so", and the file is there.
6
3259
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 call last): File "C:\Programme\Python23\Scripts\win32_postinstall.py", line 86, in ? apachediroptions = getApacheDirOptions() File "C:\Programme\Python23\Scripts\win32_postinstall.py", line 45, in getApacheDirOptions
0
1043
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 configtest Loaded DSO /usr/libexec/apache/mod_python.so uses plain Apache 1.3 API, this module might crash under EAPI! (please recompile it with -DEAPI)
0
1607
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 (Internal Server Error). Apache errog.log file looks like : PythonHandler mod_python.publisher: Traceback (most recent call last): PythonHandler
2
2086
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 off-topic. I'm attempting to get mod_python 3.1.4/python 2.4.1 working on Apache 2.0.54 running under OS X. Apache was compiled from source with a simple /configure --enable-so --with-mpm=worker
1
4361
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): req.content_type = 'text/plain' req.write("Under Construction")
4
4674
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 message in windows event viewer : "The Apache service named Apache.exe reported the following error: before the error.log file could be opened.
1
2000
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 : Python 2.4.3,
5
3121
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 issue ? thanks for any help.
0
9512
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10419
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10201
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10147
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9023
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7531
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6770
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
3709
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2910
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.