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 not accessible after domain change
Pages: [1]

Author Topic: Civicrm not accessible after domain change  (Read 2461 times)

Tiffani Chin

  • I post occasionally
  • **
  • Posts: 101
  • Karma: 2
  • CiviCRM version: 4.4.4
  • CMS version: Drupal 7.26
  • MySQL version: 5.5.30
  • PHP version: 5.3.17
Civicrm not accessible after domain change
October 10, 2012, 06:41:52 pm
Built a new Drupal/Civicrm site on a test domain.

Just transferred it over to the new domain name.

It's in a multi-site install, so I changed the directory name, Drupal's settings settings.php and  File Systems paths.

I also changed the civicrm.settings.php to use the new domain name in the base_URL and the template location path.

Drupal site came up but when I try to go to Civicrm, I get:

Quote
Error
The website encountered an unexpected error. Please try again later.

I must have missed a setting.  Any thoughts on where to find it?  I know that there are paths at:

civicrm/admin/setting/path?reset=1

Are these hard coded?  And, how can I access them without access to Civicrm itself?

Thanks in advance for any thoughts.
-tiffani

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: Civicrm not accessible after domain change
October 10, 2012, 07:23:04 pm

1. check your CiviCRM.*.log file for more specific errors

2. When i move one site from prod to dev, on my dev environment, in my civicrm.settings.php file, i have:

Code: [Select]
global $civicrm_setting;
$civicrm_setting['Directory Preferences']['extensionsDir'] = '/Users/lobo/CiviCRM/extensions';
$civicrm_setting['Directory Preferences']['customFileUploadDir'] = '/Users/lobo/public_html/drupal7/sites/school/files/civicrm/custom';
$civicrm_setting['Directory Preferences']['imageUploadDir'] = '/Users/lobo/public_html/drupal7/sites/school/files/civicrm/';
$civicrm_setting['Directory Preferences']['uploadDir'] = '/Users/lobo/public_html/drupal7/sites/school/files/civicrm/';
$civicrm_setting['URL Preferences']['extensionsURL'] = 'http://school/extensions';
$civicrm_setting['URL Preferences']['userFrameworkResourceURL'] = 'http://school/sites/school/modules/civicrm/';

this allows me to take a prod CD and drop into development and things work fine

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

Tiffani Chin

  • I post occasionally
  • **
  • Posts: 101
  • Karma: 2
  • CiviCRM version: 4.4.4
  • CMS version: Drupal 7.26
  • MySQL version: 5.5.30
  • PHP version: 5.3.17
Re: Civicrm not accessible after domain change
October 10, 2012, 10:07:19 pm
Hi Lobo,

Thanks for the quick reply.

And, thanks for the code for the civicrm.settings.php file -- I'll definitely want to use that for the next time we try this!

For now... I found my civicrm.*.log files (note: there are no log files from today in the sub-directory for the site I'm unable to access CiviCRM on .. so these are from the sites/default directory (of the main site).  Not positive that they contain the error (but the timestamp on the errors below look about right).

I'm going to check the base URL again too.

I am excited to know where these error logs are now!

Thanks,
-tiffani



Code: [Select]
Oct 10 16:50:12  [info] $Fatal Error Details = Array
(
    [message] => We can't load the requested web page. This page requires cookies to be enabled in your browser settings. Please check this setting and enable cookies (if they are not enabled). Then try again. If this error persists, contact the site adminstrator for assistance.<br /><br />Site Administrators: This error may indicate that users are accessing this page using a domain or URL other than the configured Base URL. EXAMPLE: Base URL is http://example.org, but some users are accessing the page via http://www.example.org or a domain alias like http://myotherexample.org.<br /><br />Error type: Could not find a valid session key.
    [code] =>
)


Oct 10 16:50:12  [info] $backTrace = /home/vsource4/www/www/sites/all/modules/civicrm/CRM/Core/Error.php, backtrace, 303
/home/vsource4/www/www/sites/all/modules/civicrm/CRM/Core/Controller.php, fatal, 246
/home/vsource4/www/www/sites/all/modules/civicrm/CRM/Core/Controller.php, key, 161
/home/vsource4/www/www/sites/all/modules/civicrm/CRM/Contact/Controller/Search.php, __construct, 60
/home/vsource4/www/www/sites/all/modules/civicrm/CRM/Core/Invoke.php(223) : eval()'d code, __construct, 1
/home/vsource4/www/www/sites/all/modules/civicrm/CRM/Core/Invoke.php, eval, 223
/home/vsource4/www/www/sites/all/modules/civicrm/drupal/civicrm.module, invoke, 454
, civicrm_invoke,
/home/vsource4/www/www/includes/menu.inc, call_user_func_array, 516
/home/vsource4/www/www/index.php, menu_execute_active_handler, 21

Oct 10 16:55:43  [info] $Fatal Error Details = Array
(
    [message] => We can't load the requested web page. This page requires cookies to be enabled in your browser settings. Please check this setting and enable cookies (if they are not enabled). Then try again. If this error persists, contact the site adminstrator for assistance.<br /><br />Site Administrators: This error may indicate that users are accessing this page using a domain or URL other than the configured Base URL. EXAMPLE: Base URL is http://example.org, but some users are accessing the page via http://www.example.org or a domain alias like http://myotherexample.org.<br /><br />Error type: Could not find a valid session key.
    [code] =>
)


Oct 10 16:55:43  [info] $backTrace = /home/vsource4/www/www/sites/all/modules/civicrm/CRM/Core/Error.php, backtrace, 303
/home/vsource4/www/www/sites/all/modules/civicrm/CRM/Core/Controller.php, fatal, 246
/home/vsource4/www/www/sites/all/modules/civicrm/CRM/Core/Controller.php, key, 161
/home/vsource4/www/www/sites/all/modules/civicrm/CRM/Contact/Controller/Search.php, __construct, 60
/home/vsource4/www/www/sites/all/modules/civicrm/CRM/Core/Invoke.php(223) : eval()'d code, __construct, 1
/home/vsource4/www/www/sites/all/modules/civicrm/CRM/Core/Invoke.php, eval, 223
/home/vsource4/www/www/sites/all/modules/civicrm/drupal/civicrm.module, invoke, 454
, civicrm_invoke,
/home/vsource4/www/www/includes/menu.inc, call_user_func_array, 516
/home/vsource4/www/www/index.php, menu_execute_active_handler, 21

Oct 10 16:56:24  [info] $Fatal Error Details = Array
(
    [message] => We can't load the requested web page. This page requires cookies to be enabled in your browser settings. Please check this setting and enable cookies (if they are not enabled). Then try again. If this error persists, contact the site adminstrator for assistance.<br /><br />Site Administrators: This error may indicate that users are accessing this page using a domain or URL other than the configured Base URL. EXAMPLE: Base URL is http://example.org, but some users are accessing the page via http://www.example.org or a domain alias like http://myotherexample.org.<br /><br />Error type: Could not find a valid session key.
    [code] =>
)


Oct 10 16:56:24  [info] $backTrace = /home/vsource4/www/www/sites/all/modules/civicrm/CRM/Core/Error.php, backtrace, 303
/home/vsource4/www/www/sites/all/modules/civicrm/CRM/Core/Controller.php, fatal, 246
/home/vsource4/www/www/sites/all/modules/civicrm/CRM/Core/Controller.php, key, 161
/home/vsource4/www/www/sites/all/modules/civicrm/CRM/Contact/Controller/Search.php, __construct, 60
/home/vsource4/www/www/sites/all/modules/civicrm/CRM/Core/Invoke.php(223) : eval()'d code, __construct, 1
/home/vsource4/www/www/sites/all/modules/civicrm/CRM/Core/Invoke.php, eval, 223
/home/vsource4/www/www/sites/all/modules/civicrm/drupal/civicrm.module, invoke, 454
, civicrm_invoke,
/home/vsource4/www/www/includes/menu.inc, call_user_func_array, 516
/home/vsource4/www/www/index.php, menu_execute_active_handler, 21

Tiffani Chin

  • I post occasionally
  • **
  • Posts: 101
  • Karma: 2
  • CiviCRM version: 4.4.4
  • CMS version: Drupal 7.26
  • MySQL version: 5.5.30
  • PHP version: 5.3.17
Re: Civicrm not accessible after domain change
October 10, 2012, 10:30:17 pm
Just to confirm: the base_URL is set correctly (to the new alias). 

But I suspect that it's still looking for the old alias. 

Would love any thoughts on where to look for this setting.

Thanks!

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Civicrm not accessible after domain change
October 11, 2012, 10:20:11 am
I examined this site and removed files/civicrm/ConfigAndLog/Config.IDS.ini and it seems to work now.
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.

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: Civicrm not accessible after domain change
October 11, 2012, 11:11:58 am

would be great if we can detect a bad / invalid Config.IDS.ini and delete it / recreate it automatically.

this issue comes up a bit too often that we should fix it. Hershel, any ideas or thoughts on how to do so?

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

Tiffani Chin

  • I post occasionally
  • **
  • Posts: 101
  • Karma: 2
  • CiviCRM version: 4.4.4
  • CMS version: Drupal 7.26
  • MySQL version: 5.5.30
  • PHP version: 5.3.17
Re: Civicrm not accessible after domain change
October 11, 2012, 11:31:46 am
Thank you Hershel! (+1 from me too, for Hershel and CiviHosting).

That file is noted on the wiki for Joomla installs, but not for Drupal.  I added it to the wiki:
http://wiki.civicrm.org/confluence/display/CRMDOC42/Moving+an+Existing+Installation+to+a+New+Server+or+Location

Although, I have to admit, I didn't think to follow these instructions when I changed the domain name.  Changing the settings file (and now this file) seem to be sufficient.

Thanks again Hershel, you are a site-saver.

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Civicrm not accessible after domain change
October 11, 2012, 12:16:46 pm
Quote from: Donald Lobo on October 11, 2012, 11:11:58 am
would be great if we can detect a bad / invalid Config.IDS.ini and delete it / recreate it automatically.

this issue comes up a bit too often that we should fix it. Hershel, any ideas or thoughts on how to do so?

Not sure where to do this, but I suppose we should check that filter_path as defined in Config.IDS.ini exists on the server. That would be a good check.

Quote from: Tiffani Chin on October 11, 2012, 11:31:46 am
Thanks again Hershel, you are a site-saver.

Happy to help.
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) »
  • Civicrm not accessible after domain change

This forum was archived on 2017-11-26.