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 in civicrmsettings
Pages: 1 [2]

Author Topic: Parse error in civicrmsettings  (Read 8483 times)

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Parse error in civicrmsettings
September 10, 2007, 09:26:53 am
Just in case we're mis-communicating here...
Are the 25 lines from civicrm.settings.php shown below EXACTLY the last 25 lines of your file? Or did you put in the three dots to indicate that the file continues?

If your file actually ends with:
Code: [Select]
...
?>

then the file has been corrupted or truncated somehow. You'll need to start with a new complete copy of civicrm.settings.php.sample - and re-enter your settings. 

Quote from: stephenrockwell on September 09, 2007, 09:27:46 am
last 25 lines are so here:

I did not use the installer because i am running
mysql 5.0, php 4.3.11, drupal 5.2

i definitely used the php 4 version.

Code: [Select]
define( 'CIVICRM_UF_BASEURL'      , 'http://www.instituteforprogressivechristianity.org/' );

/**
 * 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 );
...
?>
Protect your investment in CiviCRM by  becoming a Member!

stephenrockwell

  • Guest
Re: Parse error in civicrmsettings
September 10, 2007, 02:08:47 pm
David those three dots looks is just what i cut and pasted from the civicrmsettings table in the instructions...when i include them i get an error message for all of drupal.  When i take them out i get the error messages as described in the post.

roaming

  • Guest
Re: Parse error in civicrmsettings
September 10, 2007, 05:12:39 pm
Sorry! The choice is actually between mySQL versions, and not php versions (I'm new at php and mySQL and easily get the two mixed-up. I'll have to be more careful before I post wrong info).  But I just called godaddy and they said that the php version for their databases is 5.  So you should be able to create a new database with php5. 
As you can tell, I'm too new at Drupal and databases, and I'm not getting anywhere (I used Dreamweaver up to now).

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Parse error in civicrmsettings
September 10, 2007, 06:32:46 pm
Quote from: stephenrockwell on September 10, 2007, 02:08:47 pm
David those three dots looks is just what i cut and pasted from the civicrmsettings table in the instructions...when i include them i get an error message for all of drupal.  When i take them out i get the error messages as described in the post.

The three dots in the instructions are meant to indicate that the rest of the file (which you copied from civicrm.settings.php.sample) does not need to be edited. To restore the correct last part of the settings file, at the end of your civicrm.settings.php file replace this:

Code: [Select]
...
?>

with this (this should at least get you past the parse error):

Code: [Select]
/**
 *
 * 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');
}

?>


Regards,
dave
Protect your investment in CiviCRM by  becoming a Member!

stephenrockwell

  • Guest
Re: Parse error in civicrmsettings
September 11, 2007, 04:55:03 am
thanks dave,

That got me part of the way there...looks like CivicCRM installed,

When i click on it, now here's what i get.

CiviCRM
 Sorry. A non-recoverable error has occurred.

Database Error Code: Cannot add or update a child row: a foreign key constraint fails (`ipccrm/civicrm_contact`, CONSTRAINT `FK_civicrm_contact_domain_id` FOREIGN KEY (`domain_id`) REFERENCES `civicrm_domain` (`id`)), 1452

Return to home page.

Error Details:


Array
(
    [callback] => Array
        (
           
  • => CRM_Core_Error
  • [1] => handle
            )

       
Code: [Select]
=> -1
    [message] => DB Error: unknown error
    [mode] => 16
    [debug_info] => INSERT INTO civicrm_contact (domain_id , contact_type , sort_name , display_name , hash ) VALUES ( 0 , 'Individual' , 'srockwell@instituteforprogressivechristianity.org' , 'srockwell@instituteforprogressivechristianity.org' , 'd73c6ff919c049ececaec32d7bd25efc' )  [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`ipccrm/civicrm_contact`, CONSTRAINT `FK_civicrm_contact_domain_id` FOREIGN KEY (`domain_id`) REFERENCES `civicrm_domain` (`id`))]
    [type] => db_error
    [user_info] => INSERT INTO civicrm_contact (domain_id , contact_type , sort_name , display_name , hash ) VALUES ( 0 , 'Individual' , 'srockwell@instituteforprogressivechristianity.org' , 'srockwell@instituteforprogressivechristianity.org' , 'd73c6ff919c049ececaec32d7bd25efc' )  [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`ipccrm/civicrm_contact`, CONSTRAINT `FK_civicrm_contact_domain_id` FOREIGN KEY (`domain_id`) REFERENCES `civicrm_domain` (`id`))]
    [to_string] => [db_error: message="DB Error: unknown error" code=-1 mode=callback callback=CRM_Core_Error::handle prefix="" info="INSERT INTO civicrm_contact (domain_id , contact_type , sort_name , display_name , hash ) VALUES ( 0 , 'Individual' , 'srockwell@instituteforprogressivechristianity.org' , 'srockwell@instituteforprogressivechristianity.org' , 'd73c6ff919c049ececaec32d7bd25efc' )  [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`ipccrm/civicrm_contact`, CONSTRAINT `FK_civicrm_contact_domain_id` FOREIGN KEY (`domain_id`) REFERENCES `civicrm_domain` (`id`))]"]
)

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Parse error in civicrmsettings
September 11, 2007, 07:21:55 am
Please make sure that your Domain ID in civicrm.settings.php is set to 1:

define('CIVICRM_DOMAIN_ID' , 1 );

... and that you've loaded either civicrm_generated.mysql OR civicrm_data.mysql to your database as described in the install instructions.

Protect your investment in CiviCRM by  becoming a Member!

stephenrockwell

  • Guest
Re: Parse error in civicrmsettings
September 11, 2007, 09:35:41 am
good call..i didn't have the domain id set right...i had changed it to zero because of a post i had read on drupal forum...

thanks so much.

it looks like i am finally up and running!

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

This forum was archived on 2017-11-26.