Monday, October 12, 2009

Path to python in Apache

One of my side projects has been developing a MySQL database that gets fed data from the web using Python, with a web front end. Since Python is feeding MySQL, I figured I'd use it as the server-side scripting language too, but from the beginning I've had problems. I kept coming up with the dreaded 500 Internal Server Error. After I'd restarted Apache all was well. I'd seen that in the httpd-error.log the error was 'Premature end of script headers', but for some reason today I noticed that wasn't the only error. The previous error always comes with "env: python: No such file or directory". That gives me something to go on. So it seems that Apache doesn't know the path to python. I saw something somewhere on the web about the path not being complete when apache was started, but I didn't see a fix--maybe just complete the path before starting Apache, eh? Anyway, I don't feel like running this to ground tonight--I'm bushed.

No comments:

Post a Comment