tags:

views:

723

answers:

3

Hello,

My server is running php 5.3 and My wordpress install is spitting these errors out on me causing the my session_start() to break.

Deprecated: Assigning the return value of new by reference is deprecated in /home//public_html/hub/wp-settings.php on line 647

Deprecated: Assigning the return value of new by reference is deprecated in /home//public_html/hub/wp-settings.php on line 662

Deprecated: Assigning the return value of new by reference is deprecated in /home//public_html/hub/wp-settings.php on line 669

Deprecated: Assigning the return value of new by reference is deprecated in /home//public_html/hub/wp-settings.php on line 676

Deprecated: Assigning the return value of new by reference is deprecated in /home//public_html/hub/wp-settings.php on line 712

This is annoying, but I do not want to turn off on screen error reporting. How do I disable these bothersome deprecated warnings?

Running Wordpress 2.9.2.

Gracious!

+3  A: 
error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);

or

error_reporting(E_ALL ^ E_DEPRECATED);
Robus
Thank you Robus, Will this kill any php error reporting as well?
atwellpub
Nope, the first one basically tells php to show ERROR/WARNING/PARSE/NOTICE errors, the second one tells php to show all but DEPRECATED errors.
Robus
A: 

You have to edit the php configuration file. Fin the line

error_reporting = E_ALL

and replace with error_reporting = E_ALL ^ E_DEPRECATED

If you don't have access to the configuration file you can add this line to the php wordpress file (maybe headers.php)

error_reporting(E_ALL ^ E_DEPRECATED); 
Kreker
A: 

I needed to adapt this to

error_reporting = E_ALL & ~E_DEPRECATED