I am having problems with executing a python script from a browser. My script is simple as follows,
cameron_toll.py
#!/usr/bin/env python
print "Content-type: text/html\n\n";
import mapnik
print "Done"
The permissions are as follows,
-rwxrwxrwx 1 www-data www-data 77 2011-11-28 12:59 cameron_toll.py
drwxrwsr-x 2 antony antony 4096 2011-11-28 10:42 cgi-bin
I have also tried setting "antony antony" to the cameron_toll.py but still does not work. My error log file is,
[Mon Nov 28 14:36:43 2011] [error] [client 92.27.17.145] suexec policy violation: see suexec log for more details
[Mon Nov 28 14:36:43 2011] [error] [client 92.27.17.145] Premature end of script headers: cameron_toll.py
the script runs fine from my shell window which means that python is ok and mapnik is imported fine.
Any ideas or suggestions would be extremely appreciated.
Ok, I think I have got it. It was a permission error indeed. I had a user misconfiguration. The User did not have rights to execute..