ispCP - Board - Support
FormMail.pl? - Printable Version

+- ispCP - Board - Support (http://www.isp-control.net/forum)
+-- Forum: ispCP Omega Support Area (/forum-30.html)
+--- Forum: Usage (/forum-34.html)
+--- Thread: FormMail.pl? (/thread-11022.html)



FormMail.pl? - Qwalk - 06-21-2010 03:58 AM

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!


RE: FormMail.pl? - fluser - 06-21-2010 05:47 AM

Has the script executable rights (chmod 755 ) on it?


RE: FormMail.pl? - Qwalk - 06-21-2010 06:12 AM

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.


RE: FormMail.pl? - gOOvER - 06-21-2010 06:34 AM

Take à Look into your logfiles. Wink


RE: FormMail.pl? - fluser - 06-21-2010 07:13 AM

Maybe the path isn't correct Wink did it work before?


RE: FormMail.pl? - Qwalk - 06-21-2010 07:41 AM

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.


RE: FormMail.pl? - gOOvER - 06-21-2010 07:56 AM

Logs?? If you have an Error 500, then you have a logentry. Wink


RE: FormMail.pl? - Qwalk - 06-21-2010 07:57 AM

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


RE: FormMail.pl? - joximu - 06-21-2010 04:48 PM

next time also show the suexec.log

/J


RE: FormMail.pl? - Nuxwin - 06-21-2010 07:56 PM

(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.