Current time: 11-17-2024, 02:37 PM Hello There, Guest! (LoginRegister)


Post Reply 
[Solved] Error 500: internal server error, for cgi-script.
Author Message
Neal Offline
Junior Member
*

Posts: 10
Joined: Dec 2008
Reputation: 0
Post: #1
[Solved] Error 500: internal server error, for cgi-script.
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.
(This post was last modified: 12-31-2008 04:19 AM by Neal.)
12-29-2008 08:16 AM
Find all posts by this user Quote this message in a reply
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #2
RE: Error 500: internal server error, for cgi-script.
logs?

error.log from that domain and general and suexec.log?
12-29-2008 09:26 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Neal Offline
Junior Member
*

Posts: 10
Joined: Dec 2008
Reputation: 0
Post: #3
RE: Error 500: internal server error, for cgi-script.
Premature end of script headers: emailformreturn.cgi, referer: http://nealirc.org/emailform.html

What's suexec.log?
(This post was last modified: 12-29-2008 02:35 PM by Neal.)
12-29-2008 02:33 PM
Find all posts by this user Quote this message in a reply
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #4
RE: Error 500: internal server error, for cgi-script.
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
12-29-2008 05:18 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Neal Offline
Junior Member
*

Posts: 10
Joined: Dec 2008
Reputation: 0
Post: #5
RE: Error 500: internal server error, for cgi-script.
(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.
12-30-2008 01:13 AM
Find all posts by this user Quote this message in a reply
rbtux Offline
Moderator
*****
Moderators

Posts: 1,847
Joined: Feb 2007
Reputation: 33
Post: #6
RE: Error 500: internal server error, for cgi-script.
run dos2unix (apt-get install tofrodos) on the file, check owner(!) and group(!), check if is executable, check if the shebang is correct... (#!/bin...)
12-30-2008 02:59 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)