问题
I get a LOT of errors when i Open up a newly installed PEAR package on a WAMP server. Here's the error messages.
What can i do?
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp\www\PEAR\PEAR\Config.php on line 650
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp\www\PEAR\PEAR\Config.php on line 697
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp\www\PEAR\PEAR\Config.php on line 757
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp\www\PEAR\PEAR\Config.php on line 786
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp\www\PEAR\PEAR\Config.php on line 914
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp\www\PEAR\PEAR\Config.php on line 1577
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp\www\PEAR\PEAR\Config.php on line 1607
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp\www\PEAR\PEAR\Config.php on line 2038
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp\www\PEAR\PEAR\Config.php on line 2091
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp\www\PEAR\PEAR\Registry.php on line 322
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp\www\PEAR\PEAR\Registry.php on line 1450
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp\www\PEAR\PEAR\Registry.php on line 1458
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp\www\PEAR\PEAR\Frontend.php on line 91
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp\www\PEAR\PEAR\Command.php on line 137
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp\www\PEAR\PEAR\Command.php on line 154
Deprecated: Function set_magic_quotes_runtime() is deprecated in C:\wamp\www\PEAR\PEAR\Config.php on line 1026
Deprecated: Function set_magic_quotes_runtime() is deprecated in C:\wamp\www\PEAR\PEAR\Config.php on line 1033
Deprecated: Function set_magic_quotes_runtime() is deprecated in C:\wamp\www\PEAR\PEAR\DependencyDB.php on line 554
Deprecated: Function set_magic_quotes_runtime() is deprecated in C:\wamp\www\PEAR\PEAR\DependencyDB.php on line 558
Deprecated: Function set_magic_quotes_runtime() is deprecated in C:\wamp\www\PEAR\PEAR\Registry.php on line 1179
Deprecated: Function set_magic_quotes_runtime() is deprecated in C:\wamp\www\PEAR\PEAR\Registry.php on line 1183
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp\www\PEAR\PEAR\ChannelFile.php on line 199
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp\www\PEAR\PEAR\ChannelFile.php on line 1504
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp\www\PEAR\PEAR\ChannelFile.php on line 1516
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp\www\PEAR\PEAR\ChannelFile.php on line 1524
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp\www\PEAR\PEAR\ChannelFile.php on line 1527
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp\www\PEAR\PEAR\Common.php on line 492
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp\www\PEAR\PEAR\Common.php on line 511
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp\www\PEAR\PEAR\Common.php on line 530
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp\www\PEAR\PEAR\Common.php on line 574
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp\www\PEAR\PEAR\Common.php on line 607
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp\www\PEAR\PEAR\Common.php on line 629
回答1:
"Deprecated" means that a function or feature is no longer considered a good idea and will be removed in a future version of PHP. Since these are warnings about libraries you're using, you don't need to do anything yet except to make sure your PEAR version and packages are up to date. The libraries you use will need to be updated to make these warnings go away.
In a future version of PHP, the functions listed in your warnings will go away. You will then get fatal errors if your libraries have not been updated. Before you do another big PHP upgrade, make sure you have no deprecation warnings, or check them against the PHP upgrade docs to see if you will be impacted.
If you're getting these errors in your browser, adjust your error reporting settings. One way to do it:
error_reporting(E_ALL & ~E_DEPRECATED);
来源:https://stackoverflow.com/questions/2246546/pear-error-messages-with-php5-3-0