Title: PHP 7 Errors: safe_mode, set_magic_quotes_runtime
Last modified: September 1, 2016

---

# PHP 7 Errors: safe_mode, set_magic_quotes_runtime

 *  [AngryGerman](https://wordpress.org/support/users/angrygerman/)
 * (@angrygerman)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/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/](https://wordpress.org/plugins/wpmandrill/)

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Thread Starter [AngryGerman](https://wordpress.org/support/users/angrygerman/)
 * (@angrygerman)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/php-7-errors-safe_mode-set_magic_quotes_runtime/#post-7553745)
 * Hi there – are there any plans to address these items in the near future?
 *  [dries863](https://wordpress.org/support/users/dries863/)
 * (@dries863)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/php-7-errors-safe_mode-set_magic_quotes_runtime/#post-8380388)
 * I’ve got the same error. Please update this plugin.
 *  [dries863](https://wordpress.org/support/users/dries863/)
 * (@dries863)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/php-7-errors-safe_mode-set_magic_quotes_runtime/#post-8380423)
 * 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.
 *  [Jeff Rose](https://wordpress.org/support/users/talus/)
 * (@talus)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/php-7-errors-safe_mode-set_magic_quotes_runtime/#post-8388588)
 * Thanks for the fix dries863.
 *  [natalisilverio](https://wordpress.org/support/users/natalisilverio/)
 * (@natalisilverio)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/php-7-errors-safe_mode-set_magic_quotes_runtime/#post-8563336)
 * Hello there
 * I tried [@dries863](https://wordpress.org/support/users/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 ———————————————————————————————————————
 *  [Martin Blumenfeld](https://wordpress.org/support/users/monkeypress/)
 * (@monkeypress)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/php-7-errors-safe_mode-set_magic_quotes_runtime/#post-8974881)
 * 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.

 * ![](https://s.w.org/plugins/geopattern-icon/wpmandrill_171717.svg)
 * [wpMandrill](https://wordpress.org/plugins/wpmandrill/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wpmandrill/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wpmandrill/)
 * [Active Topics](https://wordpress.org/support/plugin/wpmandrill/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wpmandrill/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wpmandrill/reviews/)

## Tags

 * [compatibility](https://wordpress.org/support/topic-tag/compatibility/)
 * [php-7](https://wordpress.org/support/topic-tag/php-7/)

 * 6 replies
 * 5 participants
 * Last reply from: [Martin Blumenfeld](https://wordpress.org/support/users/monkeypress/)
 * Last activity: [9 years, 2 months ago](https://wordpress.org/support/topic/php-7-errors-safe_mode-set_magic_quotes_runtime/#post-8974881)
 * Status: not resolved