After installation I get a critical error
-
Hiya,
I’m using WP forms for a while and decided to use WP Mail SMTP too. After installing the site actually crashes and showing a critical error. Renaming the folder wp-mail-smtp in solves the problem.The page I need help with: [log in to see the link]
-
Hi @speessie,
could you please let us know what the critical error meesage said, so we could investigate and see what could be causing it.
Thanks and take care!
Hello Gregor,
This is literally what I get:
Er heeft zich een kritieke fout voorgedaan op deze site. Controleer je site beheerder e-mail inbox voor instructies. Meer informatie over probleemoplossing in WordPress.Didn’t receive the e-mail though…
Best,
Bas-
This reply was modified 4 years, 8 months ago by
speessie.
Hi @speessie,
please set up the WP debugging and retry the plugin activation. The error message should be logged in the debug.log file on your server. More info on how to set up WP debugging can be found here.
Take care!
Hello Gregor,
This is the result:
[24-May-2021 12:29:35 UTC] PHP Deprecated: class-phpmailer.php is <strong>verouderd</strong> sinds versie 5.5.0. Gebruik in plaats daarvan wp-includes/PHPMailer/PHPMailer.php. The PHPMailer class has been moved to wp-includes/PHPMailer subdirectory and now uses the PHPMailer\PHPMailer namespace. in /www/wp-includes/functions.php on line 5051 [24-May-2021 12:29:35 UTC] PHP Deprecated: class-smtp.php is <strong>verouderd</strong> sinds versie 5.5.0. Gebruik in plaats daarvan wp-includes/PHPMailer/SMTP.php. The SMTP class has been moved to the wp-includes/PHPMailer subdirectory and now uses the PHPMailer\PHPMailer namespace. in /www/wp-includes/functions.php on line 5051 [24-May-2021 12:29:36 UTC] PHP Deprecated: class-phpmailer.php is <strong>verouderd</strong> sinds versie 5.5.0. Gebruik in plaats daarvan wp-includes/PHPMailer/PHPMailer.php. The PHPMailer class has been moved to wp-includes/PHPMailer subdirectory and now uses the PHPMailer\PHPMailer namespace. in /www/wp-includes/functions.php on line 5051 [24-May-2021 12:29:36 UTC] PHP Deprecated: class-smtp.php is <strong>verouderd</strong> sinds versie 5.5.0. Gebruik in plaats daarvan wp-includes/PHPMailer/SMTP.php. The SMTP class has been moved to the wp-includes/PHPMailer subdirectory and now uses the PHPMailer\PHPMailer namespace. in /www/wp-includes/functions.php on line 5051 [24-May-2021 12:29:36 UTC] PHP Deprecated: class-phpmailer.php is <strong>verouderd</strong> sinds versie 5.5.0. Gebruik in plaats daarvan wp-includes/PHPMailer/PHPMailer.php. The PHPMailer class has been moved to wp-includes/PHPMailer subdirectory and now uses the PHPMailer\PHPMailer namespace. in /www/wp-includes/functions.php on line 5051 [24-May-2021 12:29:36 UTC] PHP Deprecated: class-smtp.php is <strong>verouderd</strong> sinds versie 5.5.0. Gebruik in plaats daarvan wp-includes/PHPMailer/SMTP.php. The SMTP class has been moved to the wp-includes/PHPMailer subdirectory and now uses the PHPMailer\PHPMailer namespace. in /www/wp-includes/functions.php on line 5051 [24-May-2021 12:29:51 UTC] PHP Fatal error: Uncaught TypeError: Argument 1 passed to WPMailSMTP\Providers\MailerAbstract::__construct() must implement interface WPMailSMTP\MailCatcherInterface, instance of PHPMailer\PHPMailer\PHPMailer given, called in /www/wp-content/plugins/wp-mail-smtp/src/Providers/Loader.php on line 195 and defined in /www/wp-content/plugins/wp-mail-smtp/src/Providers/MailerAbstract.php:103 Stack trace: #0 /www/wp-content/plugins/wp-mail-smtp/src/Providers/Loader.php(195): WPMailSMTP\Providers\MailerAbstract->__construct(Object(PHPMailer\PHPMailer\PHPMailer)) #1 /www/wp-content/plugins/wp-mail-smtp/src/Providers/Loader.php(151): WPMailSMTP\Providers\Loader->get_entity('smtp', 'Mailer') #2 /www/wp-content/plugins/wp-mail-smtp/src/Admin/Review.php(106): WPMailSMTP\Providers\Loader->get_mailer('smtp', Object(PHPMailer\PHPMailer\PHPMailer)) #3 /www/wp-content/plugins/wp-mail-smtp/src/Admin/Review.php(78): WPMailSMTP\Admin\Review->review() #4 /www/wp-includes/class-wp-hook.php(292): WPMailSMTP\Admin\Review->review_request('') #5 /www/w in /www/wp-content/plugins/wp-mail-smtp/src/Providers/MailerAbstract.php on line 103 [24-May-2021 12:29:52 UTC] PHP Deprecated: class-phpmailer.php is <strong>verouderd</strong> sinds versie 5.5.0. Gebruik in plaats daarvan wp-includes/PHPMailer/PHPMailer.php. The PHPMailer class has been moved to wp-includes/PHPMailer subdirectory and now uses the PHPMailer\PHPMailer namespace. in /www/wp-includes/functions.php on line 5051 [24-May-2021 12:29:52 UTC] PHP Deprecated: class-smtp.php is <strong>verouderd</strong> sinds versie 5.5.0. Gebruik in plaats daarvan wp-includes/PHPMailer/SMTP.php. The SMTP class has been moved to the wp-includes/PHPMailer subdirectory and now uses the PHPMailer\PHPMailer namespace. in /www/wp-includes/functions.php on line 5051 [24-May-2021 12:29:52 UTC] PHP Deprecated: class-phpmailer.php is <strong>verouderd</strong> sinds versie 5.5.0. Gebruik in plaats daarvan wp-includes/PHPMailer/PHPMailer.php. The PHPMailer class has been moved to wp-includes/PHPMailer subdirectory and now uses the PHPMailer\PHPMailer namespace. in /www/wp-includes/functions.php on line 5051 [24-May-2021 12:29:52 UTC] PHP Deprecated: class-smtp.php is <strong>verouderd</strong> sinds versie 5.5.0. Gebruik in plaats daarvan wp-includes/PHPMailer/SMTP.php. The SMTP class has been moved to the wp-includes/PHPMailer subdirectory and now uses the PHPMailer\PHPMailer namespace. in /www/wp-includes/functions.php on line 5051 [24-May-2021 12:29:52 UTC] PHP Deprecated: class-phpmailer.php is <strong>verouderd</strong> sinds versie 5.5.0. Gebruik in plaats daarvan wp-includes/PHPMailer/PHPMailer.php. The PHPMailer class has been moved to wp-includes/PHPMailer subdirectory and now uses the PHPMailer\PHPMailer namespace. in /www/wp-includes/functions.php on line 5051 [24-May-2021 12:29:52 UTC] PHP Deprecated: class-smtp.php is <strong>verouderd</strong> sinds versie 5.5.0. Gebruik in plaats daarvan wp-includes/PHPMailer/SMTP.php. The SMTP class has been moved to the wp-includes/PHPMailer subdirectory and now uses the PHPMailer\PHPMailer namespace. in /www/wp-includes/functions.php on line 5051Some error with PHPmailer I guess?
Hello Gregor,
After posting this I did some research: seems that my host added some code after the “stop editing” line in wp-config:/** HOST fix: sendmail does not support flags. This fix is needed in order to make mailing work. */ global $phpmailer; if ((!is_object( $phpmailer ) || !is_a( $phpmailer, 'PHPMailer' )) && file_exists(ABSPATH . '/wp-includes/class-phpmailer.php') && file_exists(ABSPATH . '/wp-includes/class-smtp.php')) { require_once ABSPATH . '/wp-includes/class-phpmailer.php'; require_once ABSPATH . '/wp-includes/class-smtp.php'; $phpmailer = new PHPMailer( true ); } $phpmailer->UseSendmailOptions = false;I will set this through to them and let you know. However, that does leave the few lines:
[24-May-2021 12:29:51 UTC] PHP Fatal error: Uncaught TypeError: Argument 1 passed to WPMailSMTP\Providers\MailerAbstract::__construct() must implement interface WPMailSMTP\MailCatcherInterface, instance of PHPMailer\PHPMailer\PHPMailer given, called in /www/wp-content/plugins/wp-mail-smtp/src/Providers/Loader.php on line 195 and defined in /www/wp-content/plugins/wp-mail-smtp/src/Providers/MailerAbstract.php:103 Stack trace: #0 /www/wp-content/plugins/wp-mail-smtp/src/Providers/Loader.php(195): WPMailSMTP\Providers\MailerAbstract->__construct(Object(PHPMailer\PHPMailer\PHPMailer)) #1 /www/wp-content/plugins/wp-mail-smtp/src/Providers/Loader.php(151): WPMailSMTP\Providers\Loader->get_entity('smtp', 'Mailer') #2 /www/wp-content/plugins/wp-mail-smtp/src/Admin/Review.php(106): WPMailSMTP\Providers\Loader->get_mailer('smtp', Object(PHPMailer\PHPMailer\PHPMailer)) #3 /www/wp-content/plugins/wp-mail-smtp/src/Admin/Review.php(78): WPMailSMTP\Admin\Review->review() #4 /www/wp-includes/class-wp-hook.php(292): WPMailSMTP\Admin\Review->review_request('') #5 /www/w in /www/wp-content/plugins/wp-mail-smtp/src/Providers/MailerAbstract.php on line 103Best,
BasHi @speessie,
it looks like some other plugin or maybe your theme (or any sort of custom code) is changing the WordPress’ global
phpmailerobject…Do you maybe have some other SMTP plugins active or maybe some hosting’s must-use plugins? Or does your theme change the WP email sending settings/objects?
You could try to deactivate all other plugins and try to activate only our WP Mail SMTP plugin and see if the issue is gone. That would mean some other plugin is causing a conflict with our plugin… The same could be done for a theme (switch to a default WP theme). And also check any must-use plugins.
Take care!
Hi @speessie,
yeah, that’s probably it! Try to comment out (or remove) this code in wp-config.php and see if our plugin works OK then.
Take care!
Solved.
So what I did:
1) Disabled the phpmailer code in wp-config.php (no errors).
2) Rename the WP-Mail plugin (no errors).Thank you for you respons and I hope that others can solve this problem themselves. I did ask the Host (TransIP) to fix this issue as they are the ones who added the code in the first place. Not only in my wp-config.php but all of their customers. So I believe they should remove it everywhere.
Best,
BasHi @speessie,
I’m glad you were able to resolve this issue.
Thanks for sharing the solution with everyone.
Have a nice day!
-
This reply was modified 4 years, 8 months ago by
The topic ‘After installation I get a critical error’ is closed to new replies.