Announcement

Collapse
No announcement yet.

nms FormMail probs

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    nms FormMail probs

    Aplogies for being slightly off-topic here.

    Am trying to set up nms FormMail to run a 'subscribe to newsletter' form [which is a daft thing to do on a bank holiday when I can't contact the hosting company to check the perl and sendmail settings )

    Interestingly, I'm getting different error messages from the two different locations of the subscribe form, one on brochure page, other on catalogue page. [You will gather, of course, that its not working]

    On the main brochure page, I get the following message
    "500 Internal Server Error
    This indicates that a part of the server (for example a CGI program) has crashed, or encountered a configuration error. If the code was received when running a CGI, contact the author of the CGI"


    On the main catalogue page, I get the following message
    plus the address bar shows http:// ..../cgi-bin/ca000001.pl

    "A General Script Error Occurred

    --------------------------------------------------------------------------Error: There is no valid input parameters for the script! Check the referencing HTML code!
    -------------------------------------------------------------------------
    Press the Browser back button and try again or contact the site owner
    The form is in the right hand"

    Questions:

    Is there a difference in how the source form is set up in the 'brochure' and 'catalogue' pages? Is this why I'm getting two different error messages?
    I have the same form in the righthand bar of the Smart Template [using Dev 7.02] and both forms access the same formmail.pl script

    Should the first line of the script be uncommented?
    Currently: #!/usr/bin/perl -wT
    Should this perhaps be: !/usr/bin/perl -wT [without the hash] but nothing in the instructions said to uncomment it.

    As I couldn't check with hosting co what the send mail prog setting are [or the location of the perl interpreter], have tried the default of '/usr/lib/sendmail -oi -t': which didn't work.
    I then tried using the smtp server settings [from Actinic n/w settings] as the nms formmail readme suggested. still no joy.

    Have changed the formmail permissions to:
    RWX for owner
    X for group
    X for user

    Have checked and re-checked the script and the form but can't see any obvious errors. Although I don't know anything about scripts the instructions seemed fairly straight forward and have only amended the very basic settings.
    So am assuming it's probably the perl or sendmail/smtp settings that are not correct.

    Any feedback, especially as to why there are different error messages from the 'brochure' and the 'catalogue' would be most appreciated.

    Many thanks, Sharon
    www.eyewear2gogo.com - designer sunglasses at discount prices
    www.solarequip.co.uk - solar products at discount prices!
    www.stuff2gogo.com - great stuff - great prices

    #2
    Should the first line of the script be uncommented?
    Currently: #!/usr/bin/perl -wT
    No that first line # isn't a comment. It's known as "hash bang" (#!) and is used by the shell to locate the program to use to run the script. The real (non Windows) world doesn't rely on file extensions to determine what to do so that line does the work instead.

    You should have the same path in there as Actinic uses (see Advanced / Network Setup).

    Your other problem is that Actinic uses FORMs for lots of functions. Make sure you're not illegally nesting your mail form inside an Actinic generated one (you cannot have a FORM within a FORM). That's probably the reason for the second ca000001 error. A peek at your generated HTML should show you what's happening.
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      Hi Norman

      Many thanks for your response.

      Have restored the '#' and checked the html for nesting of forms.

      On the 'brochure' page there are only 2 forms, 'search' on the top banner and the offending 'subscribe to newsletter' in the righthand panel [using Smart Theme]
      On the 'catalogue' page there are 3 forms, those above plus 'coupon' form.
      On both pages the forms are well away from each other and can't find any nesting.

      html for form as below [FormMail.pl is correct capitalisation of file]:

      <td width="146" align="center" valign="top" bgcolor="#ccbce1"><form method="post" action="/cgi-bin/FormMail.pl">
      <input type="hidden" name="subject" value="Subscribe to Newsletter">
      <input type="hidden" name="recipient" value="me@mysite.co.uk">
      <table width="140" cellpadding="0" cellspacing="0" bgcolor="#ccbce1">
      <tr>
      <td colspan="2">
      <p align="center"><b>Subscribe to Newsletter</b></td>
      </tr>
      <tr>
      <td colspan="2">
      Email </td>
      </tr>
      <tr>
      <td>&nbsp;</td>
      <td><input type="text" name="email" size="18" /></td>
      </tr>
      <tr>
      <td colspan="2">Name</td>
      </tr>
      <tr>
      <td>&nbsp;</td>
      <td><input type="text" name="name" size="18" /></td>
      </tr>
      <tr>
      <td colspan="2">
      <p align="center"><input type="submit" value="Subscribe" /></td>
      </tr>
      </table>
      </form></td>
      </tr>
      ________________________________

      FormMail.pl as per following [minus the comments, actual field values etc]:

      #!/usr/bin/perl -wT

      BEGIN
      {
      $DEBUGGING = 0;
      $emulate_matts_code= 0;
      $secure = 1;
      $allow_empty_ref = 1;
      $max_recipients = 5;
      $mailprog = 'SMTP:xxxxxx-1.xx.net';
      $postmaster = 'info@mysite.co.uk';
      @referers = qw(www.mysite.co.uk);
      @allow_mail_to = ();
      @recipients = (subscribe@mysite.co.uk);
      %recipient_alias = ();
      @valid_ENV = qw(REMOTE_HOST REMOTE_ADDR REMOTE_USER HTTP_USER_AGENT);
      $locale = '';
      $charset = 'iso-8859-1';
      $date_fmt = '%A, %B %d, %Y at %H:%M:%S';
      $style = '';
      $no_content = 0;
      $double_spacing = 1;
      $wrap_text = 0;
      $wrap_style = 1;
      $address_style = 0;
      $send_confirmation_mail = 0;
      $confirmation_text = <<'END_OF_CONFIRMATION';
      From: newsletter@mysite.co.uk
      Subject: Newsletter Subscription.

      Thank you for your newsletter subscription.

      END_OF_CONFIRMATION

      # You may need to uncomment the line below and adjust the path.
      # use lib './lib';
      _____________________

      Have tried replacing the SMTP value in $mailprog with:
      '/usr/lib/sendmail -oi -t':
      and
      'usr/sbin/sendmail -oi -t';

      but neither work.

      Site is at: www.daegen.co.uk
      [first Actinic site - not yet finished, so please be kind]

      Any more suggestions, comments etc would be gratefully received.
      Many thanks, Sharon

      And at 10am this morning - this seemed as if it was going to be such an easy little jobette
      www.eyewear2gogo.com - designer sunglasses at discount prices
      www.solarequip.co.uk - solar products at discount prices!
      www.stuff2gogo.com - great stuff - great prices

      Comment


        #4
        You're actually calling

        <form method="post" action="/cgi-bin/formmail.pl">

        on your home page and not FormMail.pl as you mentioned.

        Sorry, but I've no idea as to your correct $mailprog as only your ISP will know that.
        Norman - www.drillpine.biz
        Edinburgh, U K / Bitez, Turkey

        Comment


          #5
          Hi Norman

          I changed 'FormMail.pl' to 'formmail.pl'
          as all the other *.pl files were all lowercase
          but still doesn't work.

          I keep trying different permutations on the chance that I might get it working but no joy. Will probably have to wait until support at vi.net reappear after the break.

          I appreciate your taking the time to look at it and for your comments.
          Many thanks,
          regards, Sharon
          www.eyewear2gogo.com - designer sunglasses at discount prices
          www.solarequip.co.uk - solar products at discount prices!
          www.stuff2gogo.com - great stuff - great prices

          Comment


            #6
            A coupe of comments

            Am trying to set up nms FormMail to run a 'subscribe to newsletter' form [which is a daft thing to do on a bank holiday when I can't contact the hosting company to check the perl and sendmail settings )
            There is a neat cgi script called perlDiver available from http://www.scriptsolutions.com/programs/free/perldiver/ install it and it will examine your server space and tell you the path names you need to know.

            secondly you say you are installing NMS formMail....I thought this script placed your email address within the cgi script so that it wasn't present in the HTML for harvesters to feast on

            http://nms-cgi.sourceforge.net/scripts.shtml

            You have
            <input type="hidden" name="recipient" value="me@mysite.co.uk">
            in your page

            Comment


              #7
              Hi Jo

              There is a neat cgi script called perlDiver available
              Many thanks Jo, will give it a try.


              NMS formMail....I thought this script placed your email address within the cgi script so that it wasn't present in the HTML for harvesters to feast on
              Yes, your correct. I initially intended to use the script for two forms so set up two recipients email address aliases on the form, as per the instructions, but have been fiddling around with both the form and script settings in trying to get them to work, that I've completely lost the plot en route

              Many thanks, Sharon
              www.eyewear2gogo.com - designer sunglasses at discount prices
              www.solarequip.co.uk - solar products at discount prices!
              www.stuff2gogo.com - great stuff - great prices

              Comment


                #8
                Update and one remaining prob

                Update and one remaining prob.

                The FormMail script wasn't working because the hosting company [Virtual Internet / Active 24] don't allow customers to upload scripts. Although you can physically upload, set permissions and all appears OK, they won't work.

                They do, so I've discovered, provide a basic formmail script. However there is no access to configure the script in any way, which means the recipient's email address has to be included in the form itself for all the email harvesters to feast on [as pointed out by Jo from Pinbrook].

                I've still got one remaining problem.

                The form is in the Act_BrochurePrimary and Act_Primary templates.

                [There is a 'bad referrer' error on the brochure page that is being looked at by VI / Active24]

                The form works OK on all the catalog pages except the main catalog page www.daegen.co.uk/acatalog/index.html which calls ca000001.pl [an Actinic script]

                Norman mentioned in a previous post that this could be illegal nesting of forms. At that time I only checked the Act-Primary template which is OK. The prob is something to do with the contents of this page and have copied the Act_CatalogBody.html template below. The last 'form' in this template doesn't have a closing </form>. Not sure if this is correct or where it should be inserted if needed. This template hasn't been modified in any way.

                <!-- CatalogBody HTML begin -->
                <!-- Insert HTML for the top of the catalog body -->
                <!-- If customer accounts are in operation the following line will display -->
                <!-- welcome message and a LOGOUT button -->
                <Actinic:WELCOME/>

                </FORM>
                <FORM METHOD="POST" ACTION="NETQUOTEVAR:SEARCHCGIURL">
                <INPUT TYPE=HIDDEN NAME="SHOP" VALUE="NETQUOTEVAR:SHOP">
                NETQUOTEVAR:SEARCHBODY
                </FORM>
                <FORM METHOD=NETQUOTEVAR:CGIMETHOD ACTION="NETQUOTEVAR:CGIURL">
                <INPUT TYPE=HIDDEN NAME="SHOP" VALUE="NETQUOTEVAR:SHOP">
                NETQUOTEVARESITEMAPLINK

                NETQUOTEVAR:PRODUCTBODY

                NETQUOTEVAR:SPLASHTEXTBODY

                NETQUOTEVAR:INFOLINES

                NETQUOTEVAR:SSPPOWEREDBY

                NETQUOTEVAR:POWEREDBY

                <!-- Insert HTML for the bottom of the catalog body -->
                <!-- CatalogBody HTML end -->
                As this is our first Actinic site [were using outselves as ginnea pigs] we've done very little by way of customising. The object has been to get to know Actinic and the why's and wherefores of how it works etc.

                Any comments and suggestions gratefully accepted.
                Many thanks,
                Sharon
                www.eyewear2gogo.com - designer sunglasses at discount prices
                www.solarequip.co.uk - solar products at discount prices!
                www.stuff2gogo.com - great stuff - great prices

                Comment


                  #9
                  Hi Sharon

                  last 'form' in this template doesn't have a closing </form>.
                  This is because the closing form tag is in Act_Primary.html where it says "NETQUOTEVAR:FORMEND".

                  Your Act_Catalogbody.html appears fine to me.

                  Kind Regards
                  Nadeem Rasool
                  SellerDeck Development

                  Comment


                    #10
                    The FormMail script wasn't working because the hosting company [Virtual Internet / Active 24] don't allow customers to upload scripts...
                    Weird! How does Actinic work there? It requires a huge number of Perl scripts that it uploads via FTP - just like you would.
                    Norman - www.drillpine.biz
                    Edinburgh, U K / Bitez, Turkey

                    Comment


                      #11
                      Hi Norman

                      Virtual Internet / Active 24 apparently [so I've since discovered] provide an old version of a formmail script in the user's cgi-bin, although this is not visable to, or configurable by, the user. You are just given settings for the forms that call the script.

                      Because I could not 'see' that a formmail script already existed I was uploading the lastest version which, according to support at VI / Active 24, was creating confusion between the two versions when the script was called. Actinic support who are looking into why my 'subscribe to newsletter' form works on all brochure and catalog pages except the main catalog page also have have been unable to 'see' the script.

                      It has occured to me since, that if I renamed my formmail script I could probably get it to work because as you say Actinic uploads its own scripts successfully, but VI/Active say they do not allow users to upload formmail scripts.

                      As I'm moving hosting to Jo at Pinbrook, it doesn't really matter anymore to me. I posted the update in case anyone else using VI/Active24 was struggling with the same problem.

                      Regards, Sharon
                      www.eyewear2gogo.com - designer sunglasses at discount prices
                      www.solarequip.co.uk - solar products at discount prices!
                      www.stuff2gogo.com - great stuff - great prices

                      Comment

                      Working...
                      X