Jump to content

Whoops\Exception\ErrorException: Module 'pdo_mysql' already loaded in Unknown:0

Recommended Posts

I recently migrated to a new server and although I copied my apache configuration from the old server, I am still getting some issues with WHMCS. 

This all started with an email for a failed cron job which stated


Your WHMCS is configured to perform the Daily System Cron during the hour of 12 am. However, the Daily System Cron did not execute within that hour as expected.

This may be due to the scheduled time specified in your web hosting control panel's cron entry. Please ensure your web hosting control panel executes the WHMCS System Cron (cron.php) at least once during the hour of 12 am.

I proceeded to try and fix this, making sure the crons were setup and all, I couldn't find an issue. So I thought it might be my PHP Version, I double checked that WHMCS supports PHP 7.2 and proceeded to apply it to WHMCS. 
I also had to install the Ioncube loader for PHP 7.2. 

Now when I go to most WHMCS pages inside the admin area I get the following error. 

Whoops\Exception\ErrorException: Module 'pdo_mysql' already loaded in Unknown:0
Stack trace:
#0 /home/XXX/public_html/vendor/whmcs/whmcs-foundation/lib/Utility/Error/Run.php(0): WHMCS\Utility\Error\Run->handleError(32, 'Module 'pdo_mys...', 'Unknown', 0)
#1 [internal function]: WHMCS\Utility\Error\Run->handleShutdown()
#2 {main}

This error goes away after commenting the following out in my .htaccess

<IfModule mime_module>
  AddType application/x-httpd-ea-php72 .php .php7 .phtml

But then I get the following error when trying to check for updates in WHMCS

Unable to Perform Automatic Updates
Automatic Updates require the allow_url_fopen setting to be enabled in your PHP configuration.

So basically, If I uncomment the .htaccess line, WHMCS Update doesn't show the "Allow_url" error. But the other pages have the "pdo_sql" error. And if I comment the .htaccess line out, I lose the "pdo_sql" error but gain the "allow_url" error. 

I'll lodge a support ticket and get back with the results if no one here can figure it out. 


Link to comment
Share on other sites

Issue Resolved: config.php had the incorrect path to the WHMCS directory inside the custom crons folder. 
then ran:

php -q /home/accountname/custom_crons_folder/cron.php all --force -vvv

And it fixed the cron issues. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated