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();
Related
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
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.
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);
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.
I've been asked to move someone's blog from a Linux server to a Windows 2008 box. I used Xampp on the new box. When I try to access the blog I get the following errors:
Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\htdocs\newblogBlog\httpdocs\wp-settings.php on line 472
Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\htdocs\newblogBlog\httpdocs\wp-settings.php on line 487
Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\htdocs\newblogBlog\httpdocs\wp-settings.php on line 494
Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\htdocs\newblogBlog\httpdocs\wp-settings.php on line 530
Strict Standards: Declaration of Walker_Page::start_lvl() should be compatible with Walker::start_lvl(&$output) in C:\xampp\htdocs\newblogBlog\httpdocs\wp-includes\classes.php on line 594
Strict Standards: Declaration of Walker_Page::end_lvl() should be compatible with Walker::end_lvl(&$output) in C:\xampp\htdocs\newblogBlog\httpdocs\wp-includes\classes.php on line 594
Strict Standards: Declaration of Walker_Page::start_el() should be compatible with Walker::start_el(&$output) in C:\xampp\htdocs\newblogBlog\httpdocs\wp-includes\classes.php on line 594
Strict Standards: Declaration of Walker_Page::end_el() should be compatible with Walker::end_el(&$output) in C:\xampp\htdocs\newblogBlog\httpdocs\wp-includes\classes.php on line 594
Strict Standards: Declaration of Walker_PageDropdown::start_el() should be compatible with Walker::start_el(&$output) in C:\xampp\htdocs\newblogBlog\httpdocs\wp-includes\classes.php on line 611
Strict Standards: Declaration of Walker_Category::start_lvl() should be compatible with Walker::start_lvl(&$output) in C:\xampp\htdocs\newblogBlog\httpdocs\wp-includes\classes.php on line 705
Strict Standards: Declaration of Walker_Category::end_lvl() should be compatible with Walker::end_lvl(&$output) in C:\xampp\htdocs\newblogBlog\httpdocs\wp-includes\classes.php on line 705
Strict Standards: Declaration of Walker_Category::start_el() should be compatible with Walker::start_el(&$output) in C:\xampp\htdocs\newblogBlog\httpdocs\wp-includes\classes.php on line 705
Strict Standards: Declaration of Walker_Category::end_el() should be compatible with Walker::end_el(&$output) in C:\xampp\htdocs\newblogBlog\httpdocs\wp-includes\classes.php on line 705
Strict Standards: Declaration of Walker_CategoryDropdown::start_el() should be compatible with Walker::start_el(&$output) in C:\xampp\htdocs\newblogBlog\httpdocs\wp-includes\classes.php on line 728
Strict Standards: Redefining already defined constructor for class wpdb in C:\xampp\htdocs\newblogBlog\httpdocs\wp-includes\wp-db.php on line 306
Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\htdocs\newblogBlog\httpdocs\wp-includes\cache.php on line 103
Strict Standards: Redefining already defined constructor for class WP_Object_Cache in C:\xampp\htdocs\newblogBlog\httpdocs\wp-includes\cache.php on line 425
Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\htdocs\newblogBlog\httpdocs\wp-includes\query.php on line 21
Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\htdocs\newblogBlog\httpdocs\wp-includes\theme.php on line 623
Strict Standards: Redefining already defined constructor for class WP_Dependencies in C:\xampp\htdocs\newblogBlog\httpdocs\wp-includes\class.wp-dependencies.php on line 15
Warning: Creating default object from empty value in C:\xampp\htdocs\newblogBlog\httpdocs\wp-includes\update.php on line 39
Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\newblogBlog\httpdocs\wp-includes\class.wp-dependencies.php:15) in C:\xampp\htdocs\newblogBlog\httpdocs\wp-includes\pluggable.php on line 770
Any ideas?
I think your php.ini in your linux server was desactivating errors reporting.
For the strict standards you can hide them by removing E_STRICT from the option error_reporting in you php.ini file (but it may be better to fix them).
for the rest of the issues I do recommand you to fix them, especialy the warnings.
Also check that the PHP version in linux is the same as in windows, migrating from a version to another may result in issues like this.
check the used php-version on the server and on the xammp-box. You can do this with creating a single file that contains the single line
<?php phpinfo(); ?>
This gives you the used versions. If you can use the same versions on old and new system you can get less warnings, perhaps...
And if there are still the warnings, you can filter them out with the right entries in the php.ini.
it is recommended for a productive system to not display errors, someone could use the information to hack your system... you can change the detail level of displaying errors as mentioned by Yazmat, or turn off the displaying of errors in php.ini like this:
display_errors = 0