You have to read httpd/error_log to determine what the problem is. Just saying "it doesn't work" isn't sufficient for anyone to help you solve the problem.
"POST /cgi-bin/mail_ht.pl HTTP/1.1" 500 543 "http://ddj.homelinux.com/contact.html" "Mozilla/5.0 (Windows NT 6.1; rv:21.0) Gecko/20100101 Firefox/21.0"
[Sat Jun 22 19:32:58 2013] [error] [client 192.168.0.1] (2)No such file or directory: exec of '/home/e-smith/files/ibays/Primary/cgi-bin/mail_ht.pl' failed, referer: http://ddj.homelinux.com/contact.html[Sat Jun 22 19:32:58 2013] [error] [client 192.168.0.1] Premature end of script headers: mail_ht.pl, referer: http://ddj.homelinux.com/contact.html
No such file or directory: exec of '/home/e-smith/files/ibays/Primary/cgi-bin/mail_ht.pl' failed, referer: http://ddj.homelinux.com/contact.html
total 20drwxr-xr-x 5 root root 4096 Jun 21 20:43 .drwxr-xr-x 5 root root 4096 Jun 20 22:01 ..drwxr-xr-x 2 root root 4096 Jun 23 09:29 cgi-bindrwxr-s--- 2 admin shared 4096 Aug 1 2012 filesdrwxr-s--- 3 admin shared 4096 Jun 23 16:07 html
total 24drwxr-xr-x 2 root root 4096 Jun 23 09:29 .drwxr-xr-x 5 root root 4096 Jun 21 20:43 ..-rwxr-xr-x 1 root root 13937 Jun 21 20:44 mail_ht.pl
ls -l /home/e-smith/files/ibays/Primary/cgi-bin/mail_ht.pl
-rwxr-xr-x 1 root root 13937 Jun 21 20:44 /home/e-smith/files/ibays/Primary/cgi-bin/mail_ht.pl
file /home/e-smith/files/ibays/Primary/cgi-bin/mail_ht.pl
/home/e-smith/files/ibays/Primary/cgi-bin/mail_ht.pl: perl script text executable
/home/e-smith/files/ibays/Primary/cgi-bin/mail_ht.pl
-bash: /home/e-smith/files/ibays/Primary/cgi-bin/mail_ht.pl: /usr/bin/perl^M: bad interpreter: No such file or directory
dos2unix -o /home/e-smith/files/ibays/Primary/cgi-bin/mail_ht.pl
Hi,Your problem is that the perl script has windows style lines endings (carriage return + line feed)You can fix it by running:Code: [Select]dos2unix -o /home/e-smith/files/ibays/Primary/cgi-bin/mail_ht.pl
dos2unix /home/e-smith/files/ibays/Primary/cgi-bin/mail_ht.pl
One question, what should I use to edit these files on a Windows PC? Is there anyway I can prevent this from happening next time?