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 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?

  • 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.
    – Demerit
    Dec 8 '20 at 23:15
  • 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... Dec 9 '20 at 0:00
  • wget or php. Same results. Dec 9 '20 at 0:21
  • Can you try cv? docs.civicrm.org/sysadmin/en/latest/setup/jobs/#cv
    – Aidan
    Dec 9 '20 at 10:00
  • I cannot install cv on the server ... so no I can't try that option. Dec 9 '20 at 20:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.