It sounds like you are not spitting out the propper HTTP headrs.  At a very 
minimum you must give the "Content-type: " header, but you may need some 
other headers for your application.  Take a look at the original script and 
see what it prints before spitting out any "viewable" content.  I also 
recomend reading up on CGI scripting.

Jay

On Tuesday 09 April 2002 08:49 am, you wrote:
> I don't know if this is on topic. If not please advise me where I can get
> help on this.
>
> I am specifically working with DansGuardian. Out of the box it is working
> great. I am trying to replace the dansguardian.pl with one that fits our
> needs. The permissions are set to 755, but I get internal server errors. My
> apache error log says:
> [Tue Apr  9 08:24:21 2002] [error] (2)No such file or directory: exec
> of /var/www/cgi-bin/dansguardian.pl failed
> [Tue Apr  9 08:24:21 2002] [error] [client x.x.x.x] Premature end of script
> headers: /var/www/cgi-bin/dansguardian.pl
>
> If I rename the original script back to dansgurdian.pl everything works
> again.
>
>
> If I view the scripts via gnome the one that works looks like a piston, and
> the one that does not work looks like a document.
>
> Thanks in advance