Plugin should fail gracefully when “pdo” PHP module not installed
-
When the pdo PHP module was not installed, the plugin was able to send a test email ok, but other emails didn’t send and the email log wouldn’t load. I was able to find what the problem was by looking in the PHP error log. Activating the missing module through the cPanel PHP config settings fixed the issue. The emails that failed to send while the issue was occurring weren’t present in the log once the issue was fixed.
This occurred with the latest version of the plugin (v2.2.90) on the latest version of WordPress.
Message from the error log:
[26-Mar-2025 03:45:00 UTC] PHP Fatal error: Uncaught Error: Class “PDO” not found in /home/sitename/public_html/wp-content/plugins/fluent-smtp/app/Services/DB/wpfluent.php:17Perhaps you can add some code that displays an error to the admin user when the module is not active?
You can check for the module with the code:
if (!extension_loaded(‘pdo’)) {
The topic ‘Plugin should fail gracefully when “pdo” PHP module not installed’ is closed to new replies.