Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

mod_python error. Webpage displays .py source code

703653May 27 2009 — edited May 27 2009
Hello

I'm new to Python and I have a problem with mod_python. Firefox webpage displays source code of .py file instead of result. Could any one help me with this issue?

My versions are: RHEL 5, Oracle 10g, Python 2.6, mod_python 2, Apache 2.2

here is httpd.conf file's contents:

<Directory /usr/local/apache/htdocs/modules>
Options Indexes FollowSymLinks Multiviews
AllowOverride None
Order allow,deny
allow from all
AddHandler python-program .py
PythonHandler or1
PythonDebug On
</Directory>

and that's my Python source code (or1.py):

from mod_python import apache
def handler(rep)
req.content_type = 'text/plain'
req.write('Hello World')
return apache.OK

Comments

Processing
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jun 24 2009
Added on May 27 2009
1 comment
5,655 views