I'm taking over a project that uses Drupal 7 and CiviCRM (circa v4.3). When I add civicrm.settings.php the site crashes and I get this error message:

Initialization Error

    [callback] => Array
            [0] => CRM_Core_Error
            [1] => simpleHandler

    [code] => -25
    [message] => DB Error: extension not found
    [mode] => 16
    [debug_info] =>  [DB Error: extension not found]
    [type] => DB_Error
    [user_info] =>  [DB Error: extension not found]
    [to_string] => [db_error: message="DB Error: extension not found" code=-25 mode=callback callback=CRM_Core_Error::simpleHandler prefix="" info=" [DB Error: extension not found]"]

The site works until civicrm.settings.php is added. In the settings file I've added the CIVICRM_UF_DSN and CIVICRM_DSN as mysqli://root:[email protected]:8001/civi_db?new_link=true. (I've also tried mysql with the same results). Everything else in the file is copied directly from the staging instance, the above credentials are correct and I can connect to the Docker MySQL DB with other programs.

Additional info: the above error message is rendered twice on the page, and I have seen other Civi warnings that make me think Civi may be trying to initialize twice but I don't know why this would be. I'm not sure if that's causing this particular issue if it's not I'd rather troubleshoot it once this is resolved.

It's hard to remember everything I did to set the site up locally since there was a lot of trial and error... At a high level:

The site was copied from the staging server with scp I pulled everything down and put it in a Docker php:7.1-apache container*.

Both the Drupal, and Civi databases were dumped with Mysql dump and then copied into a volume locally.

I deleted the Civi cached files as recommended in the switching servers document.

*this differs a bit from staging because they are using Nginx. It's not super easy to find old PHP containers with Nginx although at a future point I may need to build a custom container with Nginx.


2 Answers 2


thanks for you question :-) The error suggests that it misses an extension, this could be because the extension is absent or because the path is not clear. Can you still check what the original extensions were?

Can you explain what you have done to copy the site? There is some background info on changing servers here: https://docs.civicrm.org/sysadmin/en/latest/misc/switch-servers/

  • Thanks @ErikH, I've added a few more details about the setup process. When you say the original extensions, that would just be the modules enabled on the current working site? Or is there another place I should be checking?
    – user13418
    Apr 4, 2022 at 14:04
  • 1
    Modules is the Drupal term, extensions are the CiviCRM term. In CiviCRM there is a list of installed extensions (Administer>System Settings>Extensions) Apr 4, 2022 at 14:14
  • It looks like I have all the extensions locally that are up on the staging environment, same locations. I even tried removing/deactivating extensions from the DB in civicrm_extension. I'm wondering if this could also be caused by a misconfiguration in my server?
    – user13418
    Apr 4, 2022 at 16:21
  • 1
    I do not know enough about servers to decide but I do know that if I do not follow the instructions as in the Sys Admin guide I usually have trouble on my hands....My recipe has always been to get the Drupal site up and running, then install a fresh CiviCRM of the desired version and then copy the DB over. And copy all the extensions. That would be my recommendation FWIW. Apr 5, 2022 at 7:14

I resolved this with a fresh Civi install, as recommended by @ErikH. The installer alerted me to another issue I was having, MySQL wasn't installed on the server. This was rectified by adding:

RUN docker-php-ext-install mysqli pdo pdo_mysql && docker-php-ext-enable pdo_mysql

To the Dockerfile.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.