By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,002 Members | 1,171 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,002 IT Pros & Developers. It's quick & easy.

need help with mod_python in RH 9

P: n/a
Hi all,

I use apache2.0, mod_python 3.0, and python2.2.2. In
/etc/httpd/conf.d/python.conf, I added following (as I
read in the manual)

<Directory /var/www/html/htdocs>
AddHandler python-program .py
PythonHandler mptest
PythonDebug On

and create under directory
/var/www/html/htdocs, (as I read in the manual)
from mod_python import apache
def handler(req):
req.write("Hello World!")
return apache.OK

when I use url, I get the
code listing. Apache doesn't execute the file.

Could somebody tell me how to tell apache to execute
the code.

__________________________________________________ __
Yahoo! Sports
Rekindle the Rivalries. Sign up for Fantasy Football
Jul 19 '05 #1
Share this Question
Share on Google+
2 Replies

P: n/a

It addresses the more common problems and how to sort out what you
may not have done right.

Anyway, I don't seem to see any problems with what you have said
you have done, so work through the referenced document. Especially
look through the Apache logs as described to ensure that Apache
has been restarted and mod_python loaded correctly.


Jul 19 '05 #2

P: n/a
Oh, one minor thing. Your content type should be "text/plain" and
not "text/html" as you aren't returning HTML This isn't going to be
causing the problem you are seeing though.


Jul 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.