in reply to Re: CGI script gives "internal server error"
in thread CGI script gives "internal server error"

default file that comes with apache is running fine.

I have put shebang line but script still gives same error

If I run this script from cmd line, how will perl interprete header message ? If I send a request, then server will take care of the header message. Anyways, I tried to run script from cmd line and got error message

"C:\Program Files\Apache Group\Apache2\cgi-bin>perl server_info.cgi

Can't find string terminator "END_OF_HTML" anywhere before EOF at server_info.cgi line 3.

  • Comment on Re^2: CGI script gives "internal server error"

Replies are listed 'Best First'.
Re^3: CGI script gives "internal server error"
by Crackers2 (Parson) on Mar 03, 2009 at 21:49 UTC
    I think you need a newline after the END_OF_HTML, otherwise perl won't recognize it as the heredoc terminator.
      Thanks, you are right. After putting new line after the "END_OF_HTML" , the script is working fine.
      This worked for me. Could't get cgi script with here doc to work (500 error - put new line after the EOF identifier, and it worked.
      Thank you all guys. Problem is solved. I changed print command from "print <<END_OF_HTML" to print qq{ } and the script is working fine now. Now the question is why wd it not work with "END_OF_HTML" ?