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) »
  • Error with civicrm_root settings after moving from local MAMP to online server
Pages: [1]

Author Topic: Error with civicrm_root settings after moving from local MAMP to online server  (Read 1349 times)

ninjachi

  • I’m new here
  • *
  • Posts: 3
  • Karma: 0
  • CiviCRM version: 3.3.3
  • CMS version: Drupal 6.2
  • MySQL version: 5.1.44
  • PHP version: 5.3.2
Error with civicrm_root settings after moving from local MAMP to online server
February 02, 2011, 07:31:01 pm
Hi, I am new to drupal and civicrm but am very willing to learn.  :)

I moved my MAMP local Drupal installation onto my inmotionhosting servers following all directions. However,  Civicrm seems to be having issues. It says I need to adjust the civicrm_root settings:

warning: include_once(CRM/Core/Config.php) [function.include-once]: failed to open stream: No such file or directory in /home/ninjer5/public_html/sites/all/modules/civicrm/drupal/civicrm.module on line 273.
warning: include_once() [function.include]: Failed opening 'CRM/Core/Config.php' for inclusion (include_path='.:/public_html/modules/civicrm:/public_html/modules/civicrm/packages:.:/usr/lib/php:/usr/local/lib/php') in /home/ninjer5/public_html/sites/all/modules/civicrm/drupal/civicrm.module on line 273.

Here is my settings file. I have tried to change the root directory to add '/home/ninjer5' infront of /public_html/... and it still does not work. Drupal is installed into the root directory of marshadoucette.com. There is no seperate drupal-6.20 folder etc. Also, below this line '$civicrm_root = '/public_html/modules/civicrm';' is pointing to modules/civicrm but I looked in the modules folder of public_html and there is no civicrm folder. It does not exist on my local MAMP either and its running fine. Not sure if this is just for the install or if I still need that folder in there.


I've been at this for a couple hours and it is frustrating me. Please help.

ninjachi

  • I’m new here
  • *
  • Posts: 3
  • Karma: 0
  • CiviCRM version: 3.3.3
  • CMS version: Drupal 6.2
  • MySQL version: 5.1.44
  • PHP version: 5.3.2
Re: Error with civicrm_root settings after moving from local MAMP to online server
February 02, 2011, 07:33:18 pm
Here are the details, for some reason it wont let me post external links so I have tried to adjust it so you can see.

define( 'CIVICRM_UF'               , 'Drupal'        );

define( 'CIVICRM_UF_DSN'           , 'mysql://CMSuser:pass@localhost/ninjer5_drpl1?new_link=true' );

define( 'CIVICRM_DSN'          , 'mysql://CRMuser:pass@localhost/ninjer5_drpl1?new_link=true' );

define('CIVICRM_LOGGING_DSN', CIVICRM_DSN);

global $civicrm_root;

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

define( 'CIVICRM_UF_BASEURL'      , 'http:// mmm.marshadoucette.com/' ); (changed www to mmm)

// define( 'CIVICRM_MAIL_LOG', '/public_html/modules/civicrm/sites/default/files/civicrm/templates_c//mail.log' );

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Error with civicrm_root settings after moving from local MAMP to online server
February 03, 2011, 02:57:43 am
Yes, your $civicrm_root is set incorrectly, presuming this is shared hosting. There are two ways to get the correct value:

1. Ask your host.

2. Install CiviCRM fresh on the server using a different database. That will set $civicrm_root correctly. If you want to use your existing CiviCRM database, you can then just adjust the database connect string to point to that one.

HTH
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

ninjachi

  • I’m new here
  • *
  • Posts: 3
  • Karma: 0
  • CiviCRM version: 3.3.3
  • CMS version: Drupal 6.2
  • MySQL version: 5.1.44
  • PHP version: 5.3.2
Re: Error with civicrm_root settings after moving from local MAMP to online server
February 03, 2011, 04:33:24 pm
My $civicrm_root was set incorrectly. This was the correct string:

$civicrm_root = '/home/ninjer5/public_html/sites/all/modules/civicrm/';
define( 'CIVICRM_TEMPLATE_COMPILEDIR', '/home/ninjer5/public_html/sites/default/files/civicrm/templates_c/' );

However, after this was solved, another error came up 'DB_DataObject Error: DB Error: connect failed' when I tried to access CiviCRM. Apparently, this is a normal issue and I cannot migrate CiviCRM from my MAMP local server onto my shared hosted server? I need to do a fresh install of CiviCRM and then migrate the data over from the local database. As I learned from here http://forum.civicrm.org/index.php?topic=10687.0 and the steps to migrate (including why CiviCRM doesn't like to copy over?) http://wiki.civicrm.org/confluence/display/CRMDOC33/Moving+an+Existing+Installation+to+a+New+Server+or+Location

This seems quite tedious and bothersome if I want to keep a local version of my site to do changes and upload them when they are complete and tested, since I will have to side step CiviCRM every time. Even with a fresh install of CiviCRM and Drupal on my hosted server, what if I wanted to just import my site again after working on it locally. Seems like I wont be able to just dump in the databases and drupal files for fear that CiviCRM carries its physical links from my MAMP local server and I run into this DB_DataObject Error.... again. I dislike having to make changes to the website when it is live, instead of a local environment first. Am I just seeing this wrong? Hopefully so.
« Last Edit: February 03, 2011, 04:36:29 pm by ninjachi »

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Error with civicrm_root settings after moving from local MAMP to online server
February 05, 2011, 12:11:44 pm
I don't understand what you are talking about here. The page you linked to, i.e. http://wiki.civicrm.org/confluence/display/CRMDOC33/Moving+an+Existing+Installation+to+a+New+Server+or+Location , gives directions how to move your database from one installation to another. If you have a local and a "live" installation, it's a very simple procedure to copy the local database to the live, reset the domain settings (one little SQL query) and that's it.

Of course any changes made to your live DB will be lost if you overwrite it.

But anyhow your basic issue that you can't copy a database I don't follow--databases are easily portable.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • Error with civicrm_root settings after moving from local MAMP to online server

This forum was archived on 2017-11-26.