Article View: alt.comp.perlcgi.freelance
Article #3Re: how does the formmail work
From: Scott Bryce
Date: Sun, 17 Mar 2002 06:40
Date: Sun, 17 Mar 2002 06:40
132 lines
5627 bytes
5627 bytes
Lacey wrote: > > well thanks for the link, which Ill have a look at, but to respond to your > comment,. > Yes, I am trying to learn something new, so of course I am in over my head. > But I will swim and survive. I need help, and that's why I asked. > get it ? Yes, I get it. I'm not sure you do. First, alt.comp.perlcgi.freelance is not the correct place to post such questions. They should be posted in comp.lang.perl.misc. But be forewarned. Questions this fundamental will not be well received there. You will simply be asked to read the documentation. I suggest you see if your library has a copy of Learning Perl by Randal Schwartz and Tom Christiansen. It is also known in Perl circles as the Llama book. You may only need to read a couple of chapters to find the answers to your questions. Posting questions such as the ones you ask to a newsgroup isn't a good way to learn the fundamentals of Perl or CGI. You should be willing to invest some time in finding the answers to your questions before you ask others to invest that time. Almost anyone who regularly posts in the comp hierarchy will tell you the same thing. Let me attempt to answer some of your questions. Maybe you will see my point. > hello helpers. Actually, we are freelancers who are hoping to find a few RFPs posted here. > I rent my apache server. Unix? NT? We need to know. > I made this in > dreamweaver 3 ok no worries. Actually, you made it in HTML. You used Dreamweaver to create the HTML. Yes, I'm sticky about this. I have had clients tell me that they didn't want their websites created in HTML. They wanted them in Dreamweaver. A website IS HTML. It is important that you understand this. Whatever you did in Dreamweaver, I could do in notepad. > I uploaded it to the cgi-bin on the server The HTML file? > I downloaded from Matts' script archive the formmail.pl > Is this ok to use with a html inquiry form? That is what it is intended for. > How do the 2 files "talk to each" other ? You will want to read up on the fundamentals of creating forms, then read Matt's documentation for details about how to talk to his scripts. > in the first line of the formmail.pl it says > -------------------- > #!/usr/bin/perl > ------------------ > ok, but do I fill in the usr as my domain and the bin as cgi-bin ? No! In all likelihood, you want to leave that line alone. If you are on an NT server, that line is ignored by Perl. If you are on a Unix server, that line tells the server where to find Perl. On most Unix servers, Perl is in /usr/bin/perl. I don't mean to insult you, but you need to realize that if you don't know what that line means, you may not know enough Perl to install the script. > Im not > sure where the perl application is located, but Ill push on here. On an NT server, it may not matter. On a Unix server, you need to find out. That line above that I told you not to edit... If Perl is anywhere other than /usr/bin/perl, then you will want to edit that line so that it points to Perl on your server. > I guessed the next few lines and filled them in: > ---------------------------- > $mailprog = 'FormMail.pl'; > ---------------------------- No, no, no! What it wants is the name of the program on the server that needs to be called to send your email message. It will look something like $mailprog = '/usr/sbin/sendmail' On NT, sendmail may not be there, and the script probably won't work. On Unix you will want to set $mailprog to the full path to the sendmail program, whereever that is. By the way, if you are on a Unix server, file names are case sensitive. 'SendMail' and 'sendmail' are two different programs. > when I run it on the website, it says not configured... This could be for any number of reasons. There are several Perl FAQs on the internet. You could look at www.cpan.org or www.perl.com. There is also a FAQ that relates to Why Won't my Script Run? I can't find it right now, and I've already spent too much time on this post. Perhaps you could do a search for it. BTW, you really should load Perl on your local machine and test the script locally before posting it to the server. Always use the -w switch when you test. If your changes created bugs, it will be easier to find them on your PC then to try to test on the server. At the very least, check for compilation errors locally. No, you PC probably won't deliver your email, but you should at least check for compilation errors. --Scott
Technical Details
Message-ID:
<3C943A6A.F969F487@singlepoint.net>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-post-02!sn-post-01!supernews.com!corp.supernews.com!not-for-mailReferences:
<3c92eeed$0$21920$afc38c87@news.optusnet.com.au> <3C9369DB.81235F3F@singlepoint.net> <3c93cf30$0$28440$afc38c87@news.optusnet.com.au>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fec76,7a7bc0b6240b7bfa X-Google-Attributes: gidfec76,public X-Google-Thread: 108c83,7a7bc0b6240b7bfa X-Google-Attributes: gid108c83,public X-Google-ArrivalTime: 2002-03-16 22:40:23 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-post-02!sn-post-01!supernews.com!corp.supernews.com!not-for-mail From: Scott Bryce <sbryce@singlepoint.net> Newsgroups: alt.comp.perlcgi.freelance,aus.computers Subject: Re: how does the formmail work Date: Sat, 16 Mar 2002 23:40:42 -0700 Organization: Posted via Supernews, http://www.supernews.com Message-ID: <3C943A6A.F969F487@singlepoint.net> X-Mailer: Mozilla 4.73 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 References: <3c92eeed$0$21920$afc38c87@news.optusnet.com.au> <3C9369DB.81235F3F@singlepoint.net> <3c93cf30$0$28440$afc38c87@news.optusnet.com.au> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: newsabuse@supernews.com Lines: 132