Current time: 12-25-2024, 03:44 AM Hello There, Guest! (LoginRegister)


Post Reply 
FormMail.pl?
Author Message
Qwalk Offline
Junior Member
*

Posts: 31
Joined: Jun 2010
Reputation: 0
Post: #1
FormMail.pl?
Hi.

I'm trying to use FormMail to domains on the webserver.

I place the file in the cgi-bin folder of the domain, but when calling it in a form, i get a:

Code:
"Error 500!
/cgi-bin/FormMail.pl
Internal Server Error!"

My form looks like this:

Code:
<form action="http://domain.com/cgi-bin/FormMail.pl" method="post">

<input name="recipient" type="hidden" value="info@domain.com" />

<input name="subject" type="hidden" value="Mail from contactform on domain.com" />

<input name="redirect" type="hidden" value="http://domain.com" />

Name <br /> <input class="forminput" name="Name" size="50" /> <br />

Mail address <br /> <input class="forminput" name="Mailaddress" size="50" /> <br />

Message <br /> <textarea class="formtextarea" name="Message"></textarea>

<input class="buttons" type="submit" value="Send" />

<input class="buttons" type="reset" value="Reset fields" />

</form>

CGI / Perl support is enabled on the domain.

Any ideas? Any help is appreciated.

Thanks in advance!
06-21-2010 03:58 AM
Find all posts by this user Quote this message in a reply
fluser Offline
Documentation Team
***
Docu Team

Posts: 246
Joined: May 2010
Reputation: 1
Post: #2
RE: FormMail.pl?
Has the script executable rights (chmod 755 ) on it?
06-21-2010 05:47 AM
Find all posts by this user Quote this message in a reply
Qwalk Offline
Junior Member
*

Posts: 31
Joined: Jun 2010
Reputation: 0
Post: #3
RE: FormMail.pl?
Hi,

Yes it has, I even tried with 777. Still get an "Internal Server Error".
The only change I've made in the file is:

@referers = ('domain.com','my.ip.address');

Otherwise its default settings.
(This post was last modified: 06-21-2010 06:16 AM by Qwalk.)
06-21-2010 06:12 AM
Find all posts by this user Quote this message in a reply
gOOvER Offline
Banned

Posts: 3,561
Joined: Jul 2007
Post: #4
RE: FormMail.pl?
Take à Look into your logfiles. Wink
06-21-2010 06:34 AM
Visit this user's website Find all posts by this user Quote this message in a reply
fluser Offline
Documentation Team
***
Docu Team

Posts: 246
Joined: May 2010
Reputation: 1
Post: #5
RE: FormMail.pl?
Maybe the path isn't correct Wink did it work before?
06-21-2010 07:13 AM
Find all posts by this user Quote this message in a reply
Qwalk Offline
Junior Member
*

Posts: 31
Joined: Jun 2010
Reputation: 0
Post: #6
RE: FormMail.pl?
No the path is fine, the FormMails readme file sais to put the FormMail.pl in the cgi-bin folder of the domain, and I did. Can't figure out what it is.

No didn't work before. Its a new setup, just starting to use ispCP.
06-21-2010 07:41 AM
Find all posts by this user Quote this message in a reply
gOOvER Offline
Banned

Posts: 3,561
Joined: Jul 2007
Post: #7
RE: FormMail.pl?
Logs?? If you have an Error 500, then you have a logentry. Wink
06-21-2010 07:56 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Qwalk Offline
Junior Member
*

Posts: 31
Joined: Jun 2010
Reputation: 0
Post: #8
RE: FormMail.pl?
What log? There are so many. Smile
Code:
IP... - - [21/Jun/2010:00:07:17 +0200] "GET /index.php?page=contact HTTP/1.1" 200 1426 "http://mydomain.com/" "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 (.NET CLR 3.5.30729)"
IP... - - [21/Jun/2010:00:07:18 +0200] "POST /cgi-bin/FormMail.pl HTTP/1.1" 500 468 "http://mydomain.com/index.php?page=contact" "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 (.NET CLR 3.5.30729)"

This is what I get from:
pub01:/var/log/apache2# cat mydomain.com-combined.log
My apache error log shows the following:

Code:
[Sat Jun 19 18:25:26 2010] [notice] Apache/2.2.9 (Debian) configured -- resuming normal operations
[Sat Jun 19 18:32:16 2010] [notice] caught SIGTERM, shutting down

UPDATE:

I've tried to delete the cgi-bin folder from the webroot, created it again, uploaded the .pl script as ASCII after editing it in notepad and giving the file 755 permissions. Now it works.

I don't know why it failed so many times. I'm gonna try it on a new domain again and I'm hoping it works.

Thanks for your help and time.

Qwalk
(This post was last modified: 06-21-2010 08:44 AM by Qwalk.)
06-21-2010 07:57 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: #9
RE: FormMail.pl?
next time also show the suexec.log

/J
06-21-2010 04:48 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Nuxwin
Unregistered

 
Post: #10
RE: FormMail.pl?
(06-21-2010 03:58 AM)Qwalk Wrote:  I place the file in the cgi-bin folder of the domain, but when calling it in a form, i get a:

Code:
"Error 500!
/cgi-bin/FormMail.pl
Internal Server Error!"

Thanks in advance!

Hello,

What is the header that is send ?

The first line of our CGI script must be 'Content-Type: text/html' and the print statement must have 2 EOL --> \n characters:

Example:

Code:
print "Content-Type: text/html\n\n";

Without this, you will get an errorr 500 all the time.
06-21-2010 07:56 PM
Quote this message in a reply
Post Reply 


Forum Jump:


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