[Tutor] import MySQLdb problem
helena bhaska
helena_b2001 at yahoo.com
Mon Dec 29 17:34:55 EST 2003
Hi,
I realize that this has already been discussed, but I
am unable to solve the following problem:
I am trying to import MySQLdb in a script that is
running on apache server.
The proposed solutions mentioned writing a wrapper
shell script that would set LD_LIBRARY_PATH variable
before executing python script. However, my script is
not executed from command prompt, it is called through
urllib.urlopen() and I am not sure how to go to shell
script from this.
I have tried using SetEnv and PassEnv in httpd.conf in
apache, but that did not fix the problem, the behavior
was exactly the same as before. (ImportError: No
module named MySQLdb).
I am probably misunderstanding how to use
LS_LIBRARY_PATH, I assumed that I was supposed to give
path to where MySQLdb is, so here is what I have done:
SetEnv LD_LIBRARY_PATH
/usr/local/lib/python2.3/site-packages/
PassEnv LD_LIBRARY_PATH
site-packages contain MySQLdb subdir.
So is there a way to call a shell script though
urllib.urlopen() or should httpd.conf be modified, and
if so what am I doing wrong?
Thank you very much!
-Helena
__________________________________
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/
More information about the Tutor
mailing list