Graham Dumpleton
graham.dumpleton at gmail.com
Thu Aug 16 18:05:53 EDT 2007
Apache/mod_python generally runs as a distinct user. Ensure that all the directories down to where the module is installed, plus the module file itself, are readable to others or appropriate group that Apache user runs as can access. Graham On 17/08/07, Zeljko Trogrlic <zeljko_t at post.htnet.hr> wrote: > 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 > > _______________________________________________ > Mod_python mailing list > Mod_python at modpython.org > http://mailman.modpython.org/mailman/listinfo/mod_python >
|