1

I'm a newbie. Attempting to install local MAMP Drupal CiviCRM - following the wiki steps. When I get to the CiviCRM install script, it throws the following error - for some reason the install script seems to think I'm running WordPress.

I've purged it all, tried a again from scratch. Same issue.

========================= Notice: Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' in /Applications/MAMP/htdocs/drupal/sites/all/modules/civicrm/install/index.php on line 63

Notice: Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' in /Applications/MAMP/htdocs/drupal/sites/all/modules/civicrm/install/index.php on line 64

Notice: Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' in /Applications/MAMP/htdocs/drupal/sites/all/modules/civicrm/install/index.php on line 65

Warning: require_once(WP_PLUGIN_DIR/civicrm/civicrm//CRM/Core/ClassLoader.php): failed to open stream: No such file or directory in /Applications/MAMP/htdocs/drupal/sites/all/modules/civicrm/install/index.php on line 75

Fatal error: require_once(): Failed opening required 'WP_PLUGIN_DIR/civicrm/civicrm//CRM/Core/ClassLoader.php' (include_path='.:/Applications/MAMP/bin/php/php5.6.10/lib/php') in /Applications/MAMP/htdocs/drupal/sites/all/modules/civicrm/install/index.php on line 75

2
  • Are you sure you downloaded the tarball for drupal?
    – Coleman
    Jun 23, 2015 at 18:07
  • Yes, I triple checked. It's the right one. Jun 23, 2015 at 18:47

1 Answer 1

4

I haven't experienced this myself, but -- skimming the code in index.php -- it appears to track a variable called civicrm_install_type. The variable defaults to drupal but can be set to wordpress by passing ?civicrm_install_type=wordpress. Once it is set, it's stored in the SESSION and reused for future page-views.

One way you could probably trigger this behavior is to install WordPress+CiviCRM, swap out the code base, and replace it with a Drupal+CiviCRM codebase (on the same server, using the same browser session).

If this were the situation, you could get around it by either:

  • Resetting the PHP session (eg deleting cookies or logging out).
  • Explicitly passing ?civicrm_install_type=drupal when visiting civicrm/install/index.php.
1
  • I just needed to clear the session and my cookies, and bada bing. All better. Jun 23, 2015 at 19:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.