PHP Fatal error: Uncaught Error: Class “PDO” not found
-
When submitting a contact form message on our site, Fluent SMTP throws this critical error:
[02-Dec-2025 10:03:34 UTC] PHP Fatal error: Uncaught Error: Class "PDO" not found in /home/our-site/wp-content/plugins/fluent-smtp/app/Services/DB/QueryBuilder/QueryBuilderHandler.php:49
Stack trace:
#0 /home/our-site/wp-content/plugins/fluent-smtp/app/Services/DB/wpfluent.php(17): [constant expression]()
#1 /home/our-site/wp-content/plugins/fluent-smtp/app/Functions/helpers.php(852): FluentSmtpDb()
#2 /home/our-site/wp-content/plugins/fluent-smtp/app/Models/Model.php(28): fluentMailDb()
#3 /home/our-site/wp-content/plugins/fluent-smtp/app/Models/Logger.php(232): FluentMail\App\Models\Model->getDb()
#4 /home/our-site/wp-content/plugins/fluent-smtp/app/Services/Mailer/BaseHandler.php(322): FluentMail\App\Models\Logger->add()
#5 /home/our-site/wp-content/plugins/fluent-smtp/app/Services/Mailer/Providers/DefaultMail/Handler.php(36): FluentMail\App\Services\Mailer\BaseHandler->processResponse()
#6 /home/our-site/wp-content/plugins/fluent-smtp/app/Services/Mailer/Providers/DefaultMail/Handler.php(23): FluentMail\App\Services\Mailer\Providers\DefaultMail\Handler->handleSuccess()
#7 /home/our-site/wp-content/plugins/fluent-smtp/app/Services/Mailer/Providers/DefaultMail/Handler.php(13): FluentMail\App\Services\Mailer\Providers\DefaultMail\Handler->postSend()
#8 /home/our-site/wp-content/plugins/fluent-smtp/app/Services/Mailer/FluentPHPMailer.php(28): FluentMail\App\Services\Mailer\Providers\DefaultMail\Handler->send()
#9 /home/our-site/wp-content/plugins/fluent-smtp/app/Functions/helpers.php(613): FluentMail\App\Services\Mailer\FluentPHPMailer->send()
#10 /home/our-site/wp-content/plugins/fluent-smtp/fluent-smtp.php(49): fluentMailSend()
#11 /home/our-site/wp-content/plugins/elementor-pro/modules/forms/actions/email.php(364): wp_mail()
#12 /home/our-site/wp-content/plugins/elementor-pro/modules/forms/classes/ajax-handler.php(159): ElementorPro\Modules\Forms\Actions\Email->run()
#13 /home/our-site/wp-includes/class-wp-hook.php(324): ElementorPro\Modules\Forms\Classes\Ajax_Handler->ajax_send_form()
#14 /home/our-site/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#15 /home/our-site/wp-includes/plugin.php(517): WP_Hook->do_action()
#16 /home/our-site/wp-admin/admin-ajax.php(207): do_action()
#17 {main}
thrown in /home/our-site/wp-content/plugins/fluent-smtp/app/Services/DB/QueryBuilder/QueryBuilderHandler.php on line 49We have PDO disabled for security/performance reasons and don’t need to enable it; even with the fatal error above, the email still gets sent out successfully. However, FluentSMTP is breaking the form’s AJAX response after sending out the email.
Steps to reproduce:
1. Install Fluent SMTP and set it to use the default PHP mailer.
2. Add a form to the site, like an Elementor form.
3. Disable PDO on the server.
4. Attempt to submit the form; the form submission will be successful and the email will be sent out, but Fluent SMTP will throw a fatal error afterwards, breaking the AJAX response and resulting in the plugin not logging the email.It looks like a similar issue was raised here back in March and that some kind of partial fix was made to the plugin back then, but it’s still not handling this situation correctly. In the situation above, the plugin needs to check whether PDO is enabled and work around it to prevent the fatal error while ideally still logging the email.
If PDO is truly essential here (which doesn’t look to be the case, since the email still gets sent out), then the plugin should at least check for this ahead of time and warn the admin that it needs to be enabled, such as with a notification on the wp-admin dashboard.
You must be logged in to reply to this topic.