Support » Plugin: Math Captcha » Undefined Constant AUTH_KEY

  • Resolved Jacob Dubail


    Hey, great little plugin.

    I’m inserting a captcha manually in a custom form like:
    <?php echo $MathCatpcha->generate_captcha_phrase('default'); ?>

    And doing some custom validation based upon the logic in you class-core file. I see that you’re using a constant AUTH_KEY, but that isn’t defined anywhere. And I’m getting errors in my logs about it.

    Am I missing something? Can this value be swapped out for another constant of my choosing? Or should I just define it on my own?


Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author dFactory


    Hi Jacob,

    The AUTH_KEY is a WordPress constant every WordPress installation defines in wp-config.php file (and is unique for each installation)

    I guess you might be doing something outside of the WordPress scope so maybe define (copy from wp-config.php) the AUTH_KEY constant before callign the $MathCatpcha->generate_captcha_phrase

    • This reply was modified 3 years, 10 months ago by dFactory.
    Thread Starter Jacob Dubail


    oh duh! Too early in the morning for me. I’m in a local dev environment so didn’t have my salts setup. oops.

    Thanks for the wake up call 😉

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Undefined Constant AUTH_KEY’ is closed to new replies.