Problems Setting up Formmail

digitalimages

New Member
Messages
47
Reaction score
0
Points
0
I'm having issues with setting up form mail. The contact page is: here
This is a test site until all the site is finished then I will uplaod to the new host server.
I have set the cig-bin folder permissions to 755 and the formmail.cig to 644 but I get a message as follows

lscgid: execve():/home/w---s/public_html/citymar/cgi-bin/formmail.cgi: Permission denied
when I up the permissions to 755 and 755 I get the following X10 500 error

500 Error
An internal server error has occurred. Please try your request again momentarily.

  • File or directory permissions are set too high: Files should be 0644, directories 0755.
  • Problem with your .htaccess file.
  • A syntax error in a CGI script.
I have done this before but today things just are not working and I know that there is probably a very simple reason. But as one gets older (senior here) things seem to get more difficult.
Thanks in advance to anyone who can help me with this.



formmail.cgi
View attachment formmail_cgi.txt
htaccess file
View attachment htaccess.txt
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
CGI and Perl/Python are currently disabled on the Free Servers and there is no indication if or when they will ever be enabled again.
 

digitalimages

New Member
Messages
47
Reaction score
0
Points
0
thanks descalzo guess that could be some of my problems :biggrin:

so I guess the other option is php?
 
Last edited:

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
PHP is the only alternative.

Couple of things.
1. Content type of the mail must be text/plain. text/html will not get past the outgoing spam filter.
2. The From header must be set to an account on your domain. Again, anything else will probably get swallowed (silently) by the outgoing spam filters.
3. Using Google Apps and SMTP is an option, if you know how to set it up.
 
Last edited:

digitalimages

New Member
Messages
47
Reaction score
0
Points
0
Formmail using PHP coding error

I have set up my contact page using php and I had it working sending the email to my web mail and then forwarding it on to a second email account.
I changed the code as my form has an email field and a verify email field.
Now even if the email address is the same in both I get the message that they do not match form is here

I have attached the contact.php View attachment contact.php.txt

Thanks for any help
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
The PHP:
if(isset($_REQUEST['email']) || isset($_REQUEST['email2']))
{

if($_REQUEST['email'] != $_REQUEST['email2']){$errors[] = "Confirmar su correcta dirección de correo electrónico por favor";}

}

The Form:
<b>Por favor confirme su email:</b><br><input type="text" name="confirm email" /><br />

The names of the inputs do not match. It is best if there are no spaces in the text input names too.
 
Top