Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Member
    Join Date
    May 2010
    Posts
    24

    Default Guest Register Form

    I have recently moved my domain from PlusMail to cPanel. Everything works fine ... except. On the PlusMail format, I had a page which (1) allowed visitors to sign in and (2) then, on Submit, automatically sent an email to me with the data, comments, etc. which visitors left behind, and (3) redirected the visitor to a "Thank You" page . It was not a "guest book" as such, because the data was not accessible by other visitors.

    Here is the code I used at PlusMail:
    Code:
    <form method="POST" action="http://mydomain.com/cgi-bin/formmail.cgi" onSubmit="if (this.email_address.value == this.confirm_email.value) { return true; } else { alert('Email addresses do not match!'); this.confirm_email.focus(); return false; }">
     <input type="hidden" name="recipient" value="webmaster@mydomain.com">
     <input type="hidden" name="subject" value="Guest Register">
     <input type="hidden" name="redirect" value="http://mydomain.com/thanks.html">
     <input type="hidden" name="env_report" value="REMOTE_HOST,REMOTE_ADDR,HTTP_USER_AGENT">
     <input type="hidden" name="style" value="1">
     <input type="hidden" name="sort" value="order:realname,url,email_address,confirm_email,country,else,comments">
     <input type="hidden" name="print_config" value="realname,email_address,confirm_email">
     <div align="center">
          <table>
        <tr>
         <td><p class="text0em" align="left">Full Name:</p></td>
         <td><input type="text" name="realname" size="20"></td>
        </tr>
        <tr>
         <td><p class="text0em" align="left">Your URL (if any):</p></td>
         <td><input type="text" name="url" value="http://" size="20"></td>
        </tr>
        <tr>
         <td><p class="text0em" align="left">Email Address:</p></td>
         <td><input type="text" name="email_address" size="20"></td>
        </tr>
        <tr>
         <td><p class="text0em" align="left">Confirm Email Address:</p></td>
         <td><input type="text" name="confirm_email" size="20"></td>
        </tr>
        <tr>
         <td><p class="text0em" align="left">Country:</p></td>
         <td><input type="text" name="country" size="20"></td>
        </tr>
        <tr>
         <td><p class="text0em" align="left">Anything else?:</p></td>
         <td><input type="text" name="else" size="20"></td>
        </tr>
       </table>
      </div>
      <p align="center">Comments, Suggestions, Whatever<br>
       <textarea name="thetext" rows="20" cols="80">
       (Please delete this sentence and replace it with your comments.)
       </textarea>
      </p>
      <p align="center">
       <input type="SUBMIT" value="Send It">
       <input type="RESET" value="Erase It">
       </p>
    </form>
    At cPanel, I found this code for a Guest Book:

    Code:
    <form action="/cgi-sys/guestbook.cgi" target=guestwindow>
    <input type="hidden" name="user" value="mydomain">
    <input type="hidden" name="action" value="addguest">
    <input type="hidden" name="basehref" value="http://mydomain.com">
    <input type="hidden" name="template" value="default">
    Name: <input type="text" name="name"><br>
    Email: <input type="text" name="email"><br>
    Url: <input type="text" name="url"><br>
    Comments: <textarea name="comments"></textarea><br>
    <input type="submit" value="Sign Guestbook">
    </form>
    I tried adapting the cPanel code to the old PlusMail code, but I can't get it to work right (it is over my head).

    My question: Is there a way to make the old PlusMail FORM code work in cPanel? Thank you.
    Last edited by stefanmain; 07-19-2010 at 12:04 PM.

  2. #2
    cPanel Quality Assurance Analyst cPanelDon's Avatar
    Join Date
    Nov 2008
    Location
    Houston, Texas, U.S.A.
    Posts
    2,554
    cPanel/Enkompass Access Level

    DataCenter Provider

    Default

    Quote Originally Posted by stefanmain View Post
    I have recently moved my domain from PlusMail to cPanel. Everything works fine ... except. On the PlusMail format, I had a page which (1) allowed visitors to sign in and (2) then, on Submit, automatically sent an email to me with the data, comments, etc. which visitors left behind, and (3) redirected the visitor to a "Thank You" page . It was not a "guest book" as such, because the data was not accessible by other visitors.

    Here is the code I used at PlusMail:
    Code:
    <form method="POST" action="http://mydomain.com/cgi-bin/formmail.cgi" onSubmit="if (this.email_address.value == this.confirm_email.value) { return true; } else { alert('Email addresses do not match!'); this.confirm_email.focus(); return false; }">
     <input type="hidden" name="recipient" value="webmaster@mydomain.com">
     <input type="hidden" name="subject" value="Guest Register">
     <input type="hidden" name="redirect" value="http://mydomain.com/thanks.html">
     <input type="hidden" name="env_report" value="REMOTE_HOST,REMOTE_ADDR,HTTP_USER_AGENT">
     <input type="hidden" name="style" value="1">
     <input type="hidden" name="sort" value="order:realname,url,email_address,confirm_email,country,else,comments">
     <input type="hidden" name="print_config" value="realname,email_address,confirm_email">
     <div align="center">
          <table>
        <tr>
         <td><p class="text0em" align="left">Full Name:</p></td>
         <td><input type="text" name="realname" size="20"></td>
        </tr>
        <tr>
         <td><p class="text0em" align="left">Your URL (if any):</p></td>
         <td><input type="text" name="url" value="http://" size="20"></td>
        </tr>
        <tr>
         <td><p class="text0em" align="left">Email Address:</p></td>
         <td><input type="text" name="email_address" size="20"></td>
        </tr>
        <tr>
         <td><p class="text0em" align="left">Confirm Email Address:</p></td>
         <td><input type="text" name="confirm_email" size="20"></td>
        </tr>
        <tr>
         <td><p class="text0em" align="left">Country:</p></td>
         <td><input type="text" name="country" size="20"></td>
        </tr>
        <tr>
         <td><p class="text0em" align="left">Anything else?:</p></td>
         <td><input type="text" name="else" size="20"></td>
        </tr>
       </table>
      </div>
      <p align="center">Comments, Suggestions, Whatever<br>
       <textarea name="thetext" rows="20" cols="80">
       (Please delete this sentence and replace it with your comments.)
       </textarea>
      </p>
      <p align="center">
       <input type="SUBMIT" value="Send It">
       <input type="RESET" value="Erase It">
       </p>
    </form>
    At cPanel, I found this code for a Guest Book:

    Code:
    <form action="/cgi-sys/guestbook.cgi" target=guestwindow>
    <input type="hidden" name="user" value="mydomain">
    <input type="hidden" name="action" value="addguest">
    <input type="hidden" name="basehref" value="http://mydomain.com">
    <input type="hidden" name="template" value="default">
    Name: <input type="text" name="name"><br>
    Email: <input type="text" name="email"><br>
    Url: <input type="text" name="url"><br>
    Comments: <textarea name="comments"></textarea><br>
    <input type="submit" value="Sign Guestbook">
    </form>
    I tried adapting the cPanel code to the old PlusMail code, but I can't get it to work right (it is over my head).

    My question: Is there a way to make the old PlusMail FORM code work in cPanel? Thank you.
    Try adjusting the "action" in the form from using "/cgi-bin/" to using "/cgi-sys/" as seen below:

    Before:
    Code:
    action="/cgi-bin/formmail.cgi"
    After:
    Code:
    action="/cgi-sys/formmail.cgi"
    The above will require the following configuration option to be enabled via WHM:
    WHM: Main >> Server Configuration >> Tweak Settings >> Software >> Enable FormMail-clone CGI

  3. #3
    Member
    Join Date
    May 2010
    Posts
    24

    Default

    The above will require the following configuration option to be enabled via WHM:
    WHM: Main >> Server Configuration >> Tweak Settings >> Software >> Enable FormMail-clone CGI
    Is that something I can do at cPanel, or is that something I need to request from the server provider?

  4. #4
    cPanel Quality Assurance Analyst cPanelDon's Avatar
    Join Date
    Nov 2008
    Location
    Houston, Texas, U.S.A.
    Posts
    2,554
    cPanel/Enkompass Access Level

    DataCenter Provider

    Default

    Quote Originally Posted by stefanmain View Post
    Is that something I can do at cPanel, or is that something I need to request from the server provider?
    The configuration option in WHM requires root ("Administrator") access; depending on your situation this might be something to request from the hosting service provider. When enabled you can then use the formmail-clone script within the "cgi-sys" path.

    Do you happen to have the original "formmail.cgi" script from the old hosting service still in your current "cgi-bin" directory?

  5. #5
    Member
    Join Date
    May 2010
    Posts
    24

    Default

    Thanks to your suggestion, I retrieved the original "formmail.cgi" script from the old PlusMail server and FTP'd it to the cgi-bin on the cPanel server (both the PlusMail and cPanel servers belong to the same hosting company).

    So, the page works again!

    Thank you for your help.
    Last edited by stefanmain; 07-20-2010 at 02:44 PM.

  6. #6
    cPanel Quality Assurance Analyst cPanelDon's Avatar
    Join Date
    Nov 2008
    Location
    Houston, Texas, U.S.A.
    Posts
    2,554
    cPanel/Enkompass Access Level

    DataCenter Provider

    Default

    Quote Originally Posted by stefanmain View Post
    Thanks to your suggestion, I retrieved the original "formmail.cgi" script from the old PlusMail server and FTP'd it to the cgi-bin on the cPanel server (both the PlusMail and cPanel servers belong to the same hosting company).

    So, the page works again!

    Thank you for your help.
    Thank you for the status update. I wanted to note that the "cgi-sys" sub-directory is a shared path and it is not usually seen when viewing the files stored in the account (e.g., via cPanel File Manager, FTP, SFTP, SSH, or cPanel WebDisk/WebDAV). You may still try attempting to use the formmail-clone script to see if the host has it enabled and if the formmail-clone script is enabled then the same form should work very similar if not the same as before, the only difference being that the form would be using a script stored in a shared path on the system.

    You may test to see if the formmail-clone script is accessible by visiting your web site using the following URI:
    Code:
    /cgi-sys/formmail.cgi
    Example:
    Code:
    http://www.domain.tld/cgi-sys/formmail.cgi
    If accessed successfully and the formmail-clone script is enabled, you may see a page that shows text similar to the following:
    Code:
    FormMail-Clone Version: 2.4
    This is FormMail-clone, a clone of FormMail.cgi. It is a clean room version for legal purposes (a less restrictive liscense), but should behave the exact same way as Matt Wright's Original, but contain none of his code.
    If accessed successfully but the formmail-clone script is disabled, you may see a page that shows text like the following:
    Code:
    FormMail-Clone
    The system administrator has disabled this script.
    Last edited by cPanelDon; 07-21-2010 at 06:07 PM. Reason: Clarification

Similar Threads & Tags
Similar threads

  1. Guest Book Spam
    By freddagg in forum New User Questions
    Replies: 1
    Last Post: 10-30-2008, 12:51 PM
  2. Guest Book
    By Daddy in forum New User Questions
    Replies: 1
    Last Post: 03-29-2005, 01:17 PM
  3. Guest viewing
    By ljprevo in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 12-23-2003, 12:16 PM
  4. Advance Guest Book Error
    By wilfried in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 10-17-2003, 03:45 PM
  5. trouble with guest book
    By AbeFroman in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 10-05-2002, 05:23 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube