I've just updated Drupal core (to 7.75) and found my site was stuck in maintenance mode, even after it was unticked in configuration. I've had this before and always been able to get round it with a cache clear. Now though, the site won't load to let me clear the cache though the UI. I've been trying to do it through Drush and am getting the following:

Fatal error: Call to undefined function civicrm_initialize() in ~/public_html/sites/all/modules/contrib/civicrm_entity/civicrm_entity.module on line 488
Drush command terminated abnormally due to an unrecoverable     [error]
Error: Call to undefined function civicrm_initialize() in
line 488
Drush was not able to start (bootstrap) Drupal.                 [error]
Hint: This error can only occur once the database connection has
already been successfully initiated, therefore this error
generally points to a site configuration issue, and not a
problem connecting to the database.

Drush was attempting to connect to: 
 Drupal version                :  7.75                         
 Site URI                      :  http://default               
 Database driver               :  mysql                        
 Database hostname             :  *.*.*.*                 
 Database port                 :                               
 Database username             :  *********             
 Database name                 :  *********                 
 Database                      :  Connected                    
 Default theme                 :  nexus                        
 Administration theme          :  seven                        
 PHP executable                :  /usr/local/bin/php           
 PHP configuration             :  /usr/local/php56/php.ini     
 PHP OS                        :  Linux                        
 Drush script                  :  ~/drush/drush.php                           
 Drush version                 :  8.4.5                        
 Drush temp directory          :  /tmp                         
 Drush configuration           :                               
 Drush alias files             :                               
 Install profile               :  standard                     
 Drupal root                   :  ~/public_html   
 Drupal Settings File          :  sites/default/settings.php   
 Site path                     :  sites/default                
 File directory path           :  sites/default/files          
 Private file directory path   :  sites/default/files/private  
 Temporary file directory      :  tmp                          
  • That should only happen if the CiviCRM core module is disabled or missing. Dec 2 '20 at 13:42

I'll guess that you've got a server with insufficient php or mysql configuration, and that in the process of your upgrade, civicrm was disabled for one reason or another.

You can probably just use sql to re-enable it with something like:

update system set status = 1 where name = 'civicrm'

And then use drush to clear all your caches.

The origin of your issue could be one of these settings in php:

post_max_size max_input_vars

or the mysql configuration of


  • Thanks a lot. On further inspection, I'm deeply suspicious of that 'php56' on the PHP configuration line, but my host assures me that I am running php 7.3. I've rolled back the 7.74 backup for now, but I only work two days so I've not had a chance to give it another go this week. Will revisit next week. Dec 4 '20 at 15:12
  • There are some hosts that will run your command line in a different environment, e.g. a different php.
    – Alan Dixon
    Dec 4 '20 at 19:47
  • Thanks. That did turn out to be the case. I've fixed it with a line in .bashrc, but I've not yet dared run the update again, as Drush is now failing with a new error: civicrm.stackexchange.com/questions/38461 Dec 18 '20 at 18:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.