[Tutor] python scripts with apache HELP needed

Bob Gailer bgailer at alum.rpi.edu
Sun Dec 10 22:24:09 CET 2006


Joseph John wrote:
> Hi
>    I am facing some problems in python
> I want to run some python script , with httpd
>
>  In my system I have mod_python installed and I have in
> /etc/httpd/conf.d , python.conf
> which shows
> #
> # Mod_python is a module that embeds the Python language interpreter
> # within the server, allowing Apache handlers to be written in Python.
> #
>
> LoadModule python_module modules/mod_python.so
>
> # Override type-map handler for /var/www/manual
> <Directory "/var/www/manual/mod/mod_python">
>         <Files *.html>
>                 SetHandler default-handler
>         </Files>
> </Directory>
I wish I could help. My mod_python config setup is different than yours, 
and it works. FWIW I've extracted everything from conf that might apply:
-----------------------------------------------------
<Location /mpinfo>
    SetHandler mod_python
    PythonHandler mod_python.testhandler
</Location>

#python config
LoadFile python\bin\python23.dll
LoadModule python_module modules/mod_python.so
<IfModule mod_python.c>
AddHandler python-program .spy
PythonHandler run_spyceModpy::spyceMain
AddHandler mod_python .psp
PythonDebug On
</IfModule>

<Directory "h:/apache2triad/htdocs/output">
    AddHandler mod_python .py
    PythonHandler mptest
    PythonDebug On
</Directory>
-----------------------------------------------------

>
>  rpm -qa | grep python  gives the result
> libxml2-python-2.6.16-6
> python-sqlite-1.1.6-1
> gnome-python2-2.6.0-3
> dbus-python-0.22-12.EL.5
> python-urlgrabber-2.9.6-2
> rpm-python-4.3.3-13_nonptl
> mod_python-3.1.3-5.1
> gnome-python2-bonobo-2.6.0-3
> python-2.3.4-14.1
> python-elementtree-1.2.6-4
> gnome-python2-canvas-2.6.0-3
>
>
>        But my scripts when accessed through the web page , does not 
> execute
>            Please Guide
>                Thanks
>                   Joseph John
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
>   


-- 
Bob Gailer
510-978-4454



More information about the Tutor mailing list