Fred wrote:
> Here is the complete error from my Apache error log:
> 
> Traceback (most recent call last):
>   File "/var/www/cgi-bin/mysqld_script_test.py", line 7, in ?
>     import MySQLdb
> ImportError: No module named MySQLdb
> [Thu Jan 26 07:25:16 2006] [error] [client 127.0.0.1] malformed header
> from script. Bad header=['/var/www/cgi-bin', '/usr/lib:
> /var/www/cgi-bin/mysqld_script_test.py
> 
I think you can ignore this error: it's happening because of your debug 
output of syst.path, which presumably takes place before the script 
prints out

"""Content-Type: text/html

"""
or similar.

If your program doesn't do that it'll likely not produce what you expect 
anyway.

Finally, you might want to think about adding

import cgitb; cgitb.enable()

to your existing scripts. This will give you a much more acceptable 
traceback from web conditions.

regards
  Steve
-- 
Steve Holden       +44 150 684 7255  +1 800 494 3119
Holden Web LLC                     www.holdenweb.com
PyCon TX 2006                  www.python.org/pycon/

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to