[mod_python] mod_python library problem

Zeljko Trogrlic zeljko_t at post.htnet.hr
Thu Aug 16 14:17:09 EDT 2007


Hello,
 
I am porting Python web application from Solaris to Linux. This 
application is using one C module. Module is accessible from command 
line interpreter, but if I try to import it in web application, I get:
 
[Fri Aug 17 09:03:55 2007] [error] [client xxx.xxx.xxx.xxx] 
PythonHandler mod_python.cgihandler: ImportError: No module named 
msmutil, referer: http://192.168.200.20/

I tried to (directory /opt/aaa/siem_aatv contains .so file):
 * export PYTHONPATH
 * add it through httpd.conf: PythonPath "sys.path + 
['/opt/mradius-common/lib/python','/opt/webconf/lib','/opt/aaa/siem_aatv']"
 * add it programatically: sys.path.append('/opt/aaa/siem_aatv')
but nothing works. Other non-C Python modules are found. If I try to 
print out sys.path, it is there:
 
for x in sys.path:
        sys.stderr.write(x);
        sys.stderr.write('\n');

Result:

/usr/lib/python23.zip
/usr/lib/python2.3
/usr/lib/python2.3/plat-linux2
/usr/lib/python2.3/lib-tk
/usr/lib/python2.3/lib-dynload
/usr/lib/python2.3/site-packages
/usr/lib/python2.3/site-packages/gtk-2.0
/opt/mradius-common/lib/python
/opt/webconf/lib
/opt/aaa/siem_aatv
 
Did somebody experienced such problem?

python-2.3.4-14.1
mod_python-3.1.3-5.1

Zeljko



More information about the Mod_python mailing list