wiki:faq/server/php-53-errors

Version 3 (modified by Dana, 7 years ago) (diff)

--

Why am I getting errors about values, references and deprecated functions?

You may see errors when you visit your web site that are like these:

warning: Parameter 1 to admin_menu_admin_menu() expected to be a reference, value given in /home/members/voterevbilly/sites/revbilly.com/web/includes/module.inc on line 471.
: Function ereg() is deprecated in /home/members/voterevbilly/sites/revbilly.com/web/includes/file.inc on line 895. 
: Function ereg() is deprecated in /home/members/voterevbilly/sites/revbilly.com/web/includes/file.inc on line 895.

On June 3 and June 4, 2011, we upgraded most of our servers. As part of the upgrade, we began using PHP 5.3 (This version of PHP was released to the world nearly 2 years ago.).

PHP 5.3 introduced many changes in the PHP language. Because of these changes, many older web applications or web applications that are not properly tested with PHP 5.3 may report warnings.

If you are seeing these warnings, your best option is to upgrade the web application that is causing them. If you are unable to do that, you can place this line of code in your web applications configuration file:

error_reporting(0);

That line will suppress all PHP warnings.

Drupal Users

If you are running Drupal 5, we have automatically added the error_reporting(0); line to your settings.php file.

If you are running a version of Drupal older than Drupal 5, you should add that line yourself (and seriously plan to upgrade your installation!).

If you are running Drupal 6 and you see warnings like the ones listed above, please be sure to upgrade all of your third party modules, particularly the calendar and date module. Alternatively, you can add the error_reporting(0); line to your settings.php file as a temporary measure.

For the parameter 1 to theme_field() expected to be a reference, a patch needs to be applied: #4257