Answers.Body: <p>Ok, so this is a temporary fix. Would be interested to know a final solution:
  In the path /bitnami/drupal/modules/contrib/civicrm/../..//default/civicrm.settings.php
  the '//' is interpreted as '/' so the file being looked for is:
  /bitnami/drupal/modules/default/civicrm.settings.ph</p>
  <p>Well, there is no default directory in /bitnami/drupal/modules so I created it and inside I put a symlink to the correct location of civicrm.settings.php<br />
  cd /bitnami/drupal/modules/default<br />
  ln -s /bitnami/drupal/sites/default/civicrm.settings.php civicrm.settings.php</p>
  <p>With that the example REST query works fine.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-08-09T22:43:42.703Z
Answers.LastActivityDate: 2020-08-09T22:43:42.703Z
Answers.UserDisplayName: alistair-james
Body: <p>I have a test instance started  a day ago of CiviCRM running on Amazon EC2 using the bitnami version (<a href="https://bitnami.com/stack/civicrm/cloud" rel="nofollow noreferrer">https://bitnami.com/stack/civicrm/cloud</a>) which uses Drupal 7.72 and runs CiviCRM 5.27.4</p>
  <p>I added an api_key through MySQL for the correct user id and read the CIVICRM_SITE_KEY from civicrm.settings.php which I found at /bitnami/drupal/sites/default/civicrm.settings.php</p>
  <p>Running APIv3 through the CiviCRM console (http://mysite/civicrm/api3#explorer) works and generates an example query url to use for REST. However, when I substitute in the keys and put the query in my browser address bar I get:
  &quot;Could not load the settings file at: /bitnami/drupal/modules/contrib/civicrm/../..//default/civicrm.settings.php&quot;</p>
  <p>What can I change to make sure that the civicrm.settings.php file is found?</p>
  
Tags: <api><rest>
Title: APIv3 Rest URL ... Could not load the settings file
ThreadText: # APIv3 Rest URL ... Could not load the settings file
  
  (Asked by: username_0 on 2020-08-09)
  
  I have a test instance started a day ago of CiviCRM running on Amazon EC2 using the bitnami version (<https://bitnami.com/stack/civicrm/cloud>) which uses Drupal 7.72 and runs CiviCRM 5.27.4
  
  I added an api\_key through MySQL for the correct user id and read the CIVICRM\_SITE\_KEY from civicrm.settings.php which I found at /bitnami/drupal/sites/default/civicrm.settings.php
  
  Running APIv3 through the CiviCRM console (http://mysite/civicrm/api3#explorer) works and generates an example query url to use for REST. However, when I substitute in the keys and put the query in my browser address bar I get:
  "Could not load the settings file at: /bitnami/drupal/modules/contrib/civicrm/../..//default/civicrm.settings.php"
  
  What can I change to make sure that the civicrm.settings.php file is found?
  
  **Tags:** api, rest
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2020-08-09. Score: 2 | Accepted answer
  
  Ok, so this is a temporary fix. Would be interested to know a final solution:
  In the path /bitnami/drupal/modules/contrib/civicrm/../..//default/civicrm.settings.php
  the '//' is interpreted as '/' so the file being looked for is:
  /bitnami/drupal/modules/default/civicrm.settings.ph
  
  Well, there is no default directory in /bitnami/drupal/modules so I created it and inside I put a symlink to the correct location of civicrm.settings.php  
  cd /bitnami/drupal/modules/default  
  ln -s /bitnami/drupal/sites/default/civicrm.settings.php civicrm.settings.php
  
  With that the example REST query works fine.
  
  
  ---
  
  