I was having problems getting script in Apache's cgi-bin path (/Library -> WebServer -> CGI-Executables) to run - I always received an error, despite the configuration and permissions being correct.
After reading the forums, the last message on this thread provided a somewhat obscure solution: Disabling mod_rendezvous; it worked! Not sure what conflict it causes, and probably moving the commands elsewhere in the config file might solve it, but if you're having problems and don't know why, give this a try.
Mac OS X Hints
http://hints.macworld.com/article.php?story=20030601144918361