ispCP - Board - Support
[Solved] Error 500: internal server error, for cgi-script. - Printable Version

+- ispCP - Board - Support (http://www.isp-control.net/forum)
+-- Forum: ispCP Omega Support Area (/forum-30.html)
+--- Forum: Usage (/forum-34.html)
+--- Thread: [Solved] Error 500: internal server error, for cgi-script. (/thread-5276.html)



[Solved] Error 500: internal server error, for cgi-script. - Neal - 12-29-2008 08:16 AM

Edit: Nevermind, used another code.

I have /cgi-bin/emailformreturn.cgi a 500 error. I don't know why.

The chmod is set to 755.

I made input forms, in a .html page in /htdocs/, click submit, and it goes to that page, and 500 error.


RE: Error 500: internal server error, for cgi-script. - joximu - 12-29-2008 09:26 AM

logs?

error.log from that domain and general and suexec.log?


RE: Error 500: internal server error, for cgi-script. - Neal - 12-29-2008 02:33 PM

Premature end of script headers: emailformreturn.cgi, referer: http://nealirc.org/emailform.html

What's suexec.log?


RE: Error 500: internal server error, for cgi-script. - joximu - 12-29-2008 05:18 PM

ok, premature end... may have several reasons.

are the rights (owner and permissions) ok?
are the files uploaded with ascii mode (or in binary mode) - better use ascii (text) because of line end: CRLF, LF, CR... Linux only uses (Windows has CRLF and Mac uses only CR).

/J


RE: Error 500: internal server error, for cgi-script. - Neal - 12-30-2008 01:13 AM

(12-29-2008 05:18 PM)joximu Wrote:  ok, premature end... may have several reasons.

are the rights (owner and permissions) ok?
The chmod is 755, which is what it's supposed to be.

joximu Wrote:are the files uploaded with ascii mode (or in binary mode) - better use ascii (text) because of line end: CRLF, LF, CR... Linux only uses (Windows has CRLF and Mac uses only CR).

/J
Hm, how do I check? And if it's binary, how do I convert?

There is no CR or LF in the .cgi file. I did a Ctrl F and scanned.


RE: Error 500: internal server error, for cgi-script. - rbtux - 12-30-2008 02:59 AM

run dos2unix (apt-get install tofrodos) on the file, check owner(!) and group(!), check if is executable, check if the shebang is correct... (#!/bin...)