[mod_python] Python scripts are showing source code

Nick Le Mouton noodles at planetslackers.com
Tue Apr 15 01:40:14 EDT 2008

I've been reading that page and followed it to the letter apart from adding
the PythonHandler and PythonDebug.

I don't really see how I'd need either of these to run a single script.


-----Original Message-----
From: Graham Dumpleton [mailto:graham.dumpleton at gmail.com] 
Sent: Tuesday, 15 April 2008 4:03 p.m.
To: Nick Le Mouton
Cc: mod_python at modpython.org
Subject: Re: [mod_python] Python scripts are showing source code

Try reading:



2008/4/15 Nick Le Mouton <noodles at planetslackers.com>:
> Hi all,
>  I'm new to python and mod_python and I'm trying to get a script to work
>  my install of Apache.
>  I've installed mod_python and I can see that it's installed in the
>  error_log:
>  [Tue Apr 15 13:26:44 2008] [notice] Apache/2.2.8 (Unix) mod_ssl/2.2.8
>  OpenSSL/0.9.7a PHP/5.2.5 mod_python/3.3.1 Python/2.3.4 configured --
>  resuming normal operations
>  I have added LoadModule python_module modules/mod_python.so in httpd.conf
>  As well as AddHandler mod_python .py
>  The script I'm trying to run is in the cgi-bin for apache,
>  /usr/local/apache2/cgi-bin/, this is also setup with ScriptAlias as per
>  default httpd.conf.
>  I'm running Apache 2.2.8 on Redhat Enterprise Linux 4. Apache is
>  from source, python and python-devel from rpm.
>  No matter what I do I still see the source code of the py file rather
>  it running.
>  Can anyone help?
>  Thanks
>  Nick
>  _______________________________________________
>  Mod_python mailing list
>  Mod_python at modpython.org
>  http://mailman.modpython.org/mailman/listinfo/mod_python

More information about the Mod_python mailing list