Forums

[resolved] [Plugin: Customize Your Community] Captcha doesn't working (4 posts)

  1. carlla
    Member
    Posted 2 years ago #

    I type the correct code on captcha field, but always get the message

    ERROR: You didn't correctly enter the captcha, please try again.

    I think the session isn't loading. I don't know why. I used this same plugin in another blog before and it worked well. I've compared the phpinfo() in those 2 blogs and they look the same.

    Any ideas on what else I can/should compare?

  2. carlla
    Member
    Posted 2 years ago #

    It's working know!

    After looking for the issues' reason on the phpinfo, php.ini and .htaccess and not found out nothing, I had the idea to look for the session_start(); on CYC, and didn't found.

    So, to fix the ploblem, I added the session_start(); at the beginning of wp-login.php

  3. Rumores
    Member
    Posted 2 years ago #

    Hi there and thanks Carlla for pointing the solution of this issue I also encountered.

    Another way to solve this ( without editing core files, an option to avoid as the plague :) would be to dynamically add session_start() via the plugin main file by using add_action(...).

    Something like :

    // Function to start session
    function cyc_session_start() {
    	if(!session_id) session_start();
    	session_register('security_code');
    	}
    // Try to start a session when the register page is requested
    if ($pagenow == 'wp-login.php' && $_GET['action'] == 'register' && $cyc_options['captcha']) {
    	add_action('init','cyc_session_start',97);
    	}

    Hope it helps.

  4. carlla
    Member
    Posted 2 years ago #

    Thanks Rumores! It's a very good solution =)

Topic Closed

This topic has been closed to new replies.

About this Topic