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)

stephenrockwell

  • Guest
Parse error in civicrmsettings
September 08, 2007, 07:34:18 pm
Parse error: parse error, unexpected '.' in /home/content/C/r/o/Crossleft/html/sites/default/civicrm.settings.php on line 175


I'm gettting this error trying to install 1.8 on drupal 5.2.   it doesn't seem to like the final lines:

...
?>

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 in civicrmsettings
September 08, 2007, 10:26:18 pm

1. Was civicrm.settings.php generated by the installer?

2. did u edit the file manually?

3. can u cut-n-paste the last 10 lines of the file here

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

stephenrockwell

  • Guest
Re: Parse error in civicrmsettings
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.



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 );
...
?>


stephenrockwell

  • Guest
Re: Parse error in civicrmsettings
September 09, 2007, 10:24:51 am
if I take the periods out of the civicrmssettings file i get this:

warning: civicrm_initialize(CRM/Core/Config.php): failed to open stream: No such file or directory in /home/content/C/r/o/Crossleft/html/sites/all/modules/civicrm/drupal/civicrm.module on line 243.
warning: civicrm_initialize(): Failed opening 'CRM/Core/Config.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/content/C/r/o/Crossleft/html/sites/all/modules/civicrm/drupal/civicrm.module on line 243.

Oops! - The path for including CiviCRM code files is not set properly. Most likely there is an error in the civicrm_root setting in your CiviCRM settings file (sites/default/civicrm.settings.php).

» civicrm_root is currently set to: /home/content/C/r/o/Crossleft/html/sites/all/modules/.


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 in civicrmsettings
September 09, 2007, 11:59:47 am

Can you cut-n-paste the line where you set civicrm_root

You might want to consider upgrading to php5 since 1.8 is the last release with php4 support

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

stephenrockwell

  • Guest
Re: Parse error in civicrmsettings
September 09, 2007, 01:45:37 pm
 */

global $civicrm_root;

$civicrm_root = '/home/content/C/r/o/Crossleft/html/sites/all/modules/';
define( 'CIVICRM_TEMPLATE_COMPILEDIR', '/home/content/C/r/o/Crossleft/html/files/civicrm/templates_c/' );

/**


I don't believe that have option to upgrade to php with my webhost

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 in civicrmsettings
September 09, 2007, 02:17:00 pm

Sorry, at this point i'm sure why you are getting the error since your civicrm_root seems to be right

Your best bet might be to find a php5 host and use the installer

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

stephenrockwell

  • Guest
Re: Parse error in civicrmsettings
September 09, 2007, 02:25:33 pm
i don't really have that option, but thanks anyway...

too bad, i really wanted to use civicrm

msn

  • I post frequently
  • ***
  • Posts: 152
  • Karma: 6
  • Please talk to the other site
Re: Parse error in civicrmsettings
September 09, 2007, 04:12:44 pm
Do I see an error in the root rule?
global $civicrm_root;
$civicrm_root = '/home/content/C/r/o/Crossleft/html/sites/all/modules/';

I would say this should be:
$civicrm_root = '/home/content/C/r/o/Crossleft/html/sites/all/modules/civicrm/';


??

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 in civicrmsettings
September 09, 2007, 05:14:09 pm

argh, i missed that. BUT the include path in the error message (include_path='.:/usr/local/lib/php') does not even include the erroneous civicrm directory, which leads me to a conclude that there is something else wrong with the install

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

stephenrockwell

  • Guest
Re: Parse error in civicrmsettings
September 09, 2007, 05:51:37 pm
thanks for catching something...but that didn't do it.

has anyone ever been able to install civicrm on godaddy hosting account?  if so, i would love to her how.


msn

  • I post frequently
  • ***
  • Posts: 152
  • Karma: 6
  • Please talk to the other site
Re: Parse error in civicrmsettings
September 10, 2007, 12:39:33 am
I did a fast check on my site5 server by commenting the .htacces rule for switching to php4: AddHandler application/x-httpd-php5 .php

I get the error:
Parse error: syntax error, unexpected ',', expecting '(' in /home/name/public_html/drupal5/sites/all/modules/civicrm/drupal/civicrm.module on line 477

I think lobo is right: you need php5

Please check the faq of godaddy: http://help.godaddy.com/article.php?article_id=1082&prog_id=GoDaddy&isc=
And see: you can switch to php5 with the rule AddHandler application/x-httpd-php5 .php in .htacces




stephenrockwell

  • Guest
Re: Parse error in civicrmsettings
September 10, 2007, 08:43:19 am
I thought i had done that, but it doesn't seem to have taken.
I'm fairly new to this.  Is this the right code?


# AddHandler x-httpd-php5 .php
# AddHandler x-httpd-php .php4

roaming

  • Guest
Re: Parse error in civicrmsettings
September 10, 2007, 08:50:24 am
On godaddy, when you create a database, you have the choice to use php4 or php 5.
The option appears with checkboxes when you create the database.

If you are using the same database you used for Drupal, you might be stuck with whatever you picked at the time (the default is php4), or you might be able to change afterwards.  But you can also create another database just for civicrm (which is recommended by the wiki) and use php5.

Keep in mind that godaddy has its own host name for the databases, you can't use "localhost" (I assume you already know that but I'm just making sure).

The problem seems to be about directing civicrm relevant files to the exact location of the module on Godaddy, and to use the right database name. 

I'm following your thread, as I have the same problem. 

stephenrockwell

  • Guest
Re: Parse error in civicrmsettings
September 10, 2007, 09:11:55 am
do you have the choice to pick php4 or 5 or mysql 4.1 or 5.0?....if its mysql i have tried both in a separate database and believe i have the full database name.   I think have the right name for the databases as well.

I think php is determed by .htaccess file in the root directory...i'm just trying to figure out if i have the right code.   

let me know if you get it up on your side.

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.