Announcement

Collapse
No announcement yet.

CTUS Page "Invalid Token"

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

    CTUS Page "Invalid Token"

    Hello, When clicking on "submit" on our CTUS page, the error message "Invalid Token" is displayed. Would anyone know the reason and how to fix?

    http://www.dynamichomedecor.com/CTUS.html

    Thanks,
    Mike

    #2
    Re: CTUS Page "Invalid Token"

    Hi Mike,

    I don't know if you're still having the problem, but looking at your form, I do see an issue. For security and anti-spam purposes, the default CTUS form adds a token with JavaScript. The JavaScript is adding a hidden input field right above your submit button, which looks like: <input type="hidden" name="mms" value="Strict Standards: mktime(): You should be using the time() function instead in /home/dyn2mast/www/mm5/forms/token.php on line 3
    1440123475">

    What seems to breaking the form from working properly is the message that is being added into the value of that hidden field. The token.php may have been adjusted or isn't working properly with your version of php.

    Here is my token.php if you want to try and overwrite what you have.

    <?php
    date_default_timezone_set('UTC');
    $ct = mktime();
    setcookie('token', md5('abrasax salt'.$ct), 0, '/');


    /* Internet Explorer has a nasty habit of caching the token.php file. After the cookie is sent, we're going to send some special headers to prevent this. */
    # 'Expires' in the past
    header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");

    # Always modified
    header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");

    # HTTP/1.1
    header("Cache-Control: no-store, no-cache, must-revalidate");
    header("Cache-Control: post-check=0, pre-check=0", false);

    # HTTP/1.0
    header("Pragma: no-cache");
    echo $ct;
    ?>

    Comment


      #3
      Re: CTUS Page &quot;Invalid Token&quot;

      <plug>
      Playing with PHP is just one of the reasons many Store Owners choose to use our Easy Contact module. (Not to mention the dozens of other advantages.)

      BTW: Its 30% off for the next 24 hours with the MAKEITMINE promotion code. http://www.phosphormedia.com/product...y_contact.html

      </plug>
      Bruce Golub
      Phosphor Media - "Your Success is our Business"

      Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
      phosphormedia.com

      Comment


        #4
        Re: CTUS Page &quot;Invalid Token&quot;

        Piling on Bruce's plug, his module is what we use on www.miva.com and it's awesome!
        Thanks,

        Rick Wilson
        CEO
        Miva, Inc.
        [email protected]
        https://www.miva.com

        Comment

        Working...
        X