Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
Photo

CGI Bin / submit button problems


  • Please log in to reply

#1
shadoobie

shadoobie

    Member

  • Member
  • PipPip
  • 19 posts
I have a very simple form file I'm testing, it's directly in the 'www' directory of our website. The form is trying to run a pearl script when the submit button is clicked. In the form, I've tried all kinds of ways to point to the cgi-bin but continue to get errors. Right now, the action part is: action="/cgi-bin/csvwrite.pl">. I have no idea if this is correct, I'm not really sure how to tell it to go out of the www directory and go into the cgi directory. The WWW folder and the CGI-Bin folder are in the same directory if that helps.

Then in the script file, I need to know the correct info. At the moment, the file is in the cgi directory and the beginning of the file looks like this:
#!/cgi-bin/
##########################################################
# CSVwrite 12/Nov/2004
# © 1999-2003 EZscripting.com
# Script by Alexandre Golovkine
##########################################################
my $base_file = '/data/database.txt';
my $HTML_thankyou = '/www/thankyou.htm';
my $line_break = '<br>';
my $ID_autoincrement = 1;
my $ID_autoincrement_name = "ID";

and so on. My problem is I'm not sure if I have all the paths correct. I've changed them many times but can't get anything to work. I really need to know if I'm at least telling it to go to the correct places. I've changed the CHMOD to 755 each time. Can anyone tell me the correct paths for the form file and the cgi script? Once I know I at least have the paths correct, then I can fuss with the actual script. All the websites I go to with cgi info tells us to ask our ISP what the paths are to CGI but my ISP has been no help at all.

Thanks in advance to anyone who can help me on this!
Kathy
  • 0

Advertisements


#2
lil_cat_luver

lil_cat_luver

    Member

  • Member
  • PipPipPip
  • 296 posts
The form is at www/form.html and the script is at cgi-bin/csvwrite.pl, and both of these are in the root directory is that right?

If you use the code action="/cgi-bin/csvwrite.pl" then you're basically saying the script is in www/cgi-bin/ which is not the case.

Maybe you should use this code action=".../cgi-bin/csvwrite.pl" I'm not exactly sure if that's right, but the correct code should look something like that. Sorry, that probably doesn't help. Anyways, if it doesn't work, take the form and put it in the root directory, and use the old code: action="/cgi-bin/csvwrite.pl
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP