1

In the root directory, I looked for wp-config.php and in that file I set WP_DEBUG to true and then got the following errors:

1) Deprecated: Assigning the return value of new by reference is deprecated in /home2/root/public_html/website/wp-content/plugins/exec-php/exec-php.php on line 22

Here is the line: $GLOBALS['g_execphp_manager'] =& new ExecPhp_Manager();

2) Notice: add_custom_background is deprecated since version 3.4! Use add_theme_support( 'custom-background', $args ) instead. in /home2/root/public_html/website/wp-includes/functions.php on line 2900

Here is the line: trigger_error( sprintf( __('%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.'), $function, $version, $replacement ) );.

How to fix this problems?

  • 1
    The title of this Question doesn't match the content. Care to clarify? Please, edit the Q itself for this end. – brasofilo Oct 24 '13 at 21:48
  • What happens if you deactivate the Exec PHP Plugin, and switch to a core-bundled Theme (such as Twenty Twelve or Twenty Thirteen)? – Chip Bennett Oct 24 '13 at 22:08
  • I need that plugin for some 'PHP' code forms to display properly. – John Lee Oct 24 '13 at 22:15
  • Note that wp-includes/functions.php is a core file, which you shouldn't edit. I would guess that you'll find the offending add_custom_background() call somewhere in a theme file (or possibly a plugin). Check your active theme for it. – Pat J Oct 25 '13 at 0:59
2

Firstly, fixing those is not essential, but it would pay to keep them in mind. For your live site WP_DEBUG should be false (development sites should have this on so that as you write the code you are warned of these things).

1) This is probably just a matter of removing the & in the &=. You should let the developer of the php_exec plugin know (and they should fix it in the future). The name of the plugin comes up as a major red flag for me, as letting a site admin (as opposed to a web developer) or any other user execute PHP code is very dangerous.

2) Somewhere in your site there is call to the function add_custom_background (I'm guessing theme, but I could be wrong). This function will be removed at some time in the future so should be replaced with what they suggest (add_theme_support( 'custom-background', $args ) I believe). Again you should notify the developer of the theme or plugin that makes the call.

1

Those are only warnings/notices, shouldn't be there, but it's not the end of the world.

In a live site, it's better to redirect WP_DEBUG to the file wp-content/debug.log, for example:

define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
@ini_set('display_errors',0);

I've got a plugin that show the contents of this file in the Dashboard.

All that said, I'm not complete positive if the plugin will work, but the deprecated messages is saying to remove that & from line 22.

And the other one tells that the theme is using an old function to add custom background support and should be updated.

Oh, and now that you've opened the gates of deßÜgin, you may want to read Debugging in WordPress

  • For the & (one line lead to another and I did fix them all. All I have left now is the add_custom prooblem in functions.php Thanks a lot for your help – John Lee Oct 25 '13 at 0:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.