0

The Settings - Upload Directories screen (url civicrm/admin/setting/path?reset=1) makes it possible to examine the value of the [cms.root] variable. Just click the first help question mark.

In my case the cms.root path contains the directory private_html. That is a bit strange because I installed CiviCRM in the public_html directory and also added this path to the $civicrm_root variable.

Why is this, and does it harm?

More details: The CiviCRM version is 4.7.27 on Drupal. It runs on a VPS administered with DirectAdmin, and https is enabled.

1

It starts with a peculiarity of DirectAdmin. Using a subdomain, you have to upload the files for https connection to private_html and the files for not secure http connection to public_html. For the situation these files are the same DirectAdmin offers the option to create a symbolic link from private_html to public_html. Thus when you ask for https://<domain>/file.html it looks for the file /private_html/file.html and thanks to the link this is the same as public_html/file.html.

The [cms.root] variabele is not set. It is derived from the DRUPAL_ROOT constant, that is calculated with getcwd(). At the moment you use a secure connection this functions returns the private_html directory.

And it causes trouble.

The directory variable [cms.root] is used to calculate the URL variabele [civicrm.root] so this is also wrong. The effect is that a lot of javascript files are not found, for example ckeditor.js.

My solution is adding the [cms.root] directly to the civicrm.settings.php file with the following line:

$civicrm_paths['cms.root']['path'] = '/home/<user>/domains/<subdomain>/public_html/crm';

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.