Premature end of script headers

I have the same script running on 2 domains “access.cgi”.
On one it works just fine, on the other I get the error:
Premature end of script headers: access.cgi
followed by:

I have opened both cgi files and other than the information that directs which directories to protect, they are the same. Permissions are the same. Domains are set up with the same settings. This is driving me crazy. Would anyone have an idea of what I might need to check to figure this out?