 |

01-27-2005, 06:12 PM
|
 |
WebProWorld Member
|
|
Join Date: Aug 2003
Location: South Bay, California
Posts: 87
|
|
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.
|

01-27-2005, 06:35 PM
|
 |
WebProWorld 1,000+ Club
|
|
Join Date: Jul 2003
Location: UK
Posts: 2,803
|
|
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
|

01-27-2005, 06:41 PM
|
 |
WebProWorld Member
|
|
Join Date: Aug 2003
Location: South Bay, California
Posts: 87
|
|
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?
|

01-27-2005, 07:00 PM
|
 |
WebProWorld 1,000+ Club
|
|
Join Date: Jul 2003
Location: UK
Posts: 2,803
|
|
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
|

01-27-2005, 09:19 PM
|
 |
WebProWorld 1,000+ Club
|
|
Join Date: Jul 2003
Location: UK
Posts: 2,803
|
|
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
|

01-28-2005, 12:32 PM
|
 |
WebProWorld Member
|
|
Join Date: Aug 2003
Location: South Bay, California
Posts: 87
|
|
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
|

01-28-2005, 01:52 PM
|
 |
WebProWorld 1,000+ Club
|
|
Join Date: Jul 2003
Location: UK
Posts: 2,803
|
|
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
|

01-28-2005, 01:56 PM
|
 |
WebProWorld Member
|
|
Join Date: Aug 2003
Location: South Bay, California
Posts: 87
|
|
I used Ipswitch to upload...how do I make sure it's uploading as ASCII?
|

01-28-2005, 02:07 PM
|
 |
WebProWorld Member
|
|
Join Date: Aug 2003
Location: South Bay, California
Posts: 87
|
|
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.
|

01-28-2005, 02:08 PM
|
 |
WebProWorld Member
|
|
Join Date: Aug 2003
Location: South Bay, California
Posts: 87
|
|
How do I make sure Ipswitch is uploading as ASCII?
|

01-28-2005, 02:17 PM
|
 |
WebProWorld 1,000+ Club
|
|
Join Date: Jul 2003
Location: UK
Posts: 2,803
|
|
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"
|

01-28-2005, 02:24 PM
|
 |
WebProWorld Member
|
|
Join Date: Aug 2003
Location: South Bay, California
Posts: 87
|
|
Yes, the ASCII button was checked. How come the test didn't work?
|

01-28-2005, 02:34 PM
|
 |
WebProWorld 1,000+ Club
|
|
Join Date: Jul 2003
Location: UK
Posts: 2,803
|
|
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"
|

01-28-2005, 02:37 PM
|
 |
WebProWorld Member
|
|
Join Date: Aug 2003
Location: South Bay, California
Posts: 87
|
|
Okay...it works.
|

01-28-2005, 02:47 PM
|
 |
WebProWorld 1,000+ Club
|
|
Join Date: Jul 2003
Location: UK
Posts: 2,803
|
|
Okay... now you need to repeat that procedure with your formmail.cgi script.
Paul
|

01-28-2005, 02:49 PM
|
 |
WebProWorld Member
|
|
Join Date: Aug 2003
Location: South Bay, California
Posts: 87
|
|
It gave me that error 500 Server message.
|

01-28-2005, 03:10 PM
|
 |
WebProWorld 1,000+ Club
|
|
Join Date: Jul 2003
Location: UK
Posts: 2,803
|
|
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
|

01-28-2005, 03:15 PM
|
 |
WebProWorld Member
|
|
Join Date: Aug 2003
Location: South Bay, California
Posts: 87
|
|
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
|

01-28-2005, 03:51 PM
|
 |
WebProWorld Veteran
|
|
Join Date: Apr 2004
Posts: 328
|
|
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.
|

01-28-2005, 05:18 PM
|
 |
WebProWorld Member
|
|
Join Date: Aug 2003
Location: South Bay, California
Posts: 87
|
|
That code is not there at all. Shall I add it with the # in front of it?
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|