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) »
  • Oops! Incorrect Drupal Version error on install
Pages: [1]

Author Topic: Oops! Incorrect Drupal Version error on install  (Read 2018 times)

hp3kman

  • I post occasionally
  • **
  • Posts: 74
  • Karma: 4
Oops! Incorrect Drupal Version error on install
March 23, 2010, 03:36:53 pm
Same issue as: http://forum.civicrm.org/index.php/topic,7059.0.html, which was posted just over one year ago...created new post per forum instructions when I tried to reply to that one...

Drupal Version: 6.16
CiviCRM Version: 3.1.3 Drupal PHP5 26406

In attempting a fresh install of CiviCRM, I got the following error:

Oops! Incorrect Drupal Version

This version of CiviCRM can only be used with Drupal 6.x. Please ensure that 'C:/xampp/htdocs/drupal-6.16/sites/modules/system/system.module' exists if you are running Drupal 6.0 and over. Refer to the online http://wiki.civicrm.org/confluence/display/CRMDOC/Installation+and+Upgrades for information about installing CiviCRM.

Per instructions in the above-referenced post, I added the following lines to my install/index.php file:

Code: [Select]
print $drupalVersionFile;
exit;
[/b]

then refreshed the install page and got the following as the path:

C:/xampp/htdocs/drupal-6.16/sites/modules/system/system.module

It seems to me that the $crmPath variable is being incorrectly set...the correct path should be C:/xampp/htdocs/drupal-6.16/modules/system/system.module (the sites directory is causing the error...).

I am attempting a multisite install, so that may be part of the problem...I have multiple Drupal sites using the same code, and my sites/all/modules directory also has /contrib and /custom directories (for clarity and consistency, I use these directories in my subsites directories to differentiate between contributed drupal modules and custom modules).

I did notice the following in the install/index.php file:

Code: [Select]
if ( $installType == 'drupal' ) {
    // do not check 'sites/all/modules' only since it could be a multi-site
    // install. Rather check for existance of sites & modules in the url
    if ( ! preg_match( "/" . preg_quote('sites' . CIVICRM_DIRECTORY_SEPARATOR, CIVICRM_DIRECTORY_SEPARATOR) .
                       "([a-zA-Z0-9_.]+)" .
                       preg_quote(CIVICRM_DIRECTORY_SEPARATOR . 'modules', CIVICRM_DIRECTORY_SEPARATOR) . "/",
                       str_replace( "\\","/",$_SERVER['SCRIPT_FILENAME'] ) ) ) {
        $errorTitle = "Oops! Please Correct Your Install Location";
        $errorMsg = "Please untar (uncompress) your downloaded copy of CiviCRM in the <strong>" . implode(CIVICRM_DIRECTORY_SEPARATOR, array('sites', 'all', 'modules')) . "</strong> directory below your Drupal root directory. Refer to the online " . $docLink . " for more information.<p>If you want to setup / install a <strong>Standalone CiviCRM</strong> version (i.e. not a Drupal or Joomla module), <a href=\"?mode=standalone\">click here</a>.</p>";
        errorDisplayPage( $errorTitle, $errorMsg );
    }
}
[/b]

as well as this in the civicrm.config.php file:

Code: [Select]
   /**
     * We are within the civicrm module, the drupal root is 2 links
     * above us, so use that
     */
    $currentDir = dirname( __FILE__ ) . DIRECTORY_SEPARATOR;
    if ( file_exists( $currentDir . 'settings_location.php' ) ) {
        include $currentDir . 'settings_location.php';
    }

    if ( defined( 'CIVICRM_CONFDIR' ) && ! isset( $confdir ) ) {
       $confdir = CIVICRM_CONFDIR;
    } else {
        // make it relative to civicrm.config.php, else php makes it relative
        // to the script that invokes it
        // simple check to see if this is under sites/all or just modules
        if ( strpos( $currentDir, 'sites' . DIRECTORY_SEPARATOR . 'all' . DIRECTORY_SEPARATOR . 'modules' ) !== false ) {
            // seems like this is in drupal5 dir location
            $confdir = $currentDir . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..';
        } else {
            $confdir = $currentDir . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'sites';
        }
    }
[/b]

If I'm following the code correctly, this is what I think is causing the problem, since my directory structure for this multisite install is mysite.com/sites/all/modules/contrib/civicrm; going up two links from /modules without my /contrib directory would bring me to the mysite.com/modules directory, and would eliminate the /sites directory which seems to be causing the problem

Any ideas on how to get around this??? I'm familiar enough with .php code to read and understand it, but I am hesitant to modify it without some direction...while I don't mind making the code changes to make this work, I am curious as to why the install code doesn't look directly to mysite.com/modules/system for the system.module file, since that is where the file will reside regardless of whether it's a single or multisite install (in drupal, at least)???

Thanks, as always, for your help!




Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Oops! Incorrect Drupal Version error on install
March 23, 2010, 07:58:26 pm

might be easier and better for you to move civicrm to

sites/all/modules/civicrm

rather than a level deeper. alternaitvely you can go in and modify the install code as you've described to get the installer to do the right thing for your specfic layout

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

hp3kman

  • I post occasionally
  • **
  • Posts: 74
  • Karma: 4
Re: Oops! Incorrect Drupal Version error on install
March 24, 2010, 12:39:01 am
Thanks. Lobo...guess I'll do that...already knew how to fix it...all I have to do is modify the way I do things....

Still don't understand the rationale....

speejay

  • Guest
Re: Oops! Incorrect Drupal Version error on install
March 31, 2010, 11:46:49 am
I have placed civicrm in the sites/all/modules/civicrm directory but am still having the version error.
I am installing civi3.13 with drupal 6.16.

Help??!!

speejay

  • Guest
Re: Oops! Incorrect Drupal Version error on install
March 31, 2010, 12:23:37 pm
and i did add the following lines to verify location

print $drupalVersionFile;
exit;

and it is correct location of system.module.

system.module file does indeed make reference to VERSION (6.1.6)

??????

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Oops! Incorrect Drupal Version error on install
March 31, 2010, 06:17:40 pm

u mean 6.16 or 6.1.6

the latter seems incorrect

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

hp3kman

  • I post occasionally
  • **
  • Posts: 74
  • Karma: 4
Re: Oops! Incorrect Drupal Version error on install
April 01, 2010, 08:52:45 am
On my Xampp installation on windows, my directory is this:

C:\xampp\htdocs\drupal-6.16\sites\all\modules\civicrm

The install should place the civicrm.settings file here: C:\xampp\htdocs\drupal-6.16\sites\default

speejay

  • Guest
Re: Oops! Incorrect Drupal Version error on install
April 01, 2010, 09:56:19 am
Quote from: Donald Lobo on March 31, 2010, 06:17:40 pm

u mean 6.16 or 6.1.6

the latter seems incorrect

lobo


Yes, i meant 6.16

Piotr Szotkowski

  • Moderator
  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Oops! Incorrect Drupal Version error on install
April 03, 2010, 05:16:48 am
Can you check what yout $confdir variable contains?
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • Oops! Incorrect Drupal Version error on install

This forum was archived on 2017-11-26.