I am sending it again, since it didn't appear on the mailing list.<br><br>
<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> Dear group,<br>
<br>
I have a problem with importing MySQLdb in a cgi-script.<br>
The code fragment at the beginning:<br>
<br>
  1 #!/usr/bin/env python<br>
      2 <br>
      3 print "Content-Type: text/html\n\n"<br>
      4 <br>
      5 import re<br>
      6 import cgi<br>
      7 import MySQLdb<br>
8 print "something"<br>
<br>
but the print statement in line 8 will never be executed. The Apache error log says:<br>
"No module named MySQLdb, referer: <a href="http://localhost/sqlForm.html" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://localhost/sqlForm.html</a>"<br>
<br>
But when executing the import statement outside of an cgi-script, for example at the command line, the import works fine.<br>
I assume, it has something to do with the apache. Why does the python interpreter not find the MySQLdb module when executed in <br>
apache context?<br>
<br>
thanks, roebi<br>

</blockquote></div><br>