473,387 Members | 1,516 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,387 software developers and data experts.

mod_python config problem

i want to use mod_python with Apache2 and i made a .htaccess in the
subdirectory where i have all my scripts:

The .htacces goes like this:

AddHandler mod_python .py

PythonHandler mptest

PythonDebug On

and I changed the main configuracion file of Apache2 like this:

#--memepelle

<Directory /var/www/cgi>

AllowOverride FileInfo

</Directory>

#memepelle--

and i made a mptest.py that goes like this:

from mod_python import apache

def handler(req):

req.content_type = "text/plain"

req.write("Hello World!")

return apache.OK

But i still have this error and i don't know why

Mod_python error: "PythonHandler mptest"

Traceback (most recent call last):

File "/usr/lib/python2.4/site-packages/mod_python/apache.py", line 287,
in HandlerDispatch
log=debug)

File "/usr/lib/python2.4/site-packages/mod_python/apache.py", line 454,
in import_module
f, p, d = imp.find_module(parts[i], path)

ImportError: No module named mptest

Please some help!!!

Jul 19 '05 #1
1 1350
Getting mod_python to work is hard because there are many things to get
into account.
Your Apache version should match the proper mod_python version, as well
as the python version amd so on...
If you are having many problems, I suggest installing Apache2Triad,
which is a package that will install everything you need (and more) all
at once.

www.apache2triad.net

Jul 19 '05 #2

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

Similar topics

6
by: John Dean | last post by:
Hi I have set up httpd.conf according to installation and configuration instructions in the mod_python documentation. Yet when I enter the following URL http://localhost/test.py all I get is an...
2
by: Dan Gottlieb | last post by:
Hi, I realize that this is somewhat vague, but I'm not really sure what to do next. I'm trying to get Apache and mod_python set up on my windows XP box for testing purposes. I installed the...
2
by: digidalmation | last post by:
Hello all. I've been trying to get my linux server to run mod_python. It's a Mandrake 10 linux box, and apache/mod_python are installed from rpms. apache2-mod_python-2.0.48_3.1.3-1mdk...
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...
4
by: Python_it | last post by:
Today I was busy to install mod_python. I have put the line LoadModule python_module libexec/mod_python.so into the httpd.conf file. It Works! Apache load mod_python /3.2.2.b Python2.4
0
by: Manuzhai | last post by:
Hello there, I have this weird problem with a mod_python application. Recently I installed ElementTree and cElementTree through ez_setup.py, even though they were already installed normally...
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: lukasz.f24 | last post by:
Hello, I came across annoying problem during my fun with mod_python. I turned out that mod_python load package only onca and don't care about any changes to it. Obviously it makes sense on...
0
by: Ravi Kumar | last post by:
hi :) I was trying to develop a custom mod_python based web-site, just today. the problem I got though i liked the mod_python's feature of mapping and calling functions in python script by...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...

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.