system wordpress/drupal confusion

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

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

1 Answer

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.
• I just needed to clear the session and my cookies, and bada bing. All better. – Brad Hinson Jun 23 '15 at 19:34