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) »
  • Installation script not working w/Drupal package on ubuntu
Pages: [1]

Author Topic: Installation script not working w/Drupal package on ubuntu  (Read 4067 times)

johnzbesko

  • Guest
Installation script not working w/Drupal package on ubuntu
August 30, 2007, 09:52:32 pm
The civicrm installation instructions say to put the civicrm directory/files in:

/var/www/drupal

however, in ubuntu Feisty, the drupal package does not create /var/www/drupal, though http://localhost/drupal does work.

I tried to relocate the civicrm directory to:

/usr/share/drupal-5.1/modules/

but then the ./install/index.php did not work. I followed a link and then created the directory:

./sites/all/modules/

But then I got other error messages from the automated install.

Is an ubuntu/drupal installation script available?

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: Installation script not working w/Drupal package on ubuntu
August 31, 2007, 01:07:29 pm

The install instructions use /var/www/drupal as an example. For your install replace /var/www/drupal with /usr/share/drupal-5.1 and follow the instructions

Please untar civicirm in /usr/share/drupal-5.1/sites/all/modules/ and then use the install script

An ubuntu/drupal installation script is not available. Feel free to comment on the docs with any Ubuntu tweaks

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

johnzbesko

  • Guest
Re: Installation script not working w/Drupal package on ubuntu
September 04, 2007, 02:40:10 pm
Thank you for your reply.

Your suggestion to extract civicrm to the drupal module directory is what I tried first- I extracted to the drupal module directory and then I created ./sites/all/modules and linked the civicrm directory to there as well. I next attempted to run from a browser, the install script, named civicrm.install.php, either through the linked directory or through the actual directory and got the following error message:

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /usr/share/drupal-5.1/modules/civicrm/drupal/civicrm.install.php on line 100

The relevant section of code from civicrm.install.php is:


function civicrm_setup( ) {
    global $comPath, $frontPath, $crmPath, $sqlPath, $tplPath, $dsn, $absolute_path;
    global $resourceBase;
    global $compileDir, $uploadDir, $imageUploadDir, $customFileUploadDir;
    global $resourceBaseURL;
    global $imageUploadDir, $imageUploadURL,$live_site;
    global $base_url,$db_url;
    $absolute_path = '.';

    $comPath = $absolute_path . DIRECTORY_SEPARATOR . 'modules';
    $crmPath = $comPath . DIRECTORY_SEPARATOR . 'civicrm';

    $pkgPath = $crmPath . DIRECTORY_SEPARATOR . 'packages';
    set_include_path( $comPath . PATH_SEPARATOR .
                      $crmPath . PATH_SEPARATOR .
                      $pkgPath . PATH_SEPARATOR .
                      get_include_path( ) );

    $sqlPath = $crmPath . DIRECTORY_SEPARATOR . 'sql';
    $tplPath = $crmPath . DIRECTORY_SEPARATOR . 'templates' . DIRECTORY_SEPARATOR . 'CRM' . DIRECTORY_SEPARATOR . 'common' . DIRECTORY_SEPARATOR;

    $live_site = $base_url ;

    $pieces = parse_url( $live_site );

    $httpBase     = $pieces['path'];
    $resourceBase = $httpBase . '/modules/civicrm/';

    $frontPath = $absolute_path . DIRECTORY_SEPARATOR .
        'sites'             . DIRECTORY_SEPARATOR .
        'default' ;

    $scratchDir   = $absolute_path . DIRECTORY_SEPARATOR . 'files' . DIRECTORY_SEPARATOR . 'civicrm';
    if ( ! is_dir( $scratchDir ) ) {
        mkdir( $scratchDir, 0777 );
    }

    $compileDir        = $scratchDir . DIRECTORY_SEPARATOR . 'templates_c' . DIRECTORY_SEPARATOR;
    if ( ! is_dir( $compileDir ) ) {
        mkdir( $compileDir, 0777 );
    }
    $compileDir = addslashes( $compileDir );

    $uploadDir         = $scratchDir . DIRECTORY_SEPARATOR . 'upload' . DIRECTORY_SEPARATOR;
    if ( ! is_dir( $uploadDir ) ) {
        mkdir( $uploadDir, 0777 );
    }
       mkdir( $uploadDir, 0777 );
    }
    $uploadDir = addslashes( $uploadDir );

    $imageUploadDir = $scratchDir . DIRECTORY_SEPARATOR . 'persist' . DIRECTORY_SEPARATOR;
    if ( ! is_dir( $imageUploadDir ) ) {
        mkdir( $imageUploadDir, 0777 );
    }
    $imageUploadDir = addslashes( $imageUploadDir );

    $customFileUploadDir = $scratchDir . DIRECTORY_SEPARATOR . 'persist' . DIRECTORY_SEPARATOR . 'custom' . DIRECTORY_SEPARATOR;
    if ( ! is_dir( $customFileUploadDir ) ) {
        mkdir( $customFileUploadDir, 0777 );
    }
    $customFileUploadDir = addslashes( $customFileUploadDir );

    $dsn = $db_url;
    $dsn = $dsn.'?new_link=true';

}


Somehow, the install script is not able to determine the proper directory structure and is crapping out.  At this point, I'm stuck.

johnzbesko

  • Guest
Re: Installation script not working w/Drupal package on ubuntu
September 04, 2007, 02:42:35 pm
BTW, lines 100-103 are:

    set_include_path( $comPath . PATH_SEPARATOR .
                      $crmPath . PATH_SEPARATOR .
                      $pkgPath . PATH_SEPARATOR .
                      get_include_path( ) );

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: Installation script not working w/Drupal package on ubuntu
September 04, 2007, 03:25:02 pm

there is no civicrm.install.php in the distribution. There is a civicrm.install.sample which is obsolete and should not be used (i just deleted it from the repository). The new installer is in drupal/install/index.php

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

johnzbesko

  • Guest
Re: Installation script not working w/Drupal package on ubuntu
September 04, 2007, 07:25:56 pm
So, I deleted all civicrm files and re-downloaded the most recent version, civicrm-1.8.10954-drupal-php5.tar.gz, from sourceforge.

I extracted the files into:

/usr/share/drupal-5.1/modules

and then ran the /usr/share/drupal-5.1/modules/civicrm/drupal/install/index.php script. It complained about a wrong directory and so I ran it from a linked directory:

http://localhost/drupal/sites/all/modules/civicrm/drupal/install/index.php

The error message I now have is:

Oops! Incorrect Drupal Version
This installer can only be used with Drupal 5.x.

even though I clearly have drupal version 5.1

I had previously hit this point and then tried to enable civicrm from the drupal modules admin page.  That broke drupal and I had to start all over again- and subscribe to this board for help.

Thank you 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: Installation script not working w/Drupal package on ubuntu
September 04, 2007, 11:52:19 pm

1. can u extract and install it in sites/all/modules rather than modules. Please so not use the sym link for now. yes i know this is strange, but please try it out

2. Can u check if /usr/share/drupal-5.1/CHANGELOG.txt file exists and readable the web server. Is it is present can u do a search for "Drupal 5.1" in that file (using either less or grep)

thanx

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

johnzbesko

  • Guest
Re: Installation script not working w/Drupal package on ubuntu
September 05, 2007, 08:25:01 am
I think I found my problem and that of another thread in this forum.

There is no:

 /usr/share/drupal-5.1/CHANGELOG.txt

In ubuntu at least, there is a changelog.gz and changelog.Debian.gz in:

/usr/share/doc/drupal-5.1

When I gunzip'ed changelog.gz, copied it to /usr/share/drupal-5.1 and renamed it, CHANGELOG.txt, the civicrm install script worked!

Thank you for your help- I'm sure I'll be back with other questions as I begin to use civicrm....

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • Installation script not working w/Drupal package on ubuntu

This forum was archived on 2017-11-26.