MySQLdb and mod_python issue

Steve Holden steve at holdenweb.com
Wed Sep 27 08:53:40 CEST 2006


Alvin Delagon wrote:
> I have a mod_python script that is always crash while connecting to 
> mysql server. Here's a dump of the apache error log:
> 
> [Wed Sep 27 13:27:42 2006] [notice] mod_python: (Re)importing module 
> 'test' with path set to '['/var/www/html/XBox2']'
> [Wed Sep 27 13:27:42 2006] [notice] child pid 27793 exit signal 
> Segmentation fault (11)
> 
> MySQLdb works well on the command line version of my application. Anyone 
> know how to fix this? It dies on the line where MySQLdb.connect () is 
> called. Thanks in advance.
> 
With an error like that it seems possible you've installed a mismatched 
version of MySQLdb on your web server. Servers are frequently not 
running the latest version of Python - did you just copy the extension 
fro your desktop machine to the server?

Your output implies that there's only one directory on the path - could 
it be that you've overwritten sys.path, making all Python modules invisible?

Other possibilities include a different server environment, but a 
segfault is a pretty serious indication of error, so I'd make sure 
everything is version matched before you look elsewhere.

regards
  Steve
-- 
Steve Holden       +44 150 684 7255  +1 800 494 3119
Holden Web LLC/Ltd          http://www.holdenweb.com
Skype: holdenweb       http://holdenweb.blogspot.com
Recent Ramblings     http://del.icio.us/steve.holden




More information about the Python-list mailing list