Answers.Body: <p>This is related to <a href="https://civicrm.stackexchange.com/questions/9776/word-press-install-missing-civicrm-settings-php-dashboard-unavailable-no-menus/9792#9792">Word Press Install Missing civicrm.settings.php; dashboard unavailable; no menus</a></p>
  
  <p>I suspect that the culprit is the userFrameworkResourceURL  I would tray the overrides mentioned in the above thread</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-06-03T03:11:41.017Z
Answers.Text: 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
Answers.UserDisplayName: Codedogs
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-06-02T22:15:26.440Z
Answers.LastActivityDate: 2016-06-02T22:15:26.440Z
Answers.LastEditDate: 2017-04-13T12:53:13.167Z
Answers.UserDisplayName: Kevin Cristiano
Answers.Body: <p>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:</p>
  
  <pre><code>'settingsFile' =&gt; /home/user/domains/domain.com/public_html/wp-content/uploads/civicrm/civicrm.settings.php',
  </code></pre>
  
  <p>Hope this helps someone!</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-07-27T08:14:29.667Z
Answers.Text: Thanks for your answer.  Could you edit this to make it clear which file you edited?  That will help future visitors to this post.
Answers.UserDisplayName: William Mortada
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-07-28T14:03:22.923Z
Answers.Text: 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.
Answers.UserDisplayName: Codedogs
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-07-27T02:03:21.360Z
Answers.LastActivityDate: 2016-07-27T02:03:21.360Z
Answers.UserDisplayName: Jason
Answers.Body: <p>The following edit corrects the problem:
   <strong>/../wp-content/plugins/civicrm/civicrm_config.php</strong></p>
  
  <pre><code> public static function singleton() {
      if (self::$singleton === NULL) {
        self::$singleton = new Bootstrap(array(
          'dynamicSettingsFile' =&gt; dirname(__DIR__) . '/settings_location.php',
          'env' =&gt; 'CIVICRM_SETTINGS',
          'prefetch' =&gt; TRUE,
          'settingsFile' =&gt; dirname(__DIR__) . '/civicrm.settings.php', &lt;=== CHANGE THIS LINE
          'search' =&gt; TRUE,
          'cmsType' =&gt; NULL,
          'httpHost' =&gt; array_key_exists('HTTP_HOST', $_SERVER) ? $_SERVER['HTTP_HOST'] : '',
        ));
      }
      return self::$singleton;
    }
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-08-17T19:04:56.377Z
Answers.Text: This error still occurs in 4.7.10. I had to propagate the above fix to make **CRON not run** go away.
Answers.UserDisplayName: Codedogs
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-06-04T02:52:28.663Z
Answers.LastActivityDate: 2016-06-04T02:52:28.663Z
Answers.UserDisplayName: Codedogs
Body: <p>running CiviCRM WordPress 4.7.7</p>
  
  <p>Any ideas what <strong>normalize your directory structure</strong> means?</p>
  
  <p>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. </p>
  
  <blockquote>
    <p>[error] [client 66.249.83.121] PHP Fatal error:<br>
    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</p>
    
    <p>Stack trace:</p>
    
    <blockquote>
      <ol>
      <li>/../wp-content/plugins/civicrm/civicrm/civicrm.config.php(413): Civi\Cv\Bootstrap->boot()</li>
      <li>/../wp-content/plugins/civicrm/civicrm/extern/open.php(2): require_once('/var/www/vhosts...')</li>
      <li>{main}\n  thrown in /../wp-content/plugins/civicrm/civicrm/civicrm.config.php on line 125</li>
      </ol>
    </blockquote>
  </blockquote>
  
  <p><strong>Update 1:</strong>
  <em>civicrm_config.php - getCivicrmSettingsPhp</em>
  Added error_log to display the options parameter and got the following:</p>
  
  <blockquote>
    <p>[dynamicSettingsFile] => /../wp-content/plugins/civicrm/settings_location.php\n<br>
    [env] => CIVICRM_SETTINGS\n<br>
    [prefetch] => 1\n<br>
    [settingsFile] => \n<br>
    [search] => 1\n<br>
    [cmsType] => \n<br>
    [httpHost] => casem-acmse.org\n)\n</p>
  </blockquote>
  
  <p>Shouldn't the file referred to in dynamicSettingsFile be civicrm_settings.php?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-09-10T01:50:11.110Z
Comments.Text: This is still occurring in 4.7.11
Comments.UserDisplayName: Codedogs
Tags: <wordpress><error><4.7><4.7.10>
Title: Failed to locate civicrm.settings.php
ThreadText: # Failed to locate civicrm.settings.php
  
  (Asked by: username_0 on 2016-06-02)
  
  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?
  
  **Tags:** wordpress, error, 4.7, 4.7.10
  
  > **Comments:**
  > **username_0**: This is still occurring in 4.7.11  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_1 on 2016-06-02. Score: 3
  
  This is related to [Word Press Install Missing civicrm.settings.php; dashboard unavailable; no menus](https://civicrm.stackexchange.com/questions/9776/word-press-install-missing-civicrm-settings-php-dashboard-unavailable-no-menus/9792#9792)
  
  I suspect that the culprit is the userFrameworkResourceURL I would tray the overrides mentioned in the above thread
  
  > **Comments:**
  > **username_0**: 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  
  
  ---
  
  ### Answer by username_2 on 2016-07-27. Score: 1
  
  I was having the same error message. Using username_0' 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!
  
  > **Comments:**
  > **username_3**: Thanks for your answer.  Could you edit this to make it clear which file you edited?  That will help future visitors to this post.  
  > **username_0**: 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.  
  
  ---
  
  ### Answer by username_0 on 2016-06-04. Score: 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;
    }
  
  ```
  
  > **Comments:**
  > **username_0**: This error still occurs in 4.7.10. I had to propagate the above fix to make **CRON not run** go away.  
  
  ---
  
  