markus.hillebrand at apis-group.net
markus.hillebrand at apis-group.net
Thu Jul 19 14:47:07 EST 2001
On 19-Jul-01 Tom Emerson wrote: > markus.hillebrand at apis-group.net writes: >> I tried to bring mod_python and MySQLdb together, >> but I crashed on some problems. > > This works very well. Fine to hear that, so my tries are making sense ;) >> First of all: mod_python runs quite fine. >> Also MySQLdb runs quite well. >> >> But when I try to import MySQLdb from a python-script >> that was invoked by mod_python I get a >> >> ImportError: _mysql: init failed >> (whole error message is in the attachement) > > Check your Python load path within mod_python, and make sure that the > directory containing the MySQLdb modules is there. Also make sure that > the MySQLdb shared object can be found in the library search path. I did this already and I created a script, that I started with mod_python and I called oRequest.write( str( imp.find_module("MySQLdb"))) Result:(None,'/opt/<...>/site-packages/MySQLdb' , ('', '',5)) oRequest.write( str( imp.find_module("_mysql"))) Result:(,'/opt/<...>/sitepackages/_mysql.so', ('.so', 'rb',3)) I think I have another problem. But which one? Maybe my special configuration does not work, may you tell me yours, Tom? -- Markus Hillebrand, Dipl.Inf.(FH), Software-Engineer Apis networks GmbH, Kronstadter Str. 11, 81677 Muenchen, Germany Tel.: +49 (089) 357147-23 ; eMail: markus.hillebrand at apis-group.net
|