Pear error messages with PHP5.3.0 - php

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

"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);

Related

Error on server SMTP - PEAR.php on line 557

My application inquiry form is working on last 2 years
But now I am fill all information on my inquiry page and submit
Expected: successfully send message
Actual: I don't get any email in my email account
I have to check my server log its some error
error_log file
[21-Oct-2013 09:44:07 Europe/Minsk] PHP Deprecated: Assigning the return value of new by reference is deprecated in /home/public_html/includes/common/lib/email/Pear/PEAR.php on line 557
[21-Oct-2013 09:44:07 Europe/Minsk] PHP Deprecated: Assigning the return value of new by reference is deprecated in /home/public_html/includes/common/lib/email/Pear/PEAR.php on line 560
[21-Oct-2013 09:44:07 Europe/Minsk] PHP Deprecated: Assigning the return value of new by reference is deprecated in /home/public_html/includes/common/lib/email/Pear/Mail.php on line 134
[21-Oct-2013 09:44:07 Europe/Minsk] PHP Deprecated: Assigning the return value of new by reference is deprecated in /home/public_html/includes/common/lib/email/Pear/Mail/smtp.php on line 189
[21-Oct-2013 09:44:07 Europe/Minsk] PHP Deprecated: Assigning the return value of new by reference is deprecated in /home/public_html/includes/common/lib/email/Pear/Net/SMTP.php on line 127
Help me to sort out this issue
Try to send mail with mail("somebody#example.com","My subject",$txt);
kindly check reference http://www.w3schools.com/php/func_mail_mail.asp
there is showing error while value assign to the variable you have declare.kindly check

Deprecated: Function ereg_replace() is deprecated in /home/user/public_html/includes/functions.php on line 62 [duplicate]

This question already has answers here:
How can I convert ereg expressions to preg in PHP?
(4 answers)
Closed 9 years ago.
When I type my Website URL It's all right. But When I press the sub-category to view the inner content then the problem is occur. There is 5 folder in my public_html..
They are:
1.admin
2.avatars
3.FTP
4.images
5.includes
and some php files. This is a script.
I can't php.
There's some Error...
Deprecated: Function ereg_replace() is deprecated in /home/exwggayd/public_html/includes/functions.php on line 62
Deprecated: Assigning the return value of new by reference is deprecated in /home/exwggayd/public_html/includes/phpflickr/phpFlickr.php on line 91
Deprecated: Assigning the return value of new by reference is deprecated in /home/exwggayd/public_html/includes/phpflickr/phpFlickr.php on line 330
Deprecated: Assigning the return value of new by reference is deprecated in /home/exwggayd/public_html/includes/phpflickr/phpFlickr.php on line 399
Deprecated: Assigning the return value of new by reference is deprecated in /home/exwggayd/public_html/includes/phpflickr/phpFlickr.php on line 468
Deprecated: Assigning the return value of new by reference is deprecated in /home/exwggayd/public_html/includes/phpflickr/PEAR/HTTP/Request.php on line 228
Deprecated: Assigning the return value of new by reference is deprecated in /home/exwggayd/public_html/includes/phpflickr/PEAR/HTTP/Request.php on line 324
Deprecated: Assigning the return value of new by reference is deprecated in /home/exwggayd/public_html/includes/phpflickr/PEAR/HTTP/Request.php on line 602
Deprecated: Assigning the return value of new by reference is deprecated in /home/exwggayd/public_html/includes/phpflickr/PEAR/HTTP/Request.php on line 621
Strict Standards: Redefining already defined constructor for class Net_URL in /home/exwggayd/public_html/includes/phpflickr/PEAR/Net/URL.php on line 122
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /home/exwggayd/public_html/includes/phpflickr/PEAR/HTTP/Request.php on line 590
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /home/exwggayd/public_html/includes/phpflickr/PEAR/HTTP/Request.php on line 591
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /home/exwggayd/public_html/includes/phpflickr/PEAR/HTTP/Request.php on line 603
#
The function.php inside the "includes" folder...may be there is the problem. But When I reload the page Everything Seems allright.
Here is the Codes...Paste on Pastebin!!
function.php# http://pastebin.com/PR4RKSJS
phpFlickr.php# http://pastebin.com/zzaVehBx
Request.php# hxxp://pastebin.com/MPfq5zAL
URL.php# hxxp://pastebin.com/yDMvA7e5
You should use preg_replace() instead.
ereg_replace() is now deprecated : http://php.net/manual/en/function.ereg-replace.php
It's a warning about using old function "ereg_replace", which could be easilly replaced by preg_replace.
For example, the code at line#62 of yours functions.php file:
$string = ereg_replace(' +', ' ', trim($string));
could be replaced to:
$string = preg_replace('# +#', ' ',trim($string));
where '#' - is a regular expresiion start and end sign, you can use "/", "|" or some others special signs instead of it ('/' it not recommended in your case, because it require to escape '/' characters in the regexp string, and, as you are "cant php", this could be difficult to you)
Other lines with "ereg_replace" can be fixed just the same way

how to solve the Deprecated problem For SEO

I've just got an error.
When I try to assign an object like this: am doing for SEO by google php seo scripts.
Deprecated: Assigning the return value of new by reference is deprecated in E:\wamp\www\subgoogle\nusoap.php on line 3703
Deprecated: Function ereg() is deprecated in E:\wamp\www\subgoogle\nusoap.php on line 3876
Deprecated: Function ereg() is deprecated in E:\wamp\www\subgoogle\nusoap.php on line 3896
Deprecated: Function ereg() is deprecated in E:\wamp\www\subgoogle\nusoap.php on line 1451
Notice: Uninitialized string offset: 0 in E:\wamp\www\subgoogle\searchgoosimple.php on line 89
Sorry, no search results found
The error I get is "Assigning the return value of new by reference is deprecated". Actually I've been looking for a solution but the only one I've seen is just turn down the politicy of nusoap.php (error_reporting). I've tried it too, but it didn't work.
It's so confusing..I hope you could help me. Thanks in advance.
Each of these error messages carries a line number and a filename:
Deprecated: Assigning the return value of new by reference is deprecated in E:\wamp\www\subgoogle\nusoap.php on line 3703
Go there, and remove the & before the new.
To get rid of the other warnings, use following setting in your main script to reduce the error reporting level:
error_reporting(E_ALL);
You'll have to find eventual other instances of error_reporting( and adapt them too.

PayPal error messages on PHP 5.3.1

I'm integrating PayPal in an application written in PHP and running on PHP 5.3.1 (using Zend Engine 2.3.0).
Every time I require a PayPal SDK file or use any of the methods it prints out an enormous amount of error and warning messages.
I obviously want to keep error message reporting at the maximum level possible (at least for my code).
My problem is similar to this one (I didn't write that) https://www.x.com/message/167121#167121
I'm concerned with possible security issues and with the obvious annoying amount of messages going into the log.
Do you have any idea of how to fix/work around this?
Thanks :)
EDIT:
A sample from the warning list (there are more):
As an example (but there are more):
Strict Standards: Assigning the return
value of new by reference is
deprecated in (...)/PayPal.php on line
87
Strict Standards: Assigning the return
value of new by reference is
deprecated in (...)/PayPal.php on line
115
Strict Standards: Declaration of
PayPal::raiseError() should be
compatible with that of
PEAR::raiseError() in (...)/PayPal.php
on line 198
Strict Standards: Assigning the return
value of new by reference is
deprecated in (...)/PayPal/Hack.php on
line 78
Strict Standards: Assigning the return
value of new by reference is
deprecated in
(...)/PayPal/SOAP/Value.php on line 90
Strict Standards: Assigning the return
value of new by reference is
deprecated in
(...)/PayPal/SOAP/Value.php on line 93
Strict Standards: Assigning the return
value of new by reference is
deprecated in
(...)/PayPal/SOAP/Base.php on line 221
Strict Standards: Assigning the return
value of new by reference is
deprecated in
(...)/PayPal/SOAP/Base.php on line 514
Strict Standards: Assigning the return
value of new by reference is
deprecated in
(...)/PayPal/SOAP/Base.php on line 616
Strict Standards: Assigning the return
value of new by reference is
deprecated in
(...)/PayPal/SOAP/Base.php on line 617
Strict Standards: Assigning the return
value of new by reference is
deprecated in
(...)/PayPal/SOAP/Base.php on line 760
Strict Standards: Assigning the return
value of new by reference is
deprecated in
(...)/PayPal/SOAP/Base.php on line 897
Strict Standards: Assigning the return
value of new by reference is
deprecated in
(...)/PayPal/SOAP/Base.php on line
1055
Strict Standards: Assigning the return
value of new by reference is
deprecated in
(...)/PayPal/SOAP/Base.php on line
1083
Strict Standards: Assigning the return
value of new by reference is
deprecated in
(...)/PayPal/SOAP/Base.php on line
1109
Strict Standards: Assigning the return
value of new by reference is
deprecated in
(...)/PayPal/SOAP/Base.php on line
1151
Strict Standards: Assigning the return
value of new by reference is
deprecated in
(...)/PayPal/SOAP/Base.php on line
1176
Strict Standards: Assigning the return
value of new by reference is
deprecated in
(...)/PayPal/Type/XSDType.php on line
97
Strict Standards: Assigning the return
value of new by reference is
deprecated in
(...)/PayPal/Type/XSDType.php on line
110
Strict Standards: Assigning the return
value of new by reference is
deprecated in
(...)/PayPal/Type/XSDType.php on line
112
Strict Standards: Assigning the return
value of new by reference is
deprecated in
(...)/PayPal/Profile/Handler/Array.php
on line 53
Strict Standards: Assigning the return
value of new by reference is
deprecated in
(...)/PayPal/Profile/API.php on line
256
Strict Standards: Assigning the return
value of new by reference is
deprecated in
(...)/PayPal/Type/XSDSimpleType.php on
line 69
Strict Standards: Assigning the return
value of new by reference is
deprecated in
(...)/PayPal/Type/XSDSimpleType.php on
line 71
Strict Standards: Assigning the return
value of new by reference is
deprecated in
(...)/PayPal/Type/XSDSimpleType.php on
line 98
Strict Standards: Assigning the return
value of new by reference is
deprecated in
(...)/PayPal/Type/XSDSimpleType.php on
line 111
Strict Standards: Assigning the return
value of new by reference is
deprecated in
(...)/PayPal/Type/XSDSimpleType.php on
line 113
I assume that PayPal Code is an external library from the PEAR Package your using that isn't 5.3 Strict comparable. There quite some Code that suffers from that Problem.
Assuming you don't want to change that Code and Submit it back ( ;) ) there aren't so many things you can do.
To name the first two that come to mind:
In your wrapper Code for the Paypal access turn of E_STRICT everytime before the call and back on after.
E.g.
<?php
class myPayPalWrapper {
public function doX() {
$x = error_reporting(E_ALL & ~E_STRICT); # or something
$this->externalPaypalClass->doX();
error_reporting($x);
}
}
doesn't look really pretty and requires a good amount of code.
If your are already using a custom errorhandler in your project you could extend that to filter out all errors of that lib.
E.g.
<?php
function myErrorHandler($iErrno, $sErrstr, $sErrfile, $iErrline) {
if(error_reporting() & $iErrno) {
if(strpos("libFolder/paypal", $sErrfile) !== false) {
return true;
}
}
return false;
}
Hope that helps

Php, DbSimple error

I work with DbSimple in my site-engine. Everything worked fine but some time ago I began to get an error:
Deprecated: Assigning the return value of new by reference is deprecated in Z:\home\localhost\www\ololo\DbSimple\Generic.php on line 113
Deprecated: Assigning the return value of new by reference is deprecated in Z:\home\localhost\www\ololo\DbSimple\Generic.php on line 133
Deprecated: Assigning the return value of new by reference is deprecated in Z:\home\localhost\www\ololo\DbSimple\Mysql.php on line 73
Warning: call_user_func() expects parameter 1 to be a valid callback, function 'mysqlErrorHandler' not found or invalid function name in Z:\home\localhost\www\ololo\DbSimple\Generic.php on line 1278
SELECT * FROM `configuration`
NULL
What can it be?
My guess is that you upgraded PHP from 5.2.x to 5.3. I've seen similar issues with Joomla.
EDIT:
Deprecated features in PHP 5.3.x

Categories