Support » Plugin: wpMandrill » PHP 7 Errors: safe_mode, set_magic_quotes_runtime

  • I am receiving a few error messages when running a PHP 7 check:

    /wp-content/plugins/wpmandrill/lib/mandrill.class.php
    431 | ERROR | INI directive ‘safe_mode’ is deprecated from PHP 5.3 and forbidden from PHP 5.4.
    545 | ERROR | The use of function set_magic_quotes_runtime is discouraged from PHP version 5.3 and forbidden from PHP version 7.0
    551 | ERROR | The use of function set_magic_quotes_runtime is discouraged from PHP version 5.3 and forbidden from PHP version 7.0

    Is this currently being addressed?

    https://wordpress.org/plugins/wpmandrill/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi there – are there any plans to address these items in the near future?

    I’ve got the same error. Please update this plugin.

    This fixes it (change code from line 543-551):

                if ( version_compare(PHP_VERSION, '5.3.0', '<') ) {
                    $magic_quotes = get_magic_quotes_runtime();
                    set_magic_quotes_runtime(0);
                }
                
                $file_buffer  = file_get_contents($path);
                $file_buffer  = chunk_split(base64_encode($file_buffer), 76, "\n");
                
                if ( version_compare(PHP_VERSION, '5.3.0', '<') ) set_magic_quotes_runtime($magic_quotes);

    I guess the version check in the if did not work properly, so I changed that.

    Thanks for the fix dries863.

    Hello there

    I tried @dries863 solutions and did not work to me. The same errors are still showing on my log.
    Will php7 support be available in the next version?

    FILE: /Users/natalisilverio/Sites/crowdyhouse/crowdyhouse-github/wp-content/plugins/wpmandrill/lib/mandrill.class.php
    ———————————————————————————————————————
    FOUND 2 ERRORS AND 2 WARNINGS AFFECTING 4 LINES
    ———————————————————————————————————————
    431 | WARNING | INI directive ‘safe_mode’ is deprecated since PHP 5.3 and removed since PHP 5.4.
    511 | WARNING | INI directive ‘magic_quotes_runtime’ is deprecated since PHP 5.3 and removed since PHP 5.4.
    555 | ERROR | Function set_magic_quotes_runtime() is deprecated since PHP 5.3 and removed since PHP 7.0
    561 | ERROR | Function set_magic_quotes_runtime() is deprecated since PHP 5.3 and removed since PHP 7.0
    ———————————————————————————————————————

    I emailed Mandrill about this and they said the plugin is no longer supported. Here’s the full response:

    The wpMandrill plugin is no longer supported, so it will not be upgraded any longer. You should be able to use any plugin that allows you to use your Mandrill STMP information though. If you have any other questions, please let us know.

    So switching to something like “Easy WP SMTP” would probably be best.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘PHP 7 Errors: safe_mode, set_magic_quotes_runtime’ is closed to new replies.