configuring mxCGIPython
Mark McEahern
marklists at mceahern.com
Mon Apr 29 00:52:21 EDT 2002
I finally got cgipython to work. Since my ISP didn't have libxmlparse.so.1
and libxmltok.so.1, I had to do this:
1. Use a bash shell script as a wrapper to cgipython.
2. Upload these files to /bin in my account along with cgipython:
libxmlparse.so.1
libxmltok.so.1
This is also where I put my Python modules.
3. Put a .htaccess file in /bin to prevent web access:
<Limit GET>
order deny,allow
deny from all
</Limit>
2. In the shell script, set LD_LIBRARY_PATH and PYTHONPATH to /bin. This
is what the shell script looks like:
#!/bin/bash
bin=/home/<username>/bin
export LD_LIBRARY_PATH=$bin
export PYTHONPATH=$bin
PATH=$PATH:.
$bin/cgipython $bin/my.cgi
I really appreciate being able to use Python instead of having to resort to
Perl for this application.
Mark, thanks for all your help! I'd be happy to contribute to a
troubleshooting section on deploying cgipython--if you think that would be
useful.
Best,
// mark
More information about the Python-list
mailing list