Answers.Body: <p>In the database for your installation there is a table named <code>civicrm_setting</code>. Using SequelPRO, myPhpAdmin or something similar you will find entries for all settings, including the directory settings, here.</p>
  <p>I was looking for the image upload directory and found</p>
  <pre><code>39    imageUploadDir    s:17:&quot;[cms.root]/images&quot;;
  </code></pre>
  <p>With <code>mysql</code> you can do</p>
  <pre><code>select value from civicrm_setting where name = 'imageUploadDir';
  </code></pre>
  <p>The initial part (<code>s:17</code>) means that the content is a 's'tring with length 17, so I changed the content of the string to something reasonable, taking that into account, and the site worked again.</p>
  <p>Don't forget to remove any possible overrides you made in <code>civicrm.settings.php</code>.</p>
  <p>Also if your CiviCRM menus disappear you probably changed it to something different that it originally was.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-02-14T14:39:16.733Z
Answers.LastActivityDate: 2023-02-14T15:23:50.280Z
Answers.LastEditDate: 2023-02-14T15:23:50.280Z
Answers.UserDisplayName: thoni56
Body: <p>Discovering a problem with image uploads (no directory available in CK) I thought I should set the Resource Directory for images as per recommended using a variable, so I set it to &quot;[cms.root]/images&quot;.</p>
  <p>Now our site is not loading, giving a <code>Cannot resolve path using &quot;cms.root.path&quot;</code>.</p>
  <ol>
  <li><p>I think Civi really needs to verify that the directory exists before saving the setting</p>
  </li>
  <li><p>How do I reset that directory to something that makes the site live again?</p>
  </li>
  </ol>
  <p>I only changed the path to the image directory.</p>
  <p>By overriding the image URL in <code>civicrm.settings.php</code> I managed to get the admin interface up again. But the site is still erroring out with <code>Cannot resolve path using &quot;cms.root.path&quot;</code>. And the values in the Resource URL dialogue are read-only since they are overridden.</p>
  <p>Are the original setting stored in the database? How can I change it?</p>
  
Tags: <configuration><images><directory>
Title: How do I reset directory settings?
ThreadText: # How do I reset directory settings?
  
  (Asked by: username_0 on 2023-02-14)
  
  Discovering a problem with image uploads (no directory available in CK) I thought I should set the Resource Directory for images as per recommended using a variable, so I set it to "[cms.root]/images".
  
  Now our site is not loading, giving a `Cannot resolve path using "cms.root.path"`.
  
  1. I think Civi really needs to verify that the directory exists before saving the setting
  2. How do I reset that directory to something that makes the site live again?
  
  I only changed the path to the image directory.
  
  By overriding the image URL in `civicrm.settings.php` I managed to get the admin interface up again. But the site is still erroring out with `Cannot resolve path using "cms.root.path"`. And the values in the Resource URL dialogue are read-only since they are overridden.
  
  Are the original setting stored in the database? How can I change it?
  
  **Tags:** configuration, images, directory
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2023-02-14. Score: 1 | Accepted answer
  
  In the database for your installation there is a table named civicrm_setting. Using SequelPRO, myPhpAdmin or something similar you will find entries for all settings, including the directory settings, here.
  I was looking for the image upload directory and found
  39    imageUploadDir    s:17:"[cms.root]/images";
  
  With mysql you can do
  select value from civicrm_setting where name = 'imageUploadDir';
  
  The initial part (s:17) means that the content is a 's'tring with length 17, so I changed the content of the string to something reasonable, taking that into account, and the site worked again.
  Don't forget to remove any possible overrides you made in civicrm.settings.php.
  Also if your CiviCRM menus disappear you probably changed it to something different that it originally was.
  
  
  ---
  
  