I had the same problem while I was running a perl script.
I got the 500 error, and found this in my apacha logfile:
[Fri Mar 1 01:55:15 2002] [error] (2)No such file or directory: exec of /home/celeb/www/cgi-bin/oms.pl failed
[Fri Mar 1 01:55:15 2002] [error] [client 10.0.0.150] Premature end of script headers: /home/celeb/www/cgi-bin/oms.pl
The strangest thing is, when I added any directive in my oms.pl file, everything did worked again. When I just used plain #!/usr/bin/perl in my file, I got the 500 error back.
What was the problem? I develop my perl script under Windows 4 Kids (XP) in UltraEdit and write them to my linux box via Samba in the local directory. What happens under Windows when you Copy & Paste a file, it converts the Original!! file to DOS-format ($d$a / 0x13 0x10) When I converted the file format back to Unix , the 500 error was gone 🙂