November 27, 2006
Technical Bleg
Ever since a disk crash last week, the Day by Day Database is not working. The problem is that when my Python scripts run, they can import the module MySQLdb. However, if I run interactively from the interpreter, I can import the module just fine. There is some difference in importing the module when I'm running a cgi-script vs. python nameofprogram.
It's running on a linux server (Apache) and the python version is 2.4.3. I'm stumped and the service provider is stumped. Any assistance would be greatly appreciated.
Posted by David Pinto at
03:12 PM
|
Blogs
|
TrackBack (0)
Your web process likely has a different environment than your interactive shell. The web environment is likely missing a relevant environment variable or path entry.
Try turning it off then on again:)
I don't know Python, but one thing I have noticed is that the db connect strings have changed over time; if the DB is actually on the same server, you might take a look at the connect environment vars.
So were any of the above correct?
No. The provider installed a new version of Python, but I was pointing at the old one.