Contact Us Forum Rules Search Archive
WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-27-2005, 06:12 PM
ajpaulus's Avatar
WebProWorld Member
 

Join Date: Aug 2003
Location: South Bay, California
Posts: 87
ajpaulus RepRank 0
Default CGI

Hi

I am using a cgi script for an interactive form. I am not too familiar with cgi, just the basics of basics. In order for the form to be sent to my email, they would have to fill out every field. How do I just change that, so just a few fields are required?

Thanks.
__________________
Audrey Paulus
Web Developer
www.hrosystems.com
Reply With Quote
  #2 (permalink)  
Old 01-27-2005, 06:35 PM
paulhiles's Avatar
WebProWorld 1,000+ Club
 

Join Date: Jul 2003
Location: UK
Posts: 2,803
paulhiles RepRank 0
Default

Which script are you using for your form processing Audrey? is it the formmail.cgi from Matt's Script Archive?

A link/url would be handy too! ;o)

Paul
Reply With Quote
  #3 (permalink)  
Old 01-27-2005, 06:41 PM
ajpaulus's Avatar
WebProWorld Member
 

Join Date: Aug 2003
Location: South Bay, California
Posts: 87
ajpaulus RepRank 0
Default

That's funny you mentioned that Paul. I originally used his 'free' script, but had a problem with it and emaill him a question, but he never responded to me. I am using another one.

http://wehaveforeclosuresolutions.co...osureform.html

Shall I upload the script somewhere, where you can view it? I don't think you can view it from the cgi bin, right?
__________________
Audrey Paulus
Web Developer
www.hrosystems.com
Reply With Quote
  #4 (permalink)  
Old 01-27-2005, 07:00 PM
paulhiles's Avatar
WebProWorld 1,000+ Club
 

Join Date: Jul 2003
Location: UK
Posts: 2,803
paulhiles RepRank 0
Default Any documentation for the script?

Where did you get your current script from?
Usually there's some sort of documentation provided with a mailer script (especially for a CGI version).

You're right about not being able to view the cgi-bin, how about posting a link to a plain text version of the script? You can always PM me with the details if you're reluctant to have the script public.

Paul
Reply With Quote
  #5 (permalink)  
Old 01-27-2005, 09:19 PM
paulhiles's Avatar
WebProWorld 1,000+ Club
 

Join Date: Jul 2003
Location: UK
Posts: 2,803
paulhiles RepRank 0
Default Check the file permissions on the CGI script

A couple of thoughts while I remember...

1) The file may have been uploaded as a binary file (this can introduce foreign characters into the script). Check to make sure it's been uploaded as an ASCII file.

2) Have you checked the file permissions on the CGI script?
Are they set to "execute"? The file permissions on Perl/CGI scripts should be set to 755. You can alter these permissions using chmod, but if you're unsure, maybe it's best not to play around with these settings! :o|

One great thing about Matt's formmail script is the amount of documentation! :o)

Update: I've tried out the CGI script you emailed me, and I can't get it to work either! So I'm no nearer getting it fixed. Have you tried contacting the support for the hosting company (iPowerweb.com)?

Paul
Reply With Quote
  #6 (permalink)  
Old 01-28-2005, 12:32 PM
ajpaulus's Avatar
WebProWorld Member
 

Join Date: Aug 2003
Location: South Bay, California
Posts: 87
ajpaulus RepRank 0
Default

If I use the Matt script, can you help me with it?

How do I use it with this form?

http://wehaveforeclosuresolutions.co...llersform.html

I tried to use it with this form, and it gave me a server error. I will email you the script.

Thanks
__________________
Audrey Paulus
Web Developer
www.hrosystems.com
Reply With Quote
  #7 (permalink)  
Old 01-28-2005, 01:52 PM
paulhiles's Avatar
WebProWorld 1,000+ Club
 

Join Date: Jul 2003
Location: UK
Posts: 2,803
paulhiles RepRank 0
Default Test for CGI facility first

Hi Audrey, before we get stuck into "Matt's script", could you just try saving the following code snippet as test.cgi, upload (as ASCII) to the cgi-bin, set file permissions to 755 and test that it displays okay.

Code:
#!/usr/local/bin/perl
print "Content-type: text/html\n\n";
print "This server can run CGI scripts!\n";
Paul
Reply With Quote
  #8 (permalink)  
Old 01-28-2005, 01:56 PM
ajpaulus's Avatar
WebProWorld Member
 

Join Date: Aug 2003
Location: South Bay, California
Posts: 87
ajpaulus RepRank 0
Default

I used Ipswitch to upload...how do I make sure it's uploading as ASCII?
__________________
Audrey Paulus
Web Developer
www.hrosystems.com
Reply With Quote
  #9 (permalink)  
Old 01-28-2005, 02:07 PM
ajpaulus's Avatar
WebProWorld Member
 

Join Date: Aug 2003
Location: South Bay, California
Posts: 87
ajpaulus RepRank 0
Default

This is what is says when I did the test ...

500 server error
I encountered an unrecoverable server error. Please go back and try again.
__________________
Audrey Paulus
Web Developer
www.hrosystems.com
Reply With Quote
  #10 (permalink)  
Old 01-28-2005, 02:08 PM
ajpaulus's Avatar
WebProWorld Member
 

Join Date: Aug 2003
Location: South Bay, California
Posts: 87
ajpaulus RepRank 0
Default

How do I make sure Ipswitch is uploading as ASCII?
__________________
Audrey Paulus
Web Developer
www.hrosystems.com
Reply With Quote
  #11 (permalink)  
Old 01-28-2005, 02:17 PM
paulhiles's Avatar
WebProWorld 1,000+ Club
 

Join Date: Jul 2003
Location: UK
Posts: 2,803
paulhiles RepRank 0
Default

In Ipswitch WS_FTP, there is a small radio button (underneath the transfer windows) which should be checked as "ASCII", the other options are "Binary" and "Auto"
Reply With Quote
  #12 (permalink)  
Old 01-28-2005, 02:24 PM
ajpaulus's Avatar
WebProWorld Member
 

Join Date: Aug 2003
Location: South Bay, California
Posts: 87
ajpaulus RepRank 0
Default

Yes, the ASCII button was checked. How come the test didn't work?
__________________
Audrey Paulus
Web Developer
www.hrosystems.com
Reply With Quote
  #13 (permalink)  
Old 01-28-2005, 02:34 PM
paulhiles's Avatar
WebProWorld 1,000+ Club
 

Join Date: Jul 2003
Location: UK
Posts: 2,803
paulhiles RepRank 0
Default

Quote:
Originally Posted by ajpaulus
Yes, the ASCII button was checked. How come the test didn't work?
Did you set the file permissions to 755?
CGI scripts needs to be set to "execute"
Reply With Quote
  #14 (permalink)  
Old 01-28-2005, 02:37 PM
ajpaulus's Avatar
WebProWorld Member
 

Join Date: Aug 2003
Location: South Bay, California
Posts: 87
ajpaulus RepRank 0
Default

Okay...it works.
__________________
Audrey Paulus
Web Developer
www.hrosystems.com
Reply With Quote
  #15 (permalink)  
Old 01-28-2005, 02:47 PM
paulhiles's Avatar
WebProWorld 1,000+ Club
 

Join Date: Jul 2003
Location: UK
Posts: 2,803
paulhiles RepRank 0
Default

Okay... now you need to repeat that procedure with your formmail.cgi script.

Paul
Reply With Quote
  #16 (permalink)  
Old 01-28-2005, 02:49 PM
ajpaulus's Avatar
WebProWorld Member
 

Join Date: Aug 2003
Location: South Bay, California
Posts: 87
ajpaulus RepRank 0
Default

It gave me that error 500 Server message.
__________________
Audrey Paulus
Web Developer
www.hrosystems.com
Reply With Quote
  #17 (permalink)  
Old 01-28-2005, 03:10 PM
paulhiles's Avatar
WebProWorld 1,000+ Club
 

Join Date: Jul 2003
Location: UK
Posts: 2,803
paulhiles RepRank 0
Default

Same here! :o(
There may be some minor problem with the way the script's been configured. I'll have a look through the readme file and see if there's any debugging tips.
Are there any differences in the setup of your searecovery site and the "foreclosure" site? If you can get CGI scripts to run on one but not the other, there's got to be some difference somewhere! :oS

Paul
Reply With Quote
  #18 (permalink)  
Old 01-28-2005, 03:15 PM
ajpaulus's Avatar
WebProWorld Member
 

Join Date: Aug 2003
Location: South Bay, California
Posts: 87
ajpaulus RepRank 0
Default

Yes, that original script works for this form...
http://www.hrosystems.com/cgi/form_parts.html

The only difference between theses two sites is they have the different mail program...one is vde/bin and the foreclosure is sbin. And I think the HRO is Unix. I hope this helps, because I have no clue.

Audrey
__________________
Audrey Paulus
Web Developer
www.hrosystems.com
Reply With Quote
  #19 (permalink)  
Old 01-28-2005, 03:51 PM
Easywebdev's Avatar
WebProWorld Veteran
 

Join Date: Apr 2004
Posts: 328
Easywebdev RepRank 1
Default

A lot of perl scripts use
Code:
use CGI::Carp('fatalsToBrowser');
for debugging purposes but the perl module CGI::Carp may not be installed (a lot of new server setups nowadays do not install it by default).

Take a look at the 2nd/3rd line of the script and if that line of code is there then comment it out by placing a # in front of it and see does that solve your problem.
__________________
"I have not failed. I have found 10,000 ways that don't work" - Thomas Edison.
"The secret to creativity is knowing how to hide your sources" - Albert Einstein.
Reply With Quote
  #20 (permalink)  
Old 01-28-2005, 05:18 PM
ajpaulus's Avatar
WebProWorld Member
 

Join Date: Aug 2003
Location: South Bay, California
Posts: 87
ajpaulus RepRank 0
Default

That code is not there at all. Shall I add it with the # in front of it?
__________________
Audrey Paulus
Web Developer
www.hrosystems.com
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Tags:



Thread Tools
Display Modes

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

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


Search Engine Optimization by vBSEO 3.2.0