configuring mxCGIPython

M.-A. Lemburg mal at lemburg.com
Thu Apr 25 16:28:57 EDT 2002


Mark McEahern wrote:
> 
> [Paul Boddie]
> > I found that it isn't always possible to deploy Python programs in a
> > cgi-bin directory and to use the above notation to persuade the
> > operating system to locate the Python executable. In the end, I used a
> > wrapper shell script for each of my Python programs.
> 
> Here's the wrapper shell script I'm using.  I'd be very interested in any
> feedback, suggestions you might have:
> 
>   #!/bin/bash
> 
>   echo content-type: text/plain
>   echo
> 
>   echo Trying to capture the stderr of cgipython
> 
>   if [ -f cgipython ]
>   then
>     echo cgipython exists
>     # Trying to send stderr to stdout.
>     ./cgipython test.py 2>&1
>   else
>     echo cgipython does not exist
>   fi
> 
> test.py, fwiw, is simply:
> 
>   import sys
>   print sys.version
> 
> When I run this, I get:
> 
>   Trying to capture the stderr of cgipython
>   cgipython exists
>   ./cgipython: error in loading shared libraries: libxmlparse.so.1: cannot
> open shared object file: No such file or directory
> 
> I'm not sure yet what that means yet, but I think it means I may be able to
> set LD_LIBRARY_PATH, if: 1) that file resides on the server; and 2) I know
> where it is.

Right.
 
> Is there a way I can tell cgipython not to bother loading that particular
> shared object?

No. Could be that libxmlparse is referenced by pyexpat which is part
of cgipython. On most systems the expat libs should be part
of the system, so setting LD_LIBRARY_PATH to e.g. /usr/lib
should help. If not, you can try getting that file from some
other source and install it in the same dir as cgipython.

-- 
Marc-Andre Lemburg
CEO eGenix.com Software GmbH
______________________________________________________________________
Company & Consulting:                           http://www.egenix.com/
Python Software:                   http://www.egenix.com/files/python/





More information about the Python-list mailing list