1

running CiviCRM WordPress 4.7.7

Any ideas what normalize your directory structure means?

Given it knows where the database is and both the website and the backend are working I am unsure where this is coming from. It only appears in the error_log.

[error] [client 66.249.83.121] PHP Fatal error:
Uncaught exception 'Exception' with message 'Failed to locate civicrm.settings.php. Please boot with settingsFile, search, or CIVICRM_SETTINGS; or normalize your directory structure.' in /../wp-content/plugins/civicrm/civicrm/civicrm.config.php:125

Stack trace:

  1. /../wp-content/plugins/civicrm/civicrm/civicrm.config.php(413): Civi\Cv\Bootstrap->boot()
  2. /../wp-content/plugins/civicrm/civicrm/extern/open.php(2): require_once('/var/www/vhosts...')
  3. {main}\n thrown in /../wp-content/plugins/civicrm/civicrm/civicrm.config.php on line 125

Update 1: civicrm_config.php - getCivicrmSettingsPhp Added error_log to display the options parameter and got the following:

[dynamicSettingsFile] => /../wp-content/plugins/civicrm/settings_location.php\n
[env] => CIVICRM_SETTINGS\n
[prefetch] => 1\n
[settingsFile] => \n
[search] => 1\n
[cmsType] => \n
[httpHost] => casem-acmse.org\n)\n

Shouldn't the file referred to in dynamicSettingsFile be civicrm_settings.php?

1
  • This is still occurring in 4.7.11
    – Codedogs
    Sep 10, 2016 at 1:50

3 Answers 3

3

This is related to Word Press Install Missing civicrm.settings.php; dashboard unavailable; no menus

I suspect that the culprit is the userFrameworkResourceURL I would tray the overrides mentioned in the above thread

1
  • I added an update to my original post. Shouldn't the file referred to in dynamicSettingsFile be civicrm_settings.php? I was under the impression settings_location.php was deprecated prior to 4.4.4
    – Codedogs
    Jun 3, 2016 at 3:11
1

I was having the same error message. Using Codedogs' change didn't work for me, not sure why. In my case, I simply hardcoded the 'settingsFile' as follows:

'settingsFile' => /home/user/domains/domain.com/public_html/wp-content/uploads/civicrm/civicrm.settings.php',

Hope this helps someone!

2
  • Thanks for your answer. Could you edit this to make it clear which file you edited? That will help future visitors to this post. Jul 27, 2016 at 8:14
  • The reason it did not work is that your civicrm.settings.php file is located in the uploads folder. Mine is located in the plugins/civicrm folder which is what dirname(__DIR__) evaluates to.
    – Codedogs
    Jul 28, 2016 at 14:03
0

The following edit corrects the problem: /../wp-content/plugins/civicrm/civicrm_config.php

 public static function singleton() {
    if (self::$singleton === NULL) {
      self::$singleton = new Bootstrap(array(
        'dynamicSettingsFile' => dirname(__DIR__) . '/settings_location.php',
        'env' => 'CIVICRM_SETTINGS',
        'prefetch' => TRUE,
        'settingsFile' => dirname(__DIR__) . '/civicrm.settings.php', <=== CHANGE THIS LINE
        'search' => TRUE,
        'cmsType' => NULL,
        'httpHost' => array_key_exists('HTTP_HOST', $_SERVER) ? $_SERVER['HTTP_HOST'] : '',
      ));
    }
    return self::$singleton;
  }
1
  • This error still occurs in 4.7.10. I had to propagate the above fix to make CRON not run go away.
    – Codedogs
    Aug 17, 2016 at 19:04

Your Answer

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

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