CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • Setting up Demo system on Drupal6 - Installer thinks it's WordPress?
Pages: [1]

Author Topic: Setting up Demo system on Drupal6 - Installer thinks it's WordPress?  (Read 1307 times)

GinkgoDOB

  • I post occasionally
  • **
  • Posts: 54
  • Karma: 1
  • Dir. of Product Development, Ginkgo Street Labs
    • Ginkgo Street Labs
  • CiviCRM version: v4.5-4.7
  • CMS version: Drupal
Setting up Demo system on Drupal6 - Installer thinks it's WordPress?
February 23, 2012, 05:51:39 am
I'm setting up a demo/test system - a fresh, fully-patched CentOS 6 that's got different instances of CMSes and CiviCRM. I've done a number of installs/upgrades of CiviCRM on Drupal and I'm familiar with the process.

I've installed Drupal 7 + CiviCRM 4.1.0 and WordPress + CiviCRM 4.1.0 (in that order); both work perfectly. Now I'm trying to install CiviCRM 4.1.0 on a fresh Drupal6 instance. (I'm working to set up a system that's got CiviCRM and Atrium for project management. Atrium is installed as a subdirectory of Drupal 6 and is sharing the users table for common login information.)

Trying to run the installer for CiviCRM, I get a blank screen. Apache's error_log shows

[Thu Feb 23 08:17:45 2012] [error] [client w.x.y.z] PHP Notice:  Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' in /var/www/html/drupal6/sites/all/modules/civicrm/install/index.php on line 62
[Thu Feb 23 08:17:45 2012] [error] [client w.x.y.z] PHP Notice:  Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' in /var/www/html/drupal6/sites/all/modules/civicrm/install/index.php on line 65
[Thu Feb 23 08:17:45 2012] [error] [client w.x.y.z] PHP Notice:  Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' in /var/www/html/drupal6/sites/all/modules/civicrm/install/index.php on line 70
[Thu Feb 23 08:17:45 2012] [error] [client w.x.y.z] PHP Warning:  require_once(CRM/Utils/System.php): failed to open stream: No such file or directory in /var/www/html/drupal6/sites/all/modules/civicrm/install/index.php on line 77
[Thu Feb 23 08:17:45 2012] [error] [client w.x.y.z] PHP Fatal error:  require_once(): Failed opening required 'CRM/Utils/System.php' (include_path='.:/usr/share/pear:/usr/share/php:WP_PLUGIN_DIR/civicrm/civicrm/') in /var/www/html/drupal6/sites/all/modules/civicrm/install/index.php on line 77

From what I can tell from looking at civicrm/install/index.php, it seems the code on lies 62, 65, and 70 is part of a conditional block that should only be executed for a WordPress install.

Is the fact that I've previously done a WordPress + CiviCRM install on this instance of Apache causing me problems? I'm not sure where in the CivCRM install code it decides what CMS is being used to look for a problem if one exists.

I've got directories in /var/www/html:
  drupal6
  drupal7
  joomla
  wordpress

Any thoughts?

Tony Horrocks

  • I post occasionally
  • **
  • Posts: 110
  • Karma: 7
    • Fabriko Limited
  • CiviCRM version: 4.5.x
  • CMS version: Drupal 7
Re: Setting up Demo system on Drupal6 - Installer thinks it's WordPress?
February 25, 2012, 06:20:37 am
Don't know whether is helps.

Ive noticed that CiviCRM on Drupal always seeks the first 'sites' directory it can when looking to install the civicrm settings file.

If your setup for each domain creates sub folders of your main www directory (or public_html directory) this could cause trouble.

So for example

If you have a domain with a sites folder on this path /home/public_html/sites

And then you have another domain sites folder on this path

/home/public_html/mynewdomain/sites

Civi still uses the the first one.

This is what might be causing your errors.



Tony Horrocks
Author of the CiviCRM CookBook https://www.packtpub.com/web-development/civicrm-cookbook

GinkgoDOB

  • I post occasionally
  • **
  • Posts: 54
  • Karma: 1
  • Dir. of Product Development, Ginkgo Street Labs
    • Ginkgo Street Labs
  • CiviCRM version: v4.5-4.7
  • CMS version: Drupal
Re: Setting up Demo system on Drupal6 - Installer thinks it's WordPress?
February 28, 2012, 05:36:09 am
That's a good thought - I've got a 2 instances of Drupal - on D6 and one D7 (which was installed first). I'll move the other directories out of the web root when I do the install and see what happens.

[user@centos6 html]# find . -name *sites*
./drupal7/atrium/sites
./drupal7/sites
./drupal7/sites/example.sites.php
./drupal7/sites/all/modules/civicrm/api/v3/examples/Contact/ChainTwoWebsites.php
./drupal7/sites/all/modules/civicrm/api/v3/examples/Contact/ChainTwoWebsitesSyntax2.php
./drupal6/atrium/sites
./drupal6/sites
./drupal6/sites/all/modules/civicrm/api/v3/examples/Contact/ChainTwoWebsites.php
./drupal6/sites/all/modules/civicrm/api/v3/examples/Contact/ChainTwoWebsitesSyntax2.php
./joomla/administrator/help/helpsites.xml
./joomla/libraries/joomla/html/parameter/element/helpsites.php
./wordpress/wp-admin/my-sites.php
./wordpress/wp-admin/includes/class-wp-ms-sites-list-table.php
./wordpress/wp-admin/ms-sites.php
./wordpress/wp-admin/network/sites.php
./wordpress/wp-content/plugins/civicrm/civicrm/api/v3/examples/Contact/ChainTwoWebsites.php
./wordpress/wp-content/plugins/civicrm/civicrm/api/v3/examples/Contact/ChainTwoWebsitesSyntax2.php

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • Setting up Demo system on Drupal6 - Installer thinks it's WordPress?

This forum was archived on 2017-11-26.