Applications on Cloud Platform need to load a specific set of global configurations to ensure minimum basic operations are fulfilled. To achieve this, site builders must add a special code section, known as the Acquia require line, into the appropriate settings.php file in a Drupal docroot/sites/[sitename] folder.
Get this code from the Cloud Platform UI. Navigate to Environment > Databases > [Database Name] > PHP section. The code is similar to the following:
if (file_exists('/var/www/site-php')) {
require('/var/www/site-php/myappname/mydatabasename-settings.inc');
}The code varies according to the database that you select for the specific Drupal site instance.
To obtain and add this code to the settings.php file, follow the instructions in Configuring your application to use environment databases
For example, by default, the config_sync_directory value is set to sits/default/files/config_xxxxx. To change this value, you must include the Acquia require line and add your custom line to override the system-defined value. The following code snippet demonstrates the method to override the system-defined value for config_sync_directory with config directory above the docroot.
// Start of Acquia require line code:
if (file_exists('/var/www/site-php')) {
require('/var/www/site-php/myappname/mydatabasename-settings.inc');
}
// End of Acquia require line code.
// Example: Override the config sync directory. Point to a folder outside docroot.
$settings['config_sync_directory'] = $app_root . '/../config/' . basename($site_path);The file added by the Acquia require line performs the following functions:
If this content did not answer your questions, try searching or contacting our support team for further assistance.
If this content did not answer your questions, try searching or contacting our support team for further assistance.