PHP: PEAR mail message error - php

I can send an email by the code in this (url:http://stackoverflow.com/questions/712392/send-email-using-gmail-smtp-server-from-php-page)
but the errors shown as following...
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /Users/abc/pear/share/pear/Mail/smtp.php on line 365
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /Users/abc/pear/share/pear/Net/SMTP.php on line 450
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /Users/abc/pear/share/pear/Net/SMTP.php on line 467
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /Users/abc/pear/share/pear/Net/SMTP.php on line 474
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /Users/abc/pear/share/pear/Net/SMTP.php on line 517
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /Users/abc/pear/share/pear/Net/SMTP.php on line 265
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /Users/abc/pear/share/pear/Net/SMTP.php on line 521
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /Users/abc/pear/share/pear/Mail/smtp.php on line 376
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /Users/abc/pear/share/pear/Net/SMTP.php on line 628
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /Users/abc/pear/share/pear/Net/SMTP.php on line 809
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /Users/abc/pear/share/pear/Net/SMTP.php on line 265
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /Users/abc/pear/share/pear/Net/SMTP.php on line 813
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /Users/abc/pear/share/pear/Net/SMTP.php on line 821
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /Users/abc/pear/share/pear/Net/SMTP.php on line 265
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /Users/abc/pear/share/pear/Net/SMTP.php on line 825
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /Users/abc/pear/share/pear/Net/SMTP.php on line 829
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /Users/abc/pear/share/pear/Net/SMTP.php on line 265
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /Users/abc/pear/share/pear/Net/SMTP.php on line 834
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /Users/abc/pear/share/pear/Net/SMTP.php on line 656
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /Users/abc/pear/share/pear/Mail/smtp.php on line 249
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /Users/abc/pear/share/pear/Mail/smtp.php on line 285
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /Users/abc/pear/share/pear/Net/SMTP.php on line 952
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /Users/abc/pear/share/pear/Net/SMTP.php on line 265
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /Users/abc/pear/share/pear/Net/SMTP.php on line 955
Strict Standards: Non-static method Mail_RFC822::parseAddressList() should not be called statically, assuming $this from incompatible context in /Users/abc/pear/share/pear/Mail.php on line 253
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /Users/abc/pear/share/pear/Net/SMTP.php on line 982
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /Users/abc/pear/share/pear/Net/SMTP.php on line 265
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /Users/abc/pear/share/pear/Net/SMTP.php on line 985
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /Users/abc/pear/share/pear/Net/SMTP.php on line 1063
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /Users/abc/pear/share/pear/Net/SMTP.php on line 265
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /Users/abc/pear/share/pear/Net/SMTP.php on line 1066
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /Users/abc/pear/share/pear/Net/SMTP.php on line 1126
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /Users/abc/pear/share/pear/Net/SMTP.php on line 265
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /Users/abc/pear/share/pear/Net/SMTP.php on line 1136
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /Users/abc/pear/share/pear/Net/SMTP.php on line 1141
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /Users/abc/pear/share/pear/Net/SMTP.php on line 491
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /Users/abc/pear/share/pear/Net/SMTP.php on line 265
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /Users/abc/pear/share/pear/Net/SMTP.php on line 494
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /Users/abc/pear/share/pear/Net/SMTP.php on line 497
Strict Standards: Non-static method PEAR::isError() should not be called statically in /Applications/MAMP/htdocs/p/testEmail.php on line 27
Message successfully sent!
in php.ini file, I also change error reporting level to
"error_reporting = E_ALL ^ E_STRICT"
Could anyone help me to solve this problem?

First you're telling PHP to show all errors and strict standard infractions. To ignore the Strict Standards (which are non fatal) change your error reporting level to
// PHP.INI
error_reporting=E_ERROR^E_PARSE
//or better, inline with error_reporting()
error_reporting(E_ERROR | E_PARSE);
The root of the error is PEAR's Mail Class definition. I'm using a Mac Server also and PEAR. It is the better solution for multiple emails, however, it will raise Strict Standard errors. You can ignore.
You probably have this line of code after your send() call.
if (PEAR::isError($mail_object)) {print($mail_object->getMessage());}
I prefer taking this line out and instead using try/catch/exception instead.
I would change your error reporting level with one of the error reporting modifications to your PHP.INI file or inline (best option).

If you're on a cPanel server, go into your PEAR packages and make sure that you've updated your Net Server and SMTP packages. You should install net_socket2 and net_smtp2 packages. This solved my problem with this issue after upgrading to PHP 5.6.

Better late than never. Check this answer: https://stackoverflow.com/questions/19248503/non-static-method-peariserror-should-not-be-called-statically?r=SearchResults&s=1|114.7471
You can use (new PEAR)->isError($variable) or is_a($obj, 'PEAR_Error') but you had better upgrade your code and use more modern libraries.

Related

How to fix the PHP new version script error?

I recently updated PHP version of my PHPlinkdirectory to latest version, but after updating it I started getting following error. I instantly changed the new version to the old but the error still exits.
The PHP is running on version 5.4.
Strict Standards: Only variables should be assigned by reference in /home/domain/public_html/init.php on line 275
Strict Standards: Non-static method SmartyPaginate::connect() should not be called statically in /home/domain/public_html/index.php on line 688
Strict Standards: Non-static method SmartyPaginate::getTotal() should not be called statically in /home/domain/public_html/libs/smarty/SmartyPaginate.class.php on line 51
Strict Standards: Non-static method SmartyPaginate::getUrlVar() should not be called statically in /home/domain/public_html/libs/smarty/SmartyPaginate.class.php on line 52
Strict Standards: Non-static method SmartyPaginate::disconnect() should not be called statically in /home/domain/public_html/index.php on line 693
Strict Standards: Non-static method SmartyPaginate::reset() should not be called statically in /home/domain/public_html/index.php on line 694
Strict Standards: Non-static method SmartyPaginate::setPrevText() should not be called statically in /home/domain/public_html/index.php on line 696
Strict Standards: Non-static method SmartyPaginate::setNextText() should not be called statically in /home/domain/public_html/index.php on line 697
I think it is not about PHP version. You are calling a normal function like it is static but it is not.
You can try to way in here:
public static function connect() {
}
or you can call function like this:
$paginate = new SmartyPaginate;
$paginate->connect();
$paginate->getTotal();

Non-static method error in PHP PEAR Email

Am trying to sending out emails from a PHP application using PEAR. Email is sending out successfully, but i got the below errors. This is the code am using for
include('Mail.php');
include('Mail/mime.php');
$host = "ssl://smtp.gmail.com";
$port = "465";
$username = "test#gmail.com";
$password = "123456";
$to = 'test1#gmail.com';
$from = "TEST <test#gmail.com>";
$replyto = "TEST <test#gmail.com>";
$subject = "TEST";
$name = TEST;
$headers = array('From' => $from, 'To' => $to, 'Subject' => $subject);
$smtp = Mail::factory('smtp', array('host' => $host, 'port' => $port, 'auth' => true, 'username' => $username, 'password' => $password));
$html = "<html>
<head></head>
<body>
<p>Dear " . $name . ",</p>
<p>Test email</p>
</body>
</html>";
$mime_params = array(
'text_encoding' => '7bit',
'text_charset' => 'UTF-8',
'html_charset' => 'UTF-8',
'head_charset' => 'UTF-8'
);
$crlf = "\n";
$mime = new Mail_mime($crlf);
//$body = $mime->get(array('text_charset' => 'utf-8'));
$mime->setHTMLBody($html);
//$mime->addAttachment($file, 'text/plain');
$body = $mime->get($mime_params);
$headers = $mime->headers($headers);
$mail = $smtp->send($to, $headers, $body);
$mail = $smtp->send($bcc, $headers, $body);
if (PEAR::isError($mail)) {
echo("" . $mail->getMessage() . "");
}
Error messages
Strict Standards: Assigning the return value of new by reference is deprecated in /usr/share/php/Mail.php on line 154
Strict Standards: Non-static method Mail::factory() should not be called statically in /var/www/qcmc/registration2016/completed.php on line 252
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Mail/smtp.php on line 225
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Net/SMTP.php on line 339
Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /usr/share/php/PEAR.php on line 281
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Net/SMTP.php on line 344
Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /usr/share/php/PEAR.php on line 281
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Net/SMTP.php on line 347
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Net/SMTP.php on line 390
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Net/SMTP.php on line 196
Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /usr/share/php/PEAR.php on line 281
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Net/SMTP.php on line 394
Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /usr/share/php/PEAR.php on line 281
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Mail/smtp.php on line 236
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Net/SMTP.php on line 494
Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /usr/share/php/PEAR.php on line 281
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Net/SMTP.php on line 637
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Net/SMTP.php on line 196
Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /usr/share/php/PEAR.php on line 281
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Net/SMTP.php on line 641
Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /usr/share/php/PEAR.php on line 281
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Net/SMTP.php on line 649
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Net/SMTP.php on line 196
Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /usr/share/php/PEAR.php on line 281
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Net/SMTP.php on line 653
Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /usr/share/php/PEAR.php on line 281
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Net/SMTP.php on line 657
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Net/SMTP.php on line 196
Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /usr/share/php/PEAR.php on line 281
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Net/SMTP.php on line 662
Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /usr/share/php/PEAR.php on line 281
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Net/SMTP.php on line 528
Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /usr/share/php/PEAR.php on line 281
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Mail.php on line 156
Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /usr/share/php/PEAR.php on line 281
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Mail/smtp.php on line 249
Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /usr/share/php/PEAR.php on line 281
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Mail/smtp.php on line 269
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Net/SMTP.php on line 779
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Net/SMTP.php on line 196
Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /usr/share/php/PEAR.php on line 281
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Net/SMTP.php on line 782
Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /usr/share/php/PEAR.php on line 281
Strict Standards: Non-static method Mail_RFC822::parseAddressList() should not be called statically, assuming $this from incompatible context in /usr/share/php/Mail.php on line 221
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Mail.php on line 224
Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /usr/share/php/PEAR.php on line 281
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Mail/smtp.php on line 276
Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /usr/share/php/PEAR.php on line 281
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Mail/smtp.php on line 282
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Net/SMTP.php on line 809
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Net/SMTP.php on line 196
Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /usr/share/php/PEAR.php on line 281
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Net/SMTP.php on line 812
Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /usr/share/php/PEAR.php on line 281
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Mail/smtp.php on line 291
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Net/SMTP.php on line 871
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Net/SMTP.php on line 196
Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /usr/share/php/PEAR.php on line 281
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Net/SMTP.php on line 874
Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /usr/share/php/PEAR.php on line 281
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Net/SMTP.php on line 878
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Net/SMTP.php on line 196
Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /usr/share/php/PEAR.php on line 281
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Net/SMTP.php on line 881
Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /usr/share/php/PEAR.php on line 281
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Net/SMTP.php on line 364
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Net/SMTP.php on line 196
Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /usr/share/php/PEAR.php on line 281
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Net/SMTP.php on line 367
Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /usr/share/php/PEAR.php on line 281
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Net/SMTP.php on line 370
Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /usr/share/php/PEAR.php on line 281
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Mail/smtp.php on line 225
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Net/SMTP.php on line 339
Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /usr/share/php/PEAR.php on line 281
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Net/SMTP.php on line 344
Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /usr/share/php/PEAR.php on line 281
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Net/SMTP.php on line 347
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Net/SMTP.php on line 390
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Net/SMTP.php on line 196
Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /usr/share/php/PEAR.php on line 281
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Net/SMTP.php on line 394
Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /usr/share/php/PEAR.php on line 281
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Mail/smtp.php on line 236
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Net/SMTP.php on line 494
Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /usr/share/php/PEAR.php on line 281
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Net/SMTP.php on line 637
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Net/SMTP.php on line 196
Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /usr/share/php/PEAR.php on line 281
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Net/SMTP.php on line 641
Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /usr/share/php/PEAR.php on line 281
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Net/SMTP.php on line 649
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Net/SMTP.php on line 196
Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /usr/share/php/PEAR.php on line 281
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Net/SMTP.php on line 653
Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /usr/share/php/PEAR.php on line 281
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Net/SMTP.php on line 657
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Net/SMTP.php on line 196
Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /usr/share/php/PEAR.php on line 281
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Net/SMTP.php on line 662
Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /usr/share/php/PEAR.php on line 281
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Net/SMTP.php on line 528
Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /usr/share/php/PEAR.php on line 281
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Mail.php on line 156
Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /usr/share/php/PEAR.php on line 281
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Mail/smtp.php on line 249
Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /usr/share/php/PEAR.php on line 281
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Mail/smtp.php on line 269
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Net/SMTP.php on line 779
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Net/SMTP.php on line 196
Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /usr/share/php/PEAR.php on line 281
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Net/SMTP.php on line 782
Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /usr/share/php/PEAR.php on line 281
Strict Standards: Non-static method Mail_RFC822::parseAddressList() should not be called statically, assuming $this from incompatible context in /usr/share/php/Mail.php on line 221
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Mail.php on line 224
Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /usr/share/php/PEAR.php on line 281
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Mail/smtp.php on line 276
Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /usr/share/php/PEAR.php on line 281
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Mail/smtp.php on line 282
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Net/SMTP.php on line 809
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Net/SMTP.php on line 196
Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /usr/share/php/PEAR.php on line 281
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Net/SMTP.php on line 812
Strict Standards: Non-static method PEAR::raiseError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Net/SMTP.php on line 303
Strict Standards: Non-static method PEAR::getStaticProperty() should not be called statically, assuming $this from incompatible context in /usr/share/php/PEAR.php on line 871
Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /usr/share/php/PEAR.php on line 281
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Net/SMTP.php on line 1015
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Net/SMTP.php on line 196
Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /usr/share/php/PEAR.php on line 281
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Net/SMTP.php on line 1018
Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /usr/share/php/PEAR.php on line 281
Strict Standards: Non-static method PEAR::raiseError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Mail/smtp.php on line 286
Strict Standards: Non-static method PEAR::getStaticProperty() should not be called statically, assuming $this from incompatible context in /usr/share/php/PEAR.php on line 871
Strict Standards: Non-static method PEAR::isError() should not be called statically in /var/www/qcmc/registration2016/completed.php on line 287
Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /usr/share/php/PEAR.php on line 281
Failed to add recipient: #localhost [SMTP: Invalid response code received from server (code: 555, response: 5.5.2 Syntax error. c20sm50575655pfj.47 - gsmtp)]
Warning: Cannot modify header information - headers already sent by (output started at /usr/share/php/Mail.php:154) in /var/www/qcmc/registration2016/completed.php on line 294
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Net/SMTP.php on line 364
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Net/SMTP.php on line 196
Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /usr/share/php/PEAR.php on line 281
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Net/SMTP.php on line 367
Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /usr/share/php/PEAR.php on line 281
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/php/Net/SMTP.php on line 370
Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /usr/share/php/PEAR.php on line 281
Those are warnings, not errors
This is fixed in PEAR 1.10.1

PEAR Mail not sending after upgrade to PHP5.5

So, recently I updated from 5.3 to 5.5 to use the new password hash api; however PEAR mail is not working now.
Code:
public function email_user($email, $password) {
date_default_timezone_set('America/Chicago');
require '/usr/share/pear/Mail.php';
$from = 'Matthew Harris <user#domain.com>';
$to = $email;
$subject = 'Lunch Club Password';
$headers = array (
'From' => $from,
'To' => $to,
'Subject' => $subject
);
$smtp = Mail::factory('smtp', array(
'host' => $host,
'auth' => true,
'username' => 'user#domain.com',
'password' => 'password',
));
$mail = $smtp->send($to, $headers, $body);
}
Error Log:
[30-Aug-2014 00:26:16 America/Chicago] PHP Notice: Undefined variable: host in /var/www/html/hserv.org/public_html/inc/core.class.php on line 35
[30-Aug-2014 00:26:16 America/Chicago] PHP Notice: Undefined variable: body in /var/www/html/hserv.org/public_html/inc/core.class.php on line 40
[30-Aug-2014 00:26:16 America/Chicago] PHP Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/pear/Mail/smtp.php on line 365
[30-Aug-2014 00:26:16 America/Chicago] PHP Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/pear/Net/SMTP.php on line 448
[30-Aug-2014 00:26:16 America/Chicago] PHP Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/pear/Net/SMTP.php on line 465
[30-Aug-2014 00:26:16 America/Chicago] PHP Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/pear/Net/SMTP.php on line 472
[30-Aug-2014 00:26:16 America/Chicago] PHP Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/pear/Net/SMTP.php on line 515
[30-Aug-2014 00:26:16 America/Chicago] PHP Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/pear/Net/SMTP.php on line 263
[30-Aug-2014 00:26:16 America/Chicago] PHP Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/pear/Net/SMTP.php on line 519
[30-Aug-2014 00:26:16 America/Chicago] PHP Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/pear/Mail/smtp.php on line 376
[30-Aug-2014 00:26:16 America/Chicago] PHP Strict Standards: Non-static method PEAR::raiseError() should not be called statically, assuming $this from incompatible context in /usr/share/pear/Net/SMTP.php on line 615
[30-Aug-2014 00:26:16 America/Chicago] PHP Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/pear/Net/SMTP.php on line 1266
[30-Aug-2014 00:26:16 America/Chicago] PHP Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/pear/Net/SMTP.php on line 263
[30-Aug-2014 00:26:16 America/Chicago] PHP Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/pear/Net/SMTP.php on line 1269
[30-Aug-2014 00:26:16 America/Chicago] PHP Strict Standards: Non-static method PEAR::raiseError() should not be called statically, assuming $this from incompatible context in /usr/share/pear/Mail/smtp.php on line 382
[30-Aug-2014 00:26:16 America/Chicago] PHP Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/pear/Mail/smtp.php on line 249
There is nothing in the mail log and nothing else logging errors.

Strict Standards: Non-static method Crypt_RSA_MathLoader::loadWrapper() should not be called statically

after updating php to 5.5 I get this error:
Strict Standards: Non-static method Crypt_RSA_MathLoader::loadWrapper() should not be called statically, assuming $this from incompatible context in /usr/share/php/Crypt/RSA.php on line 195
Strict Standards: Non-static method Crypt_RSA_MathLoader::loadWrapper() should not be called statically, assuming $this from incompatible context in /usr/share/php/Crypt/RSA/MathLoader.php on line 97
I'm using pear's Crypt_RSA. Thanks.
pear's Crypt_RSA has been deprecated by phpseclib's Crypt_RSA:
http://pear.php.net/package/Crypt_RSA/redirected
you should consider updating.

PHP "Crypt_Blowfish" Class Initiating Errors? [duplicate]

This question already has an answer here:
PHP CRYPT_BLOWFISH Error?
(1 answer)
Closed 9 years ago.
My PHP Crypt_Blowfish class initiation is throwing following error:
Error:
Strict Standards: Non-static method PEAR::raiseError() should not be called statically, assuming $this from incompatible context in /usr/share/pear/Crypt/Blowfish/MCrypt.php on line 155 Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/pear/Crypt/Blowfish.php on line 199 Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/pear/Crypt/Blowfish.php on line 142
Simple Code:
<?php
include_once('/usr/share/pear/Crypt/Blowfish.php');
$cipher = new Crypt_Blowfish("_mysalt_");
?>
Is it because of include ? But when i disabled the include, again it is giving:
Error:
Fatal error: Class 'Crypt_Blowfish' not found in /var/www/html
So what is seriously wrong please?
Now i'm confusing, HOW TO USE Crypt_Blowfish Class please? (Am i initiating it properly OR is there any other standard way to use/initiate it?)
Or, what is the requirement to use that class? (I have run this two installation on my RHEL. yum install php-pear-Crypt-Blowfish and yum install perl-Crypt-Blowfish. And Apache Restarted. Am i still missing something?)
Please help!
Strict standards warnings are no errors. You can remove them from your error_reporting setting easily:
error_reporting(error_reporting() & ~E_STRICT);

Categories