Body: <p>A client has had a site on Siteground for 3 years.  It worked fine until they moved to a new server architecture and their own suite of management tools (swapping out CPanel for SiteTools).</p>
  <p>The site loads correctly and functions ... but cron doesn't work.  Specifically the task reports &quot;Failed opening required 'CRM/Core/ClassLoader.php'&quot;  when called from civicrm.settings.php.</p>
  <p>If the $civicrm_root variable in civicrm.settings.php is changed from the relative 'sites/all/modules/civicrm' to the absolute path &quot;/home/customer/www//sites/all/modules/civicrm&quot; then cron works fine ... but the web version of CiviCRM is largely broken (no js libraries load so no menus, mouse-overs, pop-ups, etc).</p>
  <p>Following a hint from <a href="https://civicrm.stackexchange.com/questions/35053/error-require-once-failed-opening-required-crm-core-classloader-php">this issue</a> I edited civicrm.settings.php to make the ClassLoader call explicit (&quot;require_once '/home/customer/www//public_html/sites/all/modules/civicrm/CRM/Core/ClassLoader.php&quot;) When I do that the UI still works, but cron still reports &quot;Failed to open...&quot;</p>
  <p>Any suggestions about how I might configure settings to make all this work?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-12-08T23:15:55.650Z
Comments.Text: What version of civi and what method are you using to call cron? And I assume this is drupal 7 based on the file path.
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-12-09T00:00:54.773Z
Comments.Text: yes, D7.74 and CiviCRM 5.28.4 (want to resolve before updating...)   Using wget to call cron.  I also tried using a php cli and it returns the same error - Failed opening required...
Comments.UserDisplayName: Eliot Mason
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-12-09T00:21:30.743Z
Comments.Text: wget or php.  Same results.
Comments.UserDisplayName: Eliot Mason
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-12-09T10:00:45.143Z
Comments.Text: Can you try cv?  https://docs.civicrm.org/sysadmin/en/latest/setup/jobs/#cv
Comments.UserDisplayName: Aidan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-12-09T20:43:36.360Z
Comments.Text: I cannot install cv on the server ... so no I can't try that option.
Comments.UserDisplayName: Eliot Mason
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-12-09T22:15:01.943Z
Comments.Text: I'd say your civicrm.settings.php should have the absolute path, and then either there's something off about your resourceUrl setting, or something about the double /'s in one section of the path is confusing the js etc loading.
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-12-11T03:58:43.430Z
Comments.Text: I tried dropping in the full html into civicrm.settings.php... the site doesn't load , just returns "The website encountered an unexpected error. Please try again later."
Comments.UserDisplayName: Eliot Mason
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-12-17T16:42:07.163Z
Comments.Text: Turns out that placing the full path in civicrm.settings.php as the civicrm.root and in the UI declaring the root path to be not [civicrm.root] but instead the relatives URL sites/all/modules/civicrm works ... for a while.  Then it breaks and the site returns "Error.  Please try later".  So still working on this ....
Comments.UserDisplayName: Eliot Mason
Tags: <cron><paths>
Title: System paths for HTML vs CLI/Cron
ThreadText: # System paths for HTML vs CLI/Cron
  
  (Asked by: username_0 on 2020-12-08)
  
  A client has had a site on Siteground for 3 years. It worked fine until they moved to a new server architecture and their own suite of management tools (swapping out CPanel for SiteTools).
  
  The site loads correctly and functions ... but cron doesn't work. Specifically the task reports "Failed opening required 'CRM/Core/ClassLoader.php'" when called from civicrm.settings.php.
  
  If the $civicrm\_root variable in civicrm.settings.php is changed from the relative 'sites/all/modules/civicrm' to the absolute path "/home/customer/www//sites/all/modules/civicrm" then cron works fine ... but the web version of CiviCRM is largely broken (no js libraries load so no menus, mouse-overs, pop-ups, etc).
  
  Following a hint from [this issue](https://civicrm.stackexchange.com/questions/35053/error-require-once-failed-opening-required-crm-core-classloader-php) I edited civicrm.settings.php to make the ClassLoader call explicit ("require\_once '/home/customer/www//public\_html/sites/all/modules/civicrm/CRM/Core/ClassLoader.php") When I do that the UI still works, but cron still reports "Failed to open..."
  
  Any suggestions about how I might configure settings to make all this work?
  
  **Tags:** cron, paths
  
  > **Comments:**
  > **username_1**: What version of civi and what method are you using to call cron? And I assume this is drupal 7 based on the file path.  
  > **username_0**: yes, D7.74 and CiviCRM 5.28.4 (want to resolve before updating...)   Using wget to call cron.  I also tried using a php cli and it returns the same error - Failed opening required...  
  > **username_0**: wget or php.  Same results.  
  > **username_2**: Can you try cv?  https://docs.civicrm.org/sysadmin/en/latest/setup/jobs/#cv  
  > **username_0**: I cannot install cv on the server ... so no I can't try that option.  
  > **username_1**: I'd say your civicrm.settings.php should have the absolute path, and then either there's something off about your resourceUrl setting, or something about the double /'s in one section of the path is confusing the js etc loading.  
  > **username_0**: I tried dropping in the full html into civicrm.settings.php... the site doesn't load , just returns "The website encountered an unexpected error. Please try again later."  
  > **username_0**: Turns out that placing the full path in civicrm.settings.php as the civicrm.root and in the UI declaring the root path to be not [civicrm.root] but instead the relatives URL sites/all/modules/civicrm works ... for a while.  Then it breaks and the site returns "Error.  Please try later".  So still working on this ....  
  
  ---
  
  ## 0 answers
  
  