Jump to content

Recommended Posts

Posted

I am trying to develop a CGI script in Perl which will process an HTML form and send an email message.

I need to know the proper Perl header and also the location of the Sendmail program. I'm fairly sure the Perl header should be #!/usr/local/bin/perl - is that right? I'm told the sendmail should be something like...

$mail_prog = '/usr/lib/sendmail'

 

Help!! Thanks in advance,

Brannon

Posted (edited)

Okay, set those locations as outlined above: and I'm getting this error message:

 

Internal Server Error

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

Please contact the server administrator, webmaster@premierbusinessdesigns.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.

 

I set the action to http://www.premierbusinessdesigns.com/cgi-bin/FormScript.cgi (with premierbusinessdesigns.com being my site, of course) Am I putting the file in the wrong location on the server, calling the action wrong or both?

 

 

I think its going to be a long day. :D

Edited by bconza
Posted

Did you upload the file in ASCII mode and did you change the permissions to 755?

 

And you form action should look something like this:

 

><form action="http://www.premierbusinessdesigns.com/cgi-bin/FormScript.cgi" method="post">

 

Case matters. So if your script is FormScript.cgi that should be fine.

Posted
Did you upload the file in ASCII mode and did you change the permissions to 755?

 

And you form action should look something like this:

 

><form action="http://www.premierbusinessdesigns.com/cgi-bin/FormScript.cgi" method="post">

 

Case matters. So if your script is FormScript.cgi that should be fine.

 

 

Uploaded in ASCII, permissions are 755 - and the case for FormScript.cgi is as indicated. When it comes to the coding - I am using Dreamweaver and editing the tags through there - so I have the action set as http://www.premierbusinessdesigns.com/cgi-bin/FormScript.cgi - and I have the method tag set to post.

Posted

Okay, kinda blew myself away here, but I figured it out! Had a tad of extraneous code for the sendmail - just tested it and it works, thanks for all of your help!!

Posted

Well without seeing the actual script it's going to be hard to help you debug it. The other times I get Internal Server errors is if I don't escape a quote when needed or @ in an email address.

 

Double check the entire script and make sure you have everything escaped that needs escaped and are ending your lines with a semi-colon.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...