PHP Errors Preventing Loading

Hello,

I am getting quite a few errors on my site azFans.com, I believe it is due to the PHP version being upgraded on the server. I have found the references lines below, but unfortunately don’t know enough to make the changes. If someone could please recommend changes to the below lines of code I would greatly appreciate it! Thank you!

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

$wp_the_query =& new WP_Query();

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

$wp_rewrite   =& new WP_Rewrite();

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

$wp           =& new WP();

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

$wp_locale =& new WP_Locale();

Deprecated: Assigning the return value of new by reference is deprecated in /home/azfansc/public_html/wp-includes/cache.php on line 103

	$GLOBALS['wp_object_cache'] =& new WP_Object_Cache();

Deprecated: Assigning the return value of new by reference is deprecated in /home/azfansc/public_html/wp-includes/query.php on line 21

	$GLOBALS['wp_query'] =& new WP_Query();

Deprecated: Assigning the return value of new by reference is deprecated in /home/azfansc/public_html/wp-includes/theme.php on line 623

		$GLOBALS['custom_image_header'] =& new Custom_Image_Header($admin_header_callback);

Deprecated: Assigning the return value of new by reference is deprecated in /home/azfansc/public_html/wp-content/plugins/vbbridge.php on line 413

$parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());

Deprecated: Assigning the return value of new by reference is deprecated in /home/azfansc/public_html/forums/includes/init.php on line 49

$vbulletin =& new vB_Registry();

Deprecated: Assigning the return value of new by reference is deprecated in /home/azfansc/public_html/forums/includes/init.php on line 97

			$db =& new vB_Database_Explain($vbulletin);

Deprecated: Assigning the return value of new by reference is deprecated in /home/azfansc/public_html/forums/includes/init.php on line 101

				$db =& new vB_Database($vbulletin);

Deprecated: Assigning the return value of new by reference is deprecated in /home/azfansc/public_html/forums/includes/init.php on line 109

		$db =& new vB_Database_Slave($vbulletin);

Deprecated: Assigning the return value of new by reference is deprecated in /home/azfansc/public_html/forums/includes/init.php on line 120

			$db =& new vB_Database_MySQLi_Explain($vbulletin);

Deprecated: Assigning the return value of new by reference is deprecated in /home/azfansc/public_html/forums/includes/init.php on line 124

			$db =& new vB_Database_MySQLi($vbulletin);

Deprecated: Assigning the return value of new by reference is deprecated in /home/azfansc/public_html/forums/includes/init.php on line 132

			$db =& new vB_Database_Slave_MySQLi($vbulletin);

Deprecated: Assigning the return value of new by reference is deprecated in /home/azfansc/public_html/forums/includes/init.php on line 201

$vbulletin->datastore =& new $datastore_class($vbulletin, $db);

Deprecated: Assigning the return value of new by reference is deprecated in /home/azfansc/public_html/forums/includes/init.php on line 378

$vbulletin->session =& new vB_Session($vbulletin, $sessionhash, $vbulletin->GPC[COOKIE_PREFIX . 'userid'], $vbulletin->GPC[COOKIE_PREFIX . 'password'], $styleid, $languageid);

Deprecated: Assigning the return value of new by reference is deprecated in /home/azfansc/public_html/forums/includes/class_core.php on line 2518

		$this->input =& new vB_Input_Cleaner($this);

Is it possible to fix these lines and restore my site?

Thanks,

Jon

in my post i tried to answer why you get the errors as solution was posted earlier to my post by using error_reporting

imaging about rewriting wordpress functions for supressing php warning is never suggested!

It’s usually in your PHP install directory. If you can’t find it, you can call

phpinfo()

That will give you information about your php setup, including the location of your ini file. If this is a shared host, you may be able to create a php.ini file in your root directory with the necessary settings. Alternatively, you may try using an .htaccess file to change the setting like so:


php_value date.timezone America/Los_Angeles

And that would go in any directory to which your wordpress install is a descendant.

Thanks, I will try that, but how do I locate my .ini file? I have been looking on my server but can’t seem to find it. Is there a typical name or location in which it would reside?

I’m not sure implying that the poster should rewrite wordpress is the best solution.

You are using php 5.3 version, As of PHP 5.3.0 you will get deprecated warning message when you use & (reference) with function call.

you can look at the details here on reference description…

http://swarajketan.com/2010/07/01/passing-by-reference-in-php5/

It should just be a change in the error reporting to fix (or rather, silence) those errors. If not, Something else that’s not being reported is the problem.

In your INI file, you may need to set your timezone. (Yes, I know it seems ridiculous, but it can cause problems with wordpress on PHP 5.3)
Example:

date.timezone = America/Los_Angeles

You can find a list of timezones here:
http://us3.php.net/manual/en/timezones.php

Where would i find the INI file and what would I change? I fear that it’s not just the reporting, as the page should still load if that was the case…

You should be able to silence the errors by changing the error reporting in the index.php to this:

error_reporting(E_ALL & ~E_DEPRECATED);

You could also change it in the error reporting in your INI file.