I have Xampp Portable installed on Windows 10.

I run about a dozen Drupal, Wordpress and other CMS on there. I can move the whole stack to different drives and machines and it all works perfectly, only one that can't work is D7/CIVICrm install.

When I move it to another directory I get this error:

 Fatal error: Cannot redeclare class CRM_Core_ClassLoader in C:\Core\XAMPP_2018\htdocs\crm4\sites\all\modules\civicrm\CRM\Core\ClassLoader.php on line 36

I can see that the path in the error is the wrong path.

The correct new path is:


And not:


As stated in error, where should I go change that setting? In what file/directory?

  • Comments are not for extended discussion; this conversation has been moved to chat. – Clive Aug 25 '18 at 10:22

Had to change the path name in civicrm.settings.php from:




This is around LINE 180:

Code looks like this:

$civicrm_root = 'G:/August25/XAMPP_2018/htdocs/crm4/sites/all/modules/civicrm'; if (!defined('CIVICRM_TEMPLATE_COMPILEDIR')) { define( 'CIVICRM_TEMPLATE_COMPILEDIR', 'G:/August25/XAMPP_2018/htdocs/crm4\sites\default\files\civicrm\templates_c\'); }

But the slashes also have to be forward like this "/", I searched from Windows path, that's why I couldn't find the code using find and replace!

| improve this answer | |

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.