Error: require_once(): Failed opening required 'CRM/Core/ClassLoader.php'

CiviCRM Asked by PRATIK DEVLEKAR on December 2, 2020

PHP Error: require_once(): Failed opening required ‘CRM/Core/ClassLoader.php’ (include_path=’.:/buildkit/build/dmaster/web/sites/all/modules/civicrm/:/buildkit/build/dmaster/web/sites/all/modules/civicrm//packages:.:’)
at line 552 in /Users/apple/Work/Gsoc/Opensrc/civicrm-buildkit-docker/build/dmaster/web/sites/default/civicrm.settings.php

This is the complete error i am getting.
For this i changes the path in civicrm.setting.php ”’$civicrm_root =’/Users/apple/Work/Gsoc/civicrm/civicrm-buildkit-docker/build/dmaster/web/sites/all/modules/civicrm’;”’ even then i am getting the same error.
Please help me out.

One Answer

I'm using drupal with civiCRM and got the same error [failed to open require_once CRM/Core/ClassLoader.php]. I made the following changes to solve it.

In your civicrm.settings.php if you have

require_once 'CRM/Core/ClassLoader.php';

Change it by adding "civicrm_root" variable

require_once $civicrm_root . '/CRM/Core/ClassLoader.php';

This is assuming that somewhere in that file, you have already set the "$civicrm_root" variable to point to your civiCRM install directory such as

$civicrm_root = '/var/www/html/drupal-root/vendor/civicrm/civicrm-core';

Note: my path might be different as I'm using composer to install civiCRM

Answered by salah-1 on December 2, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP