in reply to Finding webserver error log

A technique that I've posted before is to write a short shell-script wrapper for your script. That will allow you to see whatever errors would normally go into the error log.
#!/bin/sh -x

printf "Content-type: text/plain\n\n"
exec 2>&1

./yourscript.cgi
echo "Exited with status $?"
Some hosting providers don't provide access to the error log, and with others it's enough of a pain that this is easier.