Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



Closed Thread
CGI/Perl form script giving error
Old 03-15-2008, 10:28 PM CGI/Perl form script giving error
Junior Talker

Posts: 1
Name: Kim Abbott
Trades: 0
I'm new here, and I've joined in the hopes that someone can help a very inexperienced web designer.

Short background is I was asked to redesign a site for a non-profit group my aunt and uncle are a part of. I agreed, and set about creating something more user-friendly than the Front Page disaster they had at the time. Once I was ready to load the new page, I made room for the new files by deleting some old folders (first mistake). The new page was loaded and I discovered that the application form was no longer working. Apparently, I accidentally deleted the cgi files that control the form handling.

After discovering the problem, I've set about trying to make new scripts, but I'm very hindered by my lack of knowledge. I have found a script that seemed easy, and edited it, but when I try to test it on two different servers, I get two problems. My goal is to have the form data collected, edited to be easy to read and sent to an email, while the user is given a thank you page.

On my personal site (through Yahoo Geocities), I fill out the form with some test data, hit submit and it brings up the "thank you" html I wrote for the user to see. However, I never get an email in my inbox. I do not get an error message with it, but no emails ever come.

The form is located at www.kabbottdesign.com/apptest.html
The script I use is this http://kabbottdesign.com/test.pl.txt

On the site that will host the form, when I use the same script, I get this error:
Method Not Allowed

The requested method POST is not allowed for the URL /test.cgi.
Apache/1.3.27 Server at www.wbmonline.org Port 80


I have spoken with the hosting company and they said that perl is enabled, so I should not be receiving this error because of any server setting problems.

The form on this server is located at www.wbmonline.org/testing.html
The script is at http://www.wbmonline.org/test.cgi

I apologize for this being so long, but I wanted to give as much background and detail as possible. As I said, I'm not very knowledgeable in this at all, so this problem really has hit me in a hard spot. Many many thanks in advance for any help at all anyone can provide.
beyondtherapy is offline
View Public Profile
 
 
Register now for full access!
Old 03-18-2008, 07:51 AM Re: CGI/Perl form script giving error
Skilled Talker

Posts: 77
Trades: 0
If it is working on one site & not another - there is something wrong with the second server, probably a configuration of some sort.

However, I see one major problem - you don't validate any of the form input before sending it. This is a gaping hole in which spammers can take advantage of... you should validate some/all of those inputs.

As far as your "POST" problem - your script is not executing - it's printing out as a text file when you load it into a browser, which is (I assume) why the POST method isn't allowed.

If you can run CGI scripts outside of the cgi-bin, add something like this to the .htaccess file:

Code:
Options +ExecCGI ExecCGI
AddHandler application/x-httpd-cgi .pl .cgi
But, you may have to place the test.pl within the cgi-bin in order to get the file to execute for you, then just update your form path & try that out.
__________________

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE
whooligan is offline
View Public Profile
 
Old 04-13-2008, 06:24 PM Re: CGI/Perl form script giving error
Skilled Talker

Posts: 55
Name: Tobias Eichner
Location: Germany
Trades: 0
Have you also checked your script installation for the common mistakes ?

1. Scripts uploaded in binary (automatic) mode via FTP. Always use ASCII/text.
2. Permissions set correctly (755 or 775).
3. Uploaded in a directory that can execute CGI scripts (usually /cgi-bin).

Also may it possible that your webhoster has installed some kind of CGI firewall/security application ? Ask them to check this and whitelist your scripts.
__________________
Business consulting services:
Please login or register to view this content. Registration is FREE

CGI Perl scripts and software development:
Please login or register to view this content. Registration is FREE
tobias is offline
View Public Profile Visit tobias's homepage!
 
Closed Thread     « Reply to CGI/Perl form script giving error
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 1.13409 seconds with 12 queries