Uploading and using CGI Language

advaudit

New Member
Messages
9
Reaction score
0
Points
0
Hi all,

I am trying to conduct a survey for one of my classes in University (pretty obvious which class huh?)

Because my survey includes confidential datas, I attempted to make an mail form using html. Then I used a CGI program to mail it to me.

Here are few questions that I could use helps in:
1) what's the path to perl? my domain is x10hosting.com and server name is Cossacks.x10

2) what is the permission for CGI program in this host? I used 755 to start out, but it didn't work.

3) is there a sendmail program in this host? If so, what is it?

Thanks!
 

advaudit

New Member
Messages
9
Reaction score
0
Points
0
Heres more details:

I am attempting to use a send-form cgi for the following form.
http://michinorikaneko.x10hosting.com/html/form.html

The path to cig is http://michinorikaneko.x10hosting.com/cgi-bin/survey/cgi/novice.cgi

The perl Path on the cgi script itself is #!/usr/bin/perl
the CGI permission is set to 755.

I have no clue what the sendmail program's path is, so the current path is
$mailprog = "http://michinorikaneko.x10hosting.com/sendmail";

When i click submit button on the form, it gives me an 500 internal server error with the following message:

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@michinorikaneko.x10hosting.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Can anyone help me out making this thing work? Thank you
 

advaudit

New Member
Messages
9
Reaction score
0
Points
0
Thank you for the tip, i've changed the path to
$mailprog = "/usr/sbin/sendmail";

But my form is still not working... any tips? :(
 

martin_f

New Member
Messages
4
Reaction score
0
Points
0
Check line ends LF or CR/LF.
Try "Edit" your script by cPanel -> File Manager and simpy click "Save" without real editing. Internal editor convert line ends to properly format.
 

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
Points
48
Make sure your script prints an appropriate "Content-type" header before anything else.

When asking about code, you should post a minimal test case. It's very hard to answer questions about code sight unseen.
 
Top