[mod_python] Installing mod_python (newbie)

Philippe C. Martin pmartin at snakecard.com
Tue Oct 18 14:39:41 EDT 2005


Hi,

I also noticed that the localhost/mp pages shows "Apache/2.0.55 (Unix) 
mod_python/3.2.0b Python/2.4.2 Server at 127.0.0.1 Port 80" at the bottom.

Index of /mp

Icon  Name                    Last modified      Size  Description[DIR] Parent 
Directory                             -   
[DIR] hide/                   18-Oct-2005 17:47    -   
[   ] index.py                18-Oct-2005 18:38  173   

Apache/2.0.55 (Unix) mod_python/3.2.0b Python/2.4.2 Server at 127.0.0.1 Port 
80

Also, I changed index.py to a much simpler script (but still no go):

from mod_python import apache

def handler(req):
    
    req.content_type = "text/plain"
    req.send_http_header()
    req.write("Hello World!")
    
    return apache.OK

Regards,

Philippe




On Tuesday 18 October 2005 06:16 pm, Philippe C. Martin wrote:
> Thanks, I appreciate the help.
>
> As I have tried a few things, my httpd.conf has changed some (changes
> included at the end of this email: complete file bounces the email: too
> big).
>
> PS: I'm also using DSO as I have not managed to get the static version to
> configure, configure kept looking for config files/dirs in
> /usr/local/apache2 while I have apache installed in /usr/local - so I
> creation some symbolic link (conf, logs, icons) in /usr/local/apache2: I
> used to have apache pre-compiled but recompiled it for the above problem.
>
> ********* START - SATIC LINK*************
> ./configure --with-apxs=/usr/local/apache2/bin/
> --with-apache=/home/philippe/downloaded/httpd-2.0.55/
> checking for gcc... gcc
> checking for C compiler default output file name... a.out
> checking whether the C compiler works... yes
> checking whether we are cross compiling... no
> checking for suffix of executables...
> checking for suffix of object files... o
> checking whether we are using the GNU C compiler... yes
> checking whether gcc accepts -g... yes
> checking for gcc option to accept ANSI C... none needed
> checking for ar... ar
> checking for a BSD-compatible install... /usr/bin/install -c
> checking whether make sets $(MAKE)... yes
> checking for main in -lm... yes
> checking for an ANSI C-conforming const... yes
> checking your blood pressure... a bit high, but we can proceed
> configure: checking whether apxs is available...
> checking for --with-apxs... /usr/local/apache2/bin/ executable, good
> checking Apache version... ./configure: line 1: /usr/local/apache2/bin/: is
> a directory
> ./configure: line 1: /usr/local/apache2/bin/: is a directory
> ./configure: line 1: /: is a directory
>
> configure: error: This version of mod_python only works with Apache 2. The
> one you have seems to be .
>
> ******** END ***************
> The problem is that when I try to browse localhost/mp, I get a list of
> files.
>
> ******* START localhost/mp *********
> [   ] PyFontify.py            17-Jan-2004 01:27  4.3K  
> [DIR] images/                 16-Jan-2004 23:31    -  
> [   ] index.py                17-Jan-2004 01:50  3.4K  
> [   ] index.pyc               16-Jan-2004 23:31  4.1K  
> [   ] psp_site.tgz            18-Oct-2005 12:59   22K  
> [DIR] psp_site/               18-Oct-2005 12:59    -  
> [   ] py2html.py              17-Jan-2004 01:27   13K  
> [DIR] styles/                 16-Jan-2004 23:31    -  
> [DIR] templates/              17-Jan-2004 01:29    -  
> [   ] view.py                 17-Jan-2004 04:07  726  
>
> ******* END *********
>
>
> This is the top of index.py (which I got from the mod_python site I
> believe)
>
> ******* START - config file*********
> [SNIP]
>
>
> LoadModule python_module /usr/local/modules/mod_python.so
> #AddHandler mod_python .py
>
>
> [SNIP]
> <Directory "/var/www/html/mp">
>       #AddHandler mod_python .py
>       #PythonHandler mod_python.publisher
>       AddHandler python-program .py
>       PythonHandler index.py
>       PythonDebug On
> </Directory>
> [SNIP]
>
> On Tuesday 18 October 2005 05:13 pm, Jorey Bump wrote:
> > Philippe C. Martin wrote:
> > > Hi,
> > >
> > > I am trying to install mod_python from source.
> > >
> > > I tried to follow the INSTALL as well as comments at the end of make
> > > install (including modyfing httpd.conf).
> > >
> > > Yet when I get to my test directory, I just get the directory
> > > structure.
> > >
> > > This is the error_log (I'm not sure this is an error)
> > >
> > > [Tue Oct 18 16:10:41 2005] [notice] mod_python: Creating 8 session
> > > mutexes based on 150 max processes and 0 max threads.
> > > [Tue Oct 18 16:10:41 2005] [notice] Apache/2.0.55 (Unix)
> > > mod_python/3.2.0b Python/2.4.2 configured -- resuming normal operations
> >
> > These aren't errors and they indicate that mod_python is installed
> > correctly. Show your configuration, your test module, and provide a more
> > detailed description of your problem.
> > _______________________________________________
> > Mod_python mailing list
> > Mod_python at modpython.org
> > http://mailman.modpython.org/mailman/listinfo/mod_python

-- 
*************************************
Philippe C. Martin
SnakeCard, LLC
www.snakecard.com
+1 405 694 8098
*************************************



More information about the Mod_python mailing list