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

Author Topic: civicrm_root error  (Read 6260 times)

eyersee

  • Guest
civicrm_root error
May 26, 2008, 05:41:43 am
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: /public_html/go/d08/sites/default.

Please review the Installation Instructions, Installation FAQs, and Trouble-shooting documentation for assistance.

warning: ini_set() [function.ini-set]: A session is active. You cannot change the session module's ini settings at this time. in /home/domain/public_html/go/d08/sites/default/civicrm.settings.php on line 148.
warning: ini_set() [function.ini-set]: A session is active. You cannot change the session module's ini settings at this time. in /home/domain/public_html/go/d08/sites/default/civicrm.settings.php on line 150.
warning: include_once(CRM/Core/Config.php) [function.include-once]: failed to open stream: No such file or directory in /home/domain/public_html/go/d08/modules/civicrm/drupal/civicrm.module on line 249.
warning: include_once() [function.include]: Failed opening 'CRM/Core/Config.php' for inclusion (include_path='.:/usr/lib/php') in /home/domain/public_html/go/d08/modules/civicrm/drupal/civicrm.module on line 249.


getting error trying to install civicrm - and i cant make sense of the help I have found.

can some one please help - Thanks

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: civicrm_root error
May 26, 2008, 06:05:10 am
Please verify if civicrm_root path (/public_html/go/d08/sites/default) is the one where your civicrm files are. It looks like actual root might be /public_html/go/d08/sites/default/modules/civicrm or similar.

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!

marqpdx

  • I post occasionally
  • **
  • Posts: 58
  • Karma: 2
Re: civicrm_root error
May 28, 2008, 02:42:26 pm
I'm getting the same error, using Drupal 5.7 and the latest Civi. Am using Plesk, if that matters.

i have /var/www/vhosts/civicrm.mydomain.org/httpdocs/sites/all/modules/civicrm/ with all the files readable by the web user.

i have /var/www/vhosts/civicrm.mydomain.org/httpdocs/sites/default/civicrm.settings.php

in /sites/default/civicrm.settings.php it reads:
$civicrm_root = '/var/www/vhosts/civicrm.mydomain.org/httpdocs/sites/all/modules/civicrm';

do i need a trailing slash on the $civicrm_root ?

if i do a force refresh, it sometimes works. but then it stops. seems very unreliable?

any thoughts????

thx,
m


Piotr Szotkowski

  • Moderator
  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: civicrm_root error
May 29, 2008, 02:58:36 am
Are you sure your civicrm.settings.php file is actually being read?

(You can test it with putting some gibberish in there and seeing whether it changes anything.)
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.

marqpdx

  • I post occasionally
  • **
  • Posts: 58
  • Karma: 2
Re: civicrm_root error
May 29, 2008, 10:59:36 am
i touched the settings file and it's being read.

happening less often now. me-thinks there's some sort of caching issue involved. i cleared the session table, and when i force refresh, it usually works correctly.

will keep monitoring, but more now, seems fine.

thanks for taking the time,
m

lgfish

  • Guest
Re: civicrm_root error
July 15, 2008, 09:12:56 am
I seem to be having the same problem as marqpdx.  I was able to run the install script, but when i enable civiCRM i get the following error warnings and suggestions:

warning: include_once(CRM/Core/Config.php) [function.include-once]: failed to open stream: No such file or directory in /mnt/local/home/actvtestsite/ac-testsite-tv.dreamhosters.com/sites/all/modules/civicrm/drupal/civicrm.module on line 249.

warning: include_once() [function.include]: Failed opening 'CRM/Core/Config.php' for inclusion (include_path='.:/www.ac-testsite-tv.dreamhosters.com/sites/all/modules/civicrm/:/www.ac-testsite-tv.dreamhosters.com/sites/all/modules/civicrm//packages:.:/usr/local/php5/lib/php:/usr/local/lib/php') in /mnt/local/home/actvtestsite/ac-testsite-tv.dreamhosters.com/sites/all/modules/civicrm/drupal/civicrm.module on line 249.

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/www.ac-testsite-tv.dreamhosters.com/civicrm.settings.php).

» civicrm_root is currently set to: /www.ac-testsite-tv.dreamhosters.com/sites/all/modules/civicrm/.
====

Here's the bit relavent to civicrm_root from my settings file, which i dutifully placed in my sites/www.ac-testsite-tv.dreamhoster.com/ directory.  ( the *only* copy of settings is there. Is that my problem?  I read that I should perhaps have it in two places in a comment at http://wiki.civicrm.org/confluence/display/CRMDOC/Error+Config ) : 

====
global $civicrm_root;

$civicrm_root = '/www.ac-testsite-tv.dreamhosters.com/sites/all/modules/civicrm/';
define( 'CIVICRM_TEMPLATE_COMPILEDIR', '/www.ac-testsite-tv.dreamhosters.com/files/civicrm/templates_c/' );
=====

I also read at http://wiki.civicrm.org/confluence/display/CRMDOC/Error+Config that I should create some additional directories and reference them in the settings file :

     "Please check that you have created following directories and their attributes are set to 777:
crm_docs; persist; template_c; upload
After creating these directories add the following path in the civicrm.settings.php file as follows: 

$civicrm_root = '/your_drupal_server_path/modules/civicrm/' ;
define( 'CIVICRM_TEMPLATE_COMPILEDIR', '/your_drupal_server_path/modules/civicrm/templates_c/' );
define( 'CIVICRM_UF_BASEURL', 'http://www.your_drupal_server_path/' );
define( 'CIVICRM_UPLOADDIR'          , '/your_drupal_server_path/modules/civicrm/upload/'  );
define( 'CIVICRM_CUSTOM_FILE_UPLOADDIR'    , '/your_drupal_server_path/modules/civicrm/crm_docs/' );
define( 'CIVICRM_UF_RESOURCEURL'  , 'http://your_drupal_server_path/modules/civicrm/' );
define( 'CIVICRM_IMAGE_UPLOADURL' , 'http://your_drupal_server_path/modules/civicrm/persist/' );   "

Is this necessary?  I have not done this yet.  could this be causing my problem?

And, lastly, is it possible that running drupal's update.php could fix this?  i have not run it since installing civi. 

Many thanks in advance for any insight!
-L

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: civicrm_root error
July 15, 2008, 10:16:09 am
It looks like your civicrm_root setting is not correct (based on where your civicrm.module file is located - the path in the first warning msg). Seems like it should be:

$civicrm_root = '/mnt/local/home/actvtestsite/ac-testsite-tv.dreamhosters.com/sites/all/modules/civicrm/';
Protect your investment in CiviCRM by  becoming a Member!

lgfish

  • Guest
Re: civicrm_root error
July 16, 2008, 05:24:37 am
Thanks, Dave  :).  My coworker managed to get it up last night after all.  He said the issue was that the civicrm.settings.php file was only in one directory, and it should have been in two places.   

I'm afraid this is a naive question, but what is the logic behind the first part of the path you suggested?  (the '/mnt/local/home/actvtestsite/....) I thought that path would only work if I was trying to run civi locally on my own server? 

Also, is it best practice to create those other directories as suggested at http://wiki.civicrm.org/confluence/display/CRMDOC/Error+Config ?

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: civicrm_root error
July 16, 2008, 10:29:56 am
The CiviCRM settings file (civicrm.settings.php) should only need to be in place unless you're doing a multi-site installation. It should be located in the same place as your Drupal settings file (settings.php) - which is usually <drupal root directory>/sites/default

Based on the information reported in your initial error message (which shows the server file-system location of your Drupal and CiviCRM installation as being in '/mnt/local/home/actvtestsite/ac-testsite-tv.dreamhosters.com' - your settings files should be in the '/mnt/local/home/actvtestsite/ac-testsite-tv.dreamhosters.com/sites/default'

That said, if what you have is working now - and you're not getting errors - you're probably fine. You don't need to create the additional directories if permissions are set correctly - CiviCRM will create them for you - and probably has assuming you're not getting errors.

Protect your investment in CiviCRM by  becoming a Member!

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

This forum was archived on 2017-11-26.