Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support Temyk

    (@webtemyk)

    Hi,

    I can see that your code has been executed, but nothing has been displayed. Check your code.

    To make sure everything works, add this code to the post:
    [insert_php]echo "It's work!";[/insert_php]

    Thread Starter debuger25

    (@debuger25)

    Hello Temyk. Thank you for the reply. I see that the old [insert_php]..[/insert_php] works. I was able to point out that the following php code is what stopped working with the updated plugin. This same code used to work fine before the plugin got updated (this code is provided by google for ReCaptcha):

    [insert_php]
    $secret = “XXXXXXXXXXXXXXXXXXXX”; // your secret key
    $response = null;// empty response
    $reCaptcha = new ReCaptcha($secret);// check secret key
    $response = $reCaptcha->verifyResponse($_SERVER[“REMOTE_ADDR”], $_POST[“g-recaptcha-response”]);
    if ($response != null && $response->success) {
    exit(0);
    [/insert_php]

    Please let me know if you have any idea about why this peace of php code stopped working. It used to work fine before and I haven’t made any changes to it.

    Plugin Support Temyk

    (@webtemyk)

    Judging by the blank page, you have PHP errors. You need to include WordPress error log.
    In wp-config.php:
    define( ‘WP_DEBUG’, true );
    define( ‘WP_DEBUG_LOG’, true ); // /wp-content/debug.log

    Find the bug yourself or send it to me.

    Thread Starter debuger25

    (@debuger25)

    Following is the error I get (you can see this by going to: https://www.chfoundationlubbock.com/contact/

    Parse error: syntax error, unexpected end of file in /home/chfounda/public_html/wp-content/plugins/insert-php/includes/shortcodes/shortcode-insert-php.php(25) : eval()’d code on line 8

    I think another issue could be that google recaptcha deprecating code in their recaptchalib.php file as well. ReCaptcha has a deprecated constructor

    Thank you for the help.

    Plugin Support Temyk

    (@webtemyk)

    You have deprecated PHP code in the plugin jquery-image-gallery, but it does not affect the work.

    Your code is missing a closing brace:
    [insert_php]
    $secret = “XXXXXXXXXXXXXXXXXXXX”; // your secret key
    $response = null;// empty response
    $reCaptcha = new ReCaptcha($secret);// check secret key
    $response = $reCaptcha->verifyResponse($_SERVER[“REMOTE_ADDR”], $_POST[“g-recaptcha-response”]);
    if ($response != null && $response->success) {
    exit(0);
    }
    [/insert_php]

    • This reply was modified 5 years, 8 months ago by Temyk.
    • This reply was modified 5 years, 8 months ago by Temyk.
    Thread Starter debuger25

    (@debuger25)

    Hello Temyk, Thank you so much for helping me with this and pointing out my error. You are an great assert this company. Have a wonderful day.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[insert_php] legacy code not working’ is closed to new replies.