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) »
  • parse error
Pages: 1 [2]

Author Topic: parse error  (Read 9524 times)

Michał Mach

  • Ask me questions
  • ****
  • Posts: 748
  • Karma: 59
    • CiviCRM site
  • CiviCRM version: latest
  • CMS version: Drupal and Joomla latest
  • MySQL version: numerous
  • PHP version: 5.3 and 5.2
Re: parse error
August 02, 2007, 03:18:22 am
Did you try to ask on XAMPP forums? There might be some catch here (brackets, quoting, whatever) that people here do not see, but it can be obvious for XAMPP hackers, especially that it's a parse error - this must me something specific to this windows platform.

Let us know how it went if you decide to do it.

Thx,
m
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

My absolute favourite: Wordpress Integration!.

Donate Now!

jn122

  • Guest
Re: parse error
August 02, 2007, 03:55:22 am
Cheers for that Michael, sound advice, will report back.

Cheers

msn

  • I post frequently
  • ***
  • Posts: 152
  • Karma: 6
  • Please talk to the other site
Re: parse error
August 02, 2007, 04:19:39 am
I saw your setup and the question I have is where yor drupal or joomla install is? Is Drupal (or Joomla) working?? Wich distribution of Xampp do you use (windows, linux, mac?)?

This looks not good to me:

define( 'CIVICRM_MYSQL_VERSION', 4.1 );
define( 'CIVICRM_DSN'          , 'mysql://ifoss:ifoss@localhost/ifoss?new_link=true' );
define( 'CIVICRM_MYSQL_PATH', 'C:\\Program Files\\MySQL\\MySQL Server 5.0\\bin' );

$civicrm_root = 'D:/Install/C/xampp/htdocs/ifoss/modules/civicrm/';define( 'CIVICRM_TEMPLATE_COMPILEDIR', 'D:\\Install\\C\\xampp\\htdocs\\ifoss\\files\\civicrm\\templates_c\' );

A few monts ago I made Xampp and Drupal working with in windows and I tested civicrm with it. So my setup is for windows.
A short installation (example) discription of Drupal and CiviCRM in Xampp:

- Instal Xampp in c: or d: . So you have d:\xampp\...
- uncomment LoadModule rewrite_module modules/mod_rewrite.so in d:\xampp\apache\conf\httpd. Ths makes clean url's possible in Drupal
- start xampp apache server and mysql server and test the working of xampp in your browser (see xammp install and help files)
- stop xammp
 
- Install drupal files (If you can v5.2) in xampp\htdocs. In windows you have d:\xampp\htdocs\drupal
- start xampp apache server and mysql server
- Install drupal and drupal database and make a first setup: in your browser:  http://localhost/drupal/install.php
- Make drupal work correct (file setup ....

- When this is al working than install civicrm
- Place the civicrm files (v1.7 is working, v 1.8 is in end test phase) in d:\xampp\htdocs\drupal\sites\all\modules. You have: d:\xampp\htdocs\drupal\sites\all\modules\civicrm\..
- place your civicrm.settings.php config file in d:\xampp\htdocs\drupal\sites\default. The same map as were settings.php is located.
- Install your civicrm database, I take a seperate database for my example. see civicrm install text

-civicrm settings must have:

define( 'CIVICRM_UF'               , 'Drupal'        );
define( 'CIVICRM_UF_VERSION'       , '5.1' );
define( 'CIVICRM_UF_URLVAR'        , 'q'  );

or with drupal 5.2:

define( 'CIVICRM_UF'               , 'Drupal'        );
define( 'CIVICRM_UF_VERSION'       , '5.1' );
define( 'CIVICRM_UF_URLVAR'        , 'q'  );

Your drupal database setting, see setting.php.
define( 'CIVICRM_UF_DSN'           , 'mysql://root:MYPASS@localhost/drupaldatabase?new_link=true' );

You specified correct: 
define( 'CIVICRM_UF_USERSTABLENAME', 'users' );

Your CiviCRM database (with separate database for drupal and civicrm). With Mysql version you have (5.0)
define( 'CIVICRM_MYSQL_VERSION', 5.0 );
define( 'CIVICRM_DSN'          , 'mysql://root:MYPASS@localhost/civicrmdatabase?new_link=true' );
define( 'CIVICRM_MYSQL_PATH', '/mysql/bin/' );

Your root path setting, if yoy made a correct civicrm install than yoy have your civicrm costum maps and files in d:\xampp\htdocs\drupal\files\civicrm (windows structure) the settup is unix structure:
global $civicrm_root;
$civicrm_root = '/htdocs/drupal/sites/all/modules/civicrm/';
define( 'CIVICRM_TEMPLATE_COMPILEDIR', '/htdocs/drupal/files/civicrm/templates_c/' );

Make your site url:
define( 'CIVICRM_UF_BASEURL'      , 'http://www.website.org/' );

Safe settings and start your local website, do some testings and notice some errors
For civicrm base setup this is it.
I made this setting from scratch, with a example of a working civicrm on the web. So I did not test it,
Give some feedback of succes or failures,

Martin



msn

  • I post frequently
  • ***
  • Posts: 152
  • Karma: 6
  • Please talk to the other site
Re: parse error
August 02, 2007, 04:26:19 am

A litle mistake in my text:
or with drupal 5.2:

define( 'CIVICRM_UF'               , 'Drupal'        );
define( 'CIVICRM_UF_VERSION'       , '5.1' ); must be 5.2
define( 'CIVICRM_UF_URLVAR'        , 'q'  );

Sorry for the yellow color, that is not readable

define( 'CIVICRM_MYSQL_VERSION', 4.1 );
define( 'CIVICRM_DSN'          , 'mysql://ifoss:ifoss@localhost/ifoss?new_link=true' );
define( 'CIVICRM_MYSQL_PATH', 'C:\\Program Files\\MySQL\\MySQL Server 5.0\\bin' );

$civicrm_root = 'D:/Install/C/xampp/htdocs/ifoss/modules/civicrm/';define( 'CIVICRM_TEMPLATE_COMPILEDIR', 'D:\\Install\\C\\xampp\\htdocs\\ifoss\\files\\civicrm\\templates_c\' );

hwdornbush

  • I post occasionally
  • **
  • Posts: 57
  • Karma: 0
Re: parse error
August 08, 2007, 04:01:11 pm
I tried the suggestion as shown, and it did not work for me.  Here are the combinations of strings I tried in civicrm.settings.php with the error messages that I got in my web browser.  They seem to have a problem with concatenating the string I provided with "packages" but I am not sure that this is really the problem.

$civicrm_root = '/htdocs/chaven2/sites/all/modules/civicrm/';
define( 'CIVICRM_TEMPLATE_COMPILEDIR', '/htdocs/chaven2/sites/default/files/civicrm/templates_c/' );

Fatal error: require_once() [function.require]: Failed opening required 'CRM/Core/Config.php' (include_path='.;/htdocs/chaven2/sites/all/modules/civicrm/;/htdocs/chaven2/sites/all/modules/civicrm/\packages;.;\xampp\php\pear\') in C:\xampp\htdocs\chaven2\sites\all\modules\civicrm\drupal\civicrm.module on line 224

=============

$civicrm_root = '\\htdocs\\chaven2\\sites\\all\\modules\\civicrm/';
define( 'CIVICRM_TEMPLATE_COMPILEDIR', '\\htdocs\\chaven2\\sites\\default\\files\\civicrm\\templates_c\\' );

Fatal error: require_once() [function.require]: Failed opening required 'CRM/Core/Config.php' (include_path='.;\htdocs\chaven2\sites\all\modules\civicrm/;\htdocs\chaven2\sites\all\modules\civicrm/\packages;.;\xampp\php\pear\') in C:\xampp\htdocs\chaven2\sites\all\modules\civicrm\drupal\civicrm.module on line 224

================

$civicrm_root = '\\htdocs\\chaven2\\sites\\all\\modules\\civicrm\\';
define( 'CIVICRM_TEMPLATE_COMPILEDIR', '\\htdocs\\chaven2\\sites\\default\\files\\civicrm\\templates_c\\' );

Fatal error: require_once() [function.require]: Failed opening required 'CRM/Core/Config.php' (include_path='.;\htdocs\chaven2\sites\all\modules\civicrm\;\htdocs\chaven2\sites\all\modules\civicrm\\packages;.;\xampp\php\pear\') in C:\xampp\htdocs\chaven2\sites\all\modules\civicrm\drupal\civicrm.module on line 224

============

$civicrm_root = '\\htdocs\\chaven2\\sites\\all\\modules\\civicrm\';
define( 'CIVICRM_TEMPLATE_COMPILEDIR', '\\htdocs\\chaven2\\sites\\default\\files\\civicrm\\templates_c\\' );

Parse error: parse error, unexpected T_STRING in C:\xampp\htdocs\chaven2\sites\default\civicrm.settings.php on line 135

==============

$civicrm_root = '\\htdocs\\chaven2\\sites\\all\\modules\\civicrm';
define( 'CIVICRM_TEMPLATE_COMPILEDIR', '\\htdocs\\chaven2\\sites\\default\\files\\civicrm\\templates_c\\' );

Fatal error: require_once() [function.require]: Failed opening required 'CRM/Core/Config.php' (include_path='.;\htdocs\chaven2\sites\all\modules\civicrm;\htdocs\chaven2\sites\all\modules\civicrm\packages;.;\xampp\php\pear\') in C:\xampp\htdocs\chaven2\sites\all\modules\civicrm\drupal\civicrm.module on line 224

msn

  • I post frequently
  • ***
  • Posts: 152
  • Karma: 6
  • Please talk to the other site
Re: parse error
August 08, 2007, 05:09:22 pm
1:   $civicrm_root = '/htdocs/chaven2/sites/all/modules/civicrm/';
2:   define( 'CIVICRM_TEMPLATE_COMPILEDIR', '/htdocs/chaven2/sites/default/files/civicrm/templates_c/' );

Line 1 looks ok to me when chaven2 is the drupal install map.

Line 2: "Normaly" the map and file civicrm/templates_c is in the drupal files map. The setup is made in drupal file system: http://www.website.org/admin/settings/file-system (clean URL's is on) This normaly is for you map 'htdocs/chaven2/files/' . So the structure is
        define( 'CIVICRM_TEMPLATE_COMPILEDIR', '/htdocs/chaven2/files/civicrm/templates_c/' );


Further installation is needed in the Global settings of CiviCRM: Directories and base URL's.




This is the settings file with the setup, only the databases are not filled in.
With this file drupal root =  htdocs/chaven2 and drupal costum files are in htdocs/chaven2/files and civicrm is in htdocs/sites/all/modules. It is the 1.8 version but can used for 1.7.


<?php
/**
 * CiviCRM Configuration File - v1.8
 */

/**
 * Content Management System (CMS) Host:
 *
 * CiviCRM can be hosted in either Drupal or Joomla.
 *
 * Settings for Drupal 5.1:
 *      define( 'CIVICRM_UF'        , 'Drupal' );
 *      define( 'CIVICRM_UF_VERSION', '5.1' );
 *      define( 'CIVICRM_UF_URLVAR' , 'q'  );
 *
 * For Drupal 4.7.x, same as above except
 *      define( 'CIVICRM_UF_VERSION', '4.7' );
 *
 * Settings for Joomla 1.0.x and 1.5.x:
 *      define( 'CIVICRM_UF'        , 'Joomla' );
 *      define( 'CIVICRM_UF_VERSION', '1' );
 *      define( 'CIVICRM_UF_URLVAR' , 'task'  );
 *
 * Settings for Standalone:
 *      define( 'CIVICRM_UF'   , 'Standalone');
 *      (Leave out CIVICRM_UF_VERSION.)
 *      define( 'CIVICRM_UF_URLVAR', 'q');
 *
 *
 */

define( 'CIVICRM_UF'               , 'Drupal'        );
define( 'CIVICRM_UF_VERSION'       , '5.1' );
define( 'CIVICRM_UF_URLVAR'        , 'q'  );

/**
 * Content Management System (CMS) Datasource:
 *
 * Update this setting with your CMS (Drupal or Joomla) database username, server and DB name. Comment it out if using CiviCRM standalone.
 * Datasource (DSN) format:
 *      define( 'CIVICRM_UF_DSN', 'mysql://cms_db_username:cms_db_password@db_server/cms_database?new_link=true');
 */

define( 'CIVICRM_UF_DSN' , 'mysql://root:MYPASS@localhost/ic?new_link=true' );

/**
 * Content Management System (CMS) User Table-name:
 *
 * Update the CIVICRM_UF_USERSTABLENAME if needed to match the name of the table
 * where the CMS user data is stored. Default for Drupal and Standalone installs is 'users'.
 * If you are using table-prefixing for the users table, you must enter the tablename
 * with the prefix. Default table name for Joomla - 'jos_users'. For Mambo - 'mos_users'.
 */

define( 'CIVICRM_UF_USERSTABLENAME', 'users' );

/**
 * CiviCRM Database Settings
 *
 * MySQL Version:
 * CiviCRM requires MySQL version 4.1 or greater.
 * IMPORTANT: Enter closest dot release to your installed version. 4.1, 5.0 are all valid examples. Do NOT
 * specify minor revision (second dot) - 4.1.2 is NOT a valid value for this setting.
 *
 * Database URL (CIVICRM_DSN) for CiviCRM Data:
 * Database URL format:
 *      define( 'CIVICRM_DSN', 'mysql://crm_db_username:crm_db_password@db_server/crm_database?new_link=true');
 *
 * Drupal and CiviCRM can share the same database, or can be installed into separate databases.
 *
 * EXAMPLE: Drupal and CiviCRM running in the same database...
 *      DB Name = drupal, DB User = drupal
 *      define( 'CIVICRM_DSN'         , 'mysql://drupal:YOUR_PASSWORD@localhost/drupal?new_link=true' );
 *
 * EXAMPLE: Drupal and CiviCRM running in separate databases...
 *      Drupal  DB Name = drupal, DB User = drupal
 *      CiviCRM DB Name = civicrm, CiviCRM DB User = civicrm
 *      define( 'CIVICRM_DSN'         , 'mysql://civicrm:YOUR_PASSWORD@localhost/civicrm?new_link=true' );
 *
 * MySQL Path:
 * This stores the installed path of mysql. You will need to verify and modify this value if you are
 * planning on using CiviCRMs built-in Database Backup utility. If you have shell access, you may be
 * able to query the path by using one of the following commands:
 * $ whereis mysql
 * $ type mysql
 *
 */
 
define( 'CIVICRM_MYSQL_VERSION', 5.0 );
define( 'CIVICRM_DSN' , 'mysql://root:MYPASS@localhost/ic?new_link=true' );
define( 'CIVICRM_MYSQL_PATH', '/mysql/bin/' );

/**
 * File System Paths:
 *
 * $civicrm_root is the file system path on your server where the civicrm
 * code is installed. Use an ABSOLUTE path (not a RELATIVE path) for this setting.
 *
 * CIVICRM_TEMPLATE_COMPILEDIR is the file system path where compiled templates are stored.
 * These sub-directories and files are temporary caches and will be recreated automatically
 * if deleted.
 *
 * IMPORTANT: The COMPILEDIR directory must exist,
 * and your web server must have read/write access to these directories.
 *
 *
 * EXAMPLE - CivicSpace / Drupal:
 * If the path to the CivicSpace or Drupal home directory is /var/www/htdocs/civicspace
 * the $civicrm_root setting would be:
 *      $civicrm_root = '/var/www/htdocs/civicspace/modules/civicrm/';
 *
 * the CIVICRM_TEMPLATE_COMPILEDIR would be:
 *      define( 'CIVICRM_TEMPLATE_COMPILEDIR', '/var/www/htdocs/civicspace/files/civicrm/templates_c/' );
 *
 * EXAMPLE - Joomla Installations:
 * If the path to the Joomla home directory is /var/www/htdocs/joomla
 * the $civicrm_root setting would be:
 *      $civicrm_root = '/var/www/htdocs/joomla/administrator/components/com_civicrm/civicrm/';
 *
 * the CIVICRM_TEMPLATE_COMPILEDIR would be:
 *      define( 'CIVICRM_TEMPLATE_COMPILEDIR', '/var/www/htdocs/joomla/media/civicrm/templates_c/' );
 *
 * EXAMPLE - Standalone Installations:
 * If the path to the Standalone home directory is /var/www/htdocs/civicrm
 * the $civicrm_root setting would be:
 *      $civicrm_root = '/var/www/htdocs/civicrm/';
 *
 * the CIVICRM_TEMPLATE_COMPILEDIR would be:
 *      define( 'CIVICRM_TEMPLATE_COMPILEDIR', '/var/www/htdocs/civicrm/templates_c/' );
 */

global $civicrm_root;

$civicrm_root = '/htdocs/chaven2/sites/all/modules/civicrm/';
define( 'CIVICRM_TEMPLATE_COMPILEDIR', '/htdocs/chaven2/files/civicrm/templates_c/' );


/**
 * Site URLs:
 *
 * This section defines absolute and relative URLs to access the host CMS (Drupal or Joomla)
 * resources. Also you can use Standalone to access the host CMS resources.
 *
 * IMPORTANT: Trailing slashes should be used on all URL settings.
 *
 *
 * EXAMPLE - Drupal Installations:
 * If your site's home url is http://www.example.com/drupal/
 * these variables would be set as below. Modify as needed for your install.
 *
 * CIVICRM_UF_BASEURL - home URL for your site:
 *      define( 'CIVICRM_UF_BASEURL' , 'http://www.example.com/drupal/' );
 *
 * EXAMPLE - Joomla Installations:
 * If your site's home url is http://www.example.com/joomla/
 *
 * CIVICRM_UF_BASEURL - home URL for your site:
 * Administration site:
 *      define( 'CIVICRM_UF_BASEURL' , 'http://www.example.com/joomla/administrator/' );
 * Front-end site:
 *      define( 'CIVICRM_UF_BASEURL' , 'http://www.example.com/joomla/' );
 *
 * EXAMPLE - Standalone Installations:
 * If your site's home url is http://www.examle.com/civicrm/
 *
 * CIVICRM_UF_BASEURL - home URL for your site:
 *      define( 'CIVICRM_UF_BASEURL' , 'http://www.example.com/civicrm/standalone/' );
 */
 
define( 'CIVICRM_UF_BASEURL'      , 'http://localhost/chaven2/' );

/**
 * SMTP Server Authentication Password:
 *
 * If your SMTP server requires authentication, you will enable that and enter the
 * Username from Administer CiviCRM >> Global Settings >> SMTP. Then enter the
 * authentication Password below.
 *
 */
define( 'CIVICRM_SMTP_PASSWORD', '');

/**
 * Multi-site Support
 *
 * CiviCRM uses Domain ID keys to allow you to store separate data sets for multiple sites
 * using the same codebase.
 *
 * Refer to the 'Multi-site Support' section of the Installation Guide for more info.
 */

define('CIVICRM_DOMAIN_ID' , 1 );

/**
 * Joomla! Front-end Component Flag
 * If this configuration file is being used by a Joomla! front-end CiviCRM component
 * instance, set this value to 1.
 */

define( 'CIVICRM_UF_FRONTEND', 0 );

/**
 *
 * Do not change anything below this line. Keep as is
 *
 */

$include_path = '.'        . PATH_SEPARATOR .
                $civicrm_root . PATH_SEPARATOR .
                $civicrm_root . DIRECTORY_SEPARATOR . 'packages' . PATH_SEPARATOR .
                get_include_path( );
set_include_path( $include_path );

define( 'CIVICRM_SMARTYDIR'  , $civicrm_root . DIRECTORY_SEPARATOR . 'packages' . DIRECTORY_SEPARATOR . 'Smarty' . DIRECTORY_SEPARATOR );
define( 'CIVICRM_TEST_DIR'   , $civicrm_root . DIRECTORY_SEPARATOR . 'test-new'   . DIRECTORY_SEPARATOR );
define( 'CIVICRM_DAO_DEBUG'  , 0 );
define( 'CIVICRM_TEMPLATEDIR', $civicrm_root . DIRECTORY_SEPARATOR . 'templates'   );
define( 'CIVICRM_PLUGINSDIR' , $civicrm_root . DIRECTORY_SEPARATOR . 'CRM' . DIRECTORY_SEPARATOR . 'Core' . DIRECTORY_SEPARATOR . 'Smarty' . DIRECTORY_SEPARATOR . 'plugins' );

define( 'CIVICRM_GETTEXT_CODESET'    , 'utf-8'   );
define( 'CIVICRM_GETTEXT_DOMAIN'     , 'civicrm' );
define( 'CIVICRM_GETTEXT_RESOURCEDIR', $civicrm_root . DIRECTORY_SEPARATOR . 'l10n' );

if ( function_exists( 'variable_get' ) && variable_get('clean_url', '0') != '0' ) {
    define( 'CIVICRM_CLEANURL', 1 );
} else {
    define( 'CIVICRM_CLEANURL', 0 );
}

// force PHP to auto-detect Mac line endings
ini_set('auto_detect_line_endings', '1');

// make sure the memory_limit is at least 32 MiB
$memLimitString = trim(ini_get('memory_limit'));
$memLimitUnit   = strtolower(substr($memLimitString, -1));
$memLimit       = (int) $memLimitString;
switch ($memLimitUnit) {
    case 'g': $memLimit *= 1024;
    case 'm': $memLimit *= 1024;
    case 'k': $memLimit *= 1024;
}
if ($memLimit >= 0 and $memLimit < 33554432) {
    ini_set('memory_limit', '32M');
}
}

?>


When it works ok!. When not: let me know, I will setup the xampp/drupal/civicrm config for yoy and place it on a ftp server. It is night here so I can not do it direct for you.



 

hwdornbush

  • I post occasionally
  • **
  • Posts: 57
  • Karma: 0
Re: parse error
August 09, 2007, 05:26:06 pm
I saw that CiviCRM-beta10790 is now available and includes an automated installer.  This, I thought, would provide the answer.

Well, first, I had to find out how to enable InnoDB in MySQL, which I am running on my local PC using XAMPP.  I found the answer how to enable it on the XAMPP forums.  Once enabled, the automated installer completed the civicrm.settings.php file.

The critical (at least to me) lines are shown here:

define( 'CIVICRM_UF_DSN'           , 'mysql://chweb1:password@localhost/chaven1?new_link=true' );

define( 'CIVICRM_DSN'          , 'mysql://chweb1:password@localhost/civicrm1?new_link=true' );

$civicrm_root = 'C:/Eclipse/eworkspace/chaven2/sites/all/modules/civicrm';
define( 'CIVICRM_TEMPLATE_COMPILEDIR', 'C:/Eclipse/eworkspace/chaven2\\files\\civicrm\\templates_c\\' );

define( 'CIVICRM_UF_BASEURL'      , 'http://chaven2.localhost\/' );

I would never have come up with these strings, especially the one for COMPILEDIR but there they are, and they seem to work fine on my Windows XP / XAMPP site.  Note that the COMPILEDIR is even in a different part of my C: drive from XAMPP, which is great because I can edit things with Eclipse.  You may need to find a different way to do those strings, or just update to the latest beta and let the automated installer do it for you!!   ;D

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: parse error
August 09, 2007, 05:32:06 pm

wow :) most excellent that it works in windows!

We dont have a windows box available readily, so we really dont do much testing with windows. But i'm glad it works :)

lobo

P.S> Before you complain that we should test on windows since its the worlds most dominant platform etc, please consider donating a couple of recent windows-based labtops to the project :)

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

msn

  • I post frequently
  • ***
  • Posts: 152
  • Karma: 6
  • Please talk to the other site
Re: parse error
August 09, 2007, 05:57:41 pm
 :D Great!

I am a litle confused about the / \//... strings, but that could be eclipse, I not familar with eclips.
Maybe you want to make an how-to for the community?

It is also nice to see the auto installer working, compliments to Lobo and his team.

Martin


hwdornbush

  • I post occasionally
  • **
  • Posts: 57
  • Karma: 0
Re: parse error
August 09, 2007, 08:47:17 pm
OK, I re-installed with the Drupal and CiviCRM within the directory tree of XAMPP.  I compared the settings files, and can say what the automated installer did.  I am not sure that I can say why, but this may help some others to install if they can't use the automated installer (which would be the better way, if possible, now that it exists).

For CMS Datasource:  The entry in civicrm.settings.php should look like:

define( 'CIVICRM_UF_DSN'           , 'mysql://dbuser:password@localhost/drupaldb?new_link=true' );

For CiviCRM database (mine was separate from the Drupal database):

define( 'CIVICRM_DSN'          , 'mysql://dbuser:password@localhost/civicrmdb?new_link=true' );

Those are the easy parts.  Here come the hard ones.  For file system paths:

$civicrm_root = 'C:/xampp/htdocs/chaven2/sites/all/modules/civicrm';
define( 'CIVICRM_TEMPLATE_COMPILEDIR', 'C:/xampp/htdocs/drupal\\files\\civicrm\\templates_c\\' );

Note that the automated installer put the template directory in files... and not in site/default/files as I would have preferred, especially if I want a multi-site installation.  It also created some different subdirectories (custom and persist instead of crm_docs which may be a new requirement for all sites.  I bet that I could move these directories and the pointer if I wanted to.

What is consistent between my two installations is that the $civicrm_root string is all with forward slashes (/) and the string for COMPILEDIR has a first part which is the Drupal root directory with forward slashes (/) and a second part with the directory tree within the Drupal root directory with double backward slashes (\\)

The BASEURL string is slightly different between the two installations, with one of the installations having a "\/" at the end:

define( 'CIVICRM_UF_BASEURL'      , 'http://chaven2.localhost\/' );

while the other had what I would expect,

define( 'CIVICRM_UF_BASEURL'      , 'http://localhost/chaven2/' );

In the first case, I used a VirtualHost declaration in Apache to link to the site that was outside XAMPP.  I got this from the IBM Developerworks article on Drupal, which I recommend.

These are the only changes I found in the civicrm.settings.php files.

I hope this is helpful to others.  I never would have guessed the combination of / and \\ that seemed to work.

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: parse error
August 09, 2007, 11:57:39 pm
Quote from: hwdornbush on August 09, 2007, 08:47:17 pm
$civicrm_root = 'C:/xampp/htdocs/chaven2/sites/all/modules/civicrm';
define( 'CIVICRM_TEMPLATE_COMPILEDIR', 'C:/xampp/htdocs/drupal\\files\\civicrm\\templates_c\\' );

Note that the automated installer put the template directory in files... and not in site/default/files as I would have preferred, especially if I want a multi-site installation.  It also created some different subdirectories (custom and persist instead of crm_docs which may be a new requirement for all sites.  I bet that I could move these directories and the pointer if I wanted to.

Note that the installer is designed for simple installation of Drupal, not for a multisite install. You can do a single site install and then replicate / modify values as needed for a multisite install. We assume that simple installs needed the most help :)
 
Quote from: hwdornbush on August 09, 2007, 08:47:17 pm
What is consistent between my two installations is that the $civicrm_root string is all with forward slashes (/) and the string for COMPILEDIR has a first part which is the Drupal root directory with forward slashes (/) and a second part with the directory tree within the Drupal root directory with double backward slashes (\\)

We get a directory value from $_SERVER['SCRIPT_FILENAME']. We can use this directly to get the civicrm_root value.  For the COMPILEDIR we use a combination of the drupal root got from $_SERVER and then append files/civicrm/templates_c. We ask PHP for what the operating system separator (PATH_SEPARATOR) is, use that and escape it if needed
 
Quote from: hwdornbush on August 09, 2007, 08:47:17 pm
The BASEURL string is slightly different between the two installations, with one of the installations having a "\/" at the end:

define( 'CIVICRM_UF_BASEURL'      , 'http://chaven2.localhost\/' );

while the other had what I would expect,

define( 'CIVICRM_UF_BASEURL'      , 'http://localhost/chaven2/' );

In the first case, I used a VirtualHost declaration in Apache to link to the site that was outside XAMPP.  I got this from the IBM Developerworks article on Drupal, which I recommend.

We get this value again from $_SERVER. so not sure why it different

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

Pages: 1 [2]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • parse error

This forum was archived on 2017-11-26.