Answers.Body: <p>On your civicrm.settings.php, you have a line </p>
  
  <p>define( 'CIVICRM_UF_BASEURL', '<a href="http://42.42.42.42" rel="nofollow">http://42.42.42.42</a>' );</p>
  
  <p>with the numbers being your real ip address. You need to modify and replace that with your domain name</p>
  
  <p>Once that's done, clear all caches again and it should work</p>
  
  <p>X+</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-10-22T13:09:33.207Z
Answers.Text: That is one of the items I could not find in the civicrm.settings.php file.  I have pasted my file to the question
Answers.UserDisplayName: Greg Williams
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-10-22T14:00:13.220Z
Answers.Text: @GregWilliams -- at a glance, that doesn't look like the right settings file to me. Did you get it in sites/default/civicrm.settings.php?
Answers.UserDisplayName: Laryn
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-10-24T03:05:58.190Z
Answers.Text: You were correct I was looking in the wrong place - have found the correct file and made the change.  Problem fixed!! What a great group you all are many thanks.
Answers.UserDisplayName: Greg Williams
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-10-22T07:33:41.633Z
Answers.LastActivityDate: 2015-10-22T07:33:41.633Z
Answers.UserDisplayName: Xavier
Answers.Body: <p>You're looking in the wrong place for civicrm.settings.php.  Check /sites/default/civicrm.settings.php (or wherever your Drupal settings.php is located, if it's not in /sites/default)</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-10-23T23:24:23.957Z
Answers.LastActivityDate: 2015-10-23T23:24:23.957Z
Answers.UserDisplayName: Jon G - Megaphone Tech
Body: <p>I set up Drupal and CiviCRM on a shared server by using IPaddress/userid.  Now I have changed the DNS servers for the domain-name and can access Drupal OK using www.domain-name    CiviCRM is shown on the menu but when I click on it I get a revolving circle and the dashboard never come up.  Still works fine if I use IPaddress/userid/  to get to Drupal and then CiviCRM</p>
  
  <p>I have changed the URLs in "Settings - Resource URLs" and "Settings - Cleanup Caches and Update Paths"  But that has not helped. </p>
  
  <p>Looking at posts on various forums it would appear I have to "Move"  CiviCRM and maybe Drupal.</p>
  
  <p>I looked at the question "How to correct domain in URLs after a change?" on this site but could not find any of the mentioned items in my civicrm.settings.php  </p>
  
  <p>These include <code>define( 'CIVICRM_UF_BASEURL'</code>  and
  <code>$civicrm_root = '/home/path_to_html/sites/all/modules/civicrm'; define( 'CIVICRM_TEMPLATE_COMPILEDIR', '/home/path_to_html/sites/default/files/civicrm/templates_c/' );</code></p>
  
  <p>I have pasted the contents of the  civicrm.settings.php  that is in the sites/all/modules/civicrm directory below. There are no other civicrm.settings.php  files in higher directories.</p>
  
  <p>Could someone please confirm that I need to "move" the site by saving the DB and creating a new CiviCRM and then loading the saved data (leaving some bits out) into the new database?</p>
  
  <p>Thanks
  Greg</p>
  
  <pre><code>&lt;?php
  
  /**
   * This function has been copied from DRUPAL_ROOT/includes/bootstrap.inc
   */
  
  /**
   * Locate the appropriate configuration file.
   *
   * Try finding a matching configuration directory by stripping the
   * website's hostname from left to right and pathname from right to
   * left.  The first configuration file found will be used, the
   * remaining will ignored.  If no configuration file is found,
   * return a default value '$confdir/default'.
   *
   * Example for a fictitious site installed at
   * http://www.drupal.org/mysite/test/ the 'settings.php' is
   * searched in the following directories:
   *
   *  1. $confdir/www.drupal.org.mysite.test
   *  2. $confdir/drupal.org.mysite.test
   *  3. $confdir/org.mysite.test
   *
   *  4. $confdir/www.drupal.org.mysite
   *  5. $confdir/drupal.org.mysite
   *  6. $confdir/org.mysite
   *
   *  7. $confdir/www.drupal.org
   *  8. $confdir/drupal.org
   *  9. $confdir/org
   *
   * 10. $confdir/default
   *
   */
  
  function civicrm_conf_init() {
      global $skipConfigError;
  
      static $conf = '';
  
      if ($conf) {
          return $conf;
      }
  
      /**
       * We are within the civicrm module, the drupal root is 2 links
       * above us, so use that
       */
      $currentDir = dirname( __FILE__ ) . DIRECTORY_SEPARATOR;
      if ( file_exists( $currentDir . 'settings_location.php' ) ) {
          include $currentDir . 'settings_location.php';
      }
  
      if ( defined( 'CIVICRM_CONFDIR' ) &amp;&amp; ! isset( $confdir ) ) {
          $confdir = CIVICRM_CONFDIR;
      } else {
          // make it relative to civicrm.config.php, else php makes it relative
          // to the script that invokes it
          $moduleDir  = 'sites' . DIRECTORY_SEPARATOR . 'all' . DIRECTORY_SEPARATOR . 'modules';
          $contribDir = $moduleDir . DIRECTORY_SEPARATOR . 'contrib';
          // check to see if this is under sites/all/modules/contrib or subdir civicrm-core
          if ( strpos( $currentDir, $contribDir ) !== false || strpos( $currentDir, 'civicrm-core' ) !== false) {
              $confdir = $currentDir . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..';
          // check to see if this is under sites/all/modules
          } else if ( strpos( $currentDir, $moduleDir ) !== false ) {
              $confdir = $currentDir . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..';
          } else if ( strpos( $currentDir, 'plugins' . DIRECTORY_SEPARATOR . 'civicrm' . DIRECTORY_SEPARATOR . 'civicrm' ) !== false ) {
               //if its wordpress
              $confdir = $currentDir . DIRECTORY_SEPARATOR . '..';
          } else {
              $confdir = $currentDir . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR;
          }
      }
  
      if ( file_exists( $confdir . DIRECTORY_SEPARATOR . 'civicrm.settings.php' ) ) {
          return $confdir;
      }
  
      if ( ! file_exists( $confdir ) &amp;&amp; ! $skipConfigError ) {
          echo "Could not find valid configuration dir, best guess: $confdir&lt;br/&gt;&lt;br/&gt;\n";
          exit( );
      }
  
      $phpSelf  = array_key_exists( 'PHP_SELF' , $_SERVER ) ? $_SERVER['PHP_SELF' ] : '';
      $httpHost = array_key_exists( 'HTTP_HOST', $_SERVER ) ? $_SERVER['HTTP_HOST'] : '';
  
      $uri    = explode('/', $phpSelf );
      $server = explode('.', implode('.', array_reverse(explode(':', rtrim($httpHost, '.')))));
      for ($i = count($uri) - 1; $i &gt; 0; $i--) {
          for ($j = count($server); $j &gt; 0; $j--) {
              $dir = implode('.', array_slice($server, -$j)) . implode('.', array_slice($uri, 0, $i));
              if (file_exists("$confdir/$dir/civicrm.settings.php")) {
                  $conf = "$confdir/$dir";
                  return $conf;
              }
          }
      }
  
  // FIXME: problem spot for Drupal 5.1 config dir layout
  $conf = "$confdir/default";
  return $conf;
  }
  
  $settingsFile = civicrm_conf_init( ) . '/civicrm.settings.php';
  define('CIVICRM_SETTINGS_PATH', $settingsFile);
  $error = @include_once( $settingsFile );
  if ( $error == false ) {
      echo "Could not load the settings file at: {$settingsFile}\n";
      exit( );
  }
  
  // Load class loader
  global $civicrm_root;
  require_once $civicrm_root . '/CRM/Core/ClassLoader.php';
  CRM_Core_ClassLoader::singleton()-&gt;register();
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-10-22T06:10:34.723Z
Comments.Text: Can you clarify what the "the mentioned items in my civicrm.settings.php" might be?
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-10-22T18:35:16.460Z
Comments.Text: What are your Drupal and CiviCRM versions and who is your host?
Comments.UserDisplayName: Hershel
Tags: <drupal>
Title: Do I need to "Move" my site after changing access URL
ThreadText: # Do I need to "Move" my site after changing access URL
  
  (Asked by: username_0 on 2015-10-22)
  
  I set up Drupal and CiviCRM on a shared server by using IPaddress/userid. Now I have changed the DNS servers for the domain-name and can access Drupal OK using www.domain-name CiviCRM is shown on the menu but when I click on it I get a revolving circle and the dashboard never come up. Still works fine if I use IPaddress/userid/ to get to Drupal and then CiviCRM
  
  I have changed the URLs in "Settings - Resource URLs" and "Settings - Cleanup Caches and Update Paths" But that has not helped.
  
  Looking at posts on various forums it would appear I have to "Move" CiviCRM and maybe Drupal.
  
  I looked at the question "How to correct domain in URLs after a change?" on this site but could not find any of the mentioned items in my civicrm.settings.php
  
  These include `define( 'CIVICRM_UF_BASEURL'` and
  `$civicrm_root = '/home/path_to_html/sites/all/modules/civicrm'; define( 'CIVICRM_TEMPLATE_COMPILEDIR', '/home/path_to_html/sites/default/files/civicrm/templates_c/' );`
  
  I have pasted the contents of the civicrm.settings.php that is in the sites/all/modules/civicrm directory below. There are no other civicrm.settings.php files in higher directories.
  
  Could someone please confirm that I need to "move" the site by saving the DB and creating a new CiviCRM and then loading the saved data (leaving some bits out) into the new database?
  
  Thanks
  username_0
  
  ```
  <?php
  
  /**
   * This function has been copied from DRUPAL_ROOT/includes/bootstrap.inc
   */
  
  /**
   * Locate the appropriate configuration file.
   *
   * Try finding a matching configuration directory by stripping the
   * website's hostname from left to right and pathname from right to
   * left.  The first configuration file found will be used, the
   * remaining will ignored.  If no configuration file is found,
   * return a default value '$confdir/default'.
   *
   * Example for a fictitious site installed at
   * http://www.drupal.org/mysite/test/ the 'settings.php' is
   * searched in the following directories:
   *
   *  1. $confdir/www.drupal.org.mysite.test
   *  2. $confdir/drupal.org.mysite.test
   *  3. $confdir/org.mysite.test
   *
   *  4. $confdir/www.drupal.org.mysite
   *  5. $confdir/drupal.org.mysite
   *  6. $confdir/org.mysite
   *
   *  7. $confdir/www.drupal.org
   *  8. $confdir/drupal.org
   *  9. $confdir/org
   *
   * 10. $confdir/default
   *
   */
  
  function civicrm_conf_init() {
      global $skipConfigError;
  
      static $conf = '';
  
      if ($conf) {
          return $conf;
      }
  
      /**
       * We are within the civicrm module, the drupal root is 2 links
       * above us, so use that
       */
      $currentDir = dirname( __FILE__ ) . DIRECTORY_SEPARATOR;
      if ( file_exists( $currentDir . 'settings_location.php' ) ) {
          include $currentDir . 'settings_location.php';
      }
  
      if ( defined( 'CIVICRM_CONFDIR' ) && ! isset( $confdir ) ) {
          $confdir = CIVICRM_CONFDIR;
      } else {
          // make it relative to civicrm.config.php, else php makes it relative
          // to the script that invokes it
          $moduleDir  = 'sites' . DIRECTORY_SEPARATOR . 'all' . DIRECTORY_SEPARATOR . 'modules';
          $contribDir = $moduleDir . DIRECTORY_SEPARATOR . 'contrib';
          // check to see if this is under sites/all/modules/contrib or subdir civicrm-core
          if ( strpos( $currentDir, $contribDir ) !== false || strpos( $currentDir, 'civicrm-core' ) !== false) {
              $confdir = $currentDir . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..';
          // check to see if this is under sites/all/modules
          } else if ( strpos( $currentDir, $moduleDir ) !== false ) {
              $confdir = $currentDir . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..';
          } else if ( strpos( $currentDir, 'plugins' . DIRECTORY_SEPARATOR . 'civicrm' . DIRECTORY_SEPARATOR . 'civicrm' ) !== false ) {
               //if its wordpress
              $confdir = $currentDir . DIRECTORY_SEPARATOR . '..';
          } else {
              $confdir = $currentDir . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR;
          }
      }
  
      if ( file_exists( $confdir . DIRECTORY_SEPARATOR . 'civicrm.settings.php' ) ) {
          return $confdir;
      }
  
      if ( ! file_exists( $confdir ) && ! $skipConfigError ) {
          echo "Could not find valid configuration dir, best guess: $confdir<br/><br/>\n";
          exit( );
      }
  
      $phpSelf  = array_key_exists( 'PHP_SELF' , $_SERVER ) ? $_SERVER['PHP_SELF' ] : '';
      $httpHost = array_key_exists( 'HTTP_HOST', $_SERVER ) ? $_SERVER['HTTP_HOST'] : '';
  
      $uri    = explode('/', $phpSelf );
      $server = explode('.', implode('.', array_reverse(explode(':', rtrim($httpHost, '.')))));
      for ($i = count($uri) - 1; $i > 0; $i--) {
          for ($j = count($server); $j > 0; $j--) {
              $dir = implode('.', array_slice($server, -$j)) . implode('.', array_slice($uri, 0, $i));
              if (file_exists("$confdir/$dir/civicrm.settings.php")) {
                  $conf = "$confdir/$dir";
                  return $conf;
              }
          }
      }
  
  // FIXME: problem spot for Drupal 5.1 config dir layout
  $conf = "$confdir/default";
  return $conf;
  }
  
  $settingsFile = civicrm_conf_init( ) . '/civicrm.settings.php';
  define('CIVICRM_SETTINGS_PATH', $settingsFile);
  $error = @include_once( $settingsFile );
  if ( $error == false ) {
      echo "Could not load the settings file at: {$settingsFile}\n";
      exit( );
  }
  
  // Load class loader
  global $civicrm_root;
  require_once $civicrm_root . '/CRM/Core/ClassLoader.php';
  CRM_Core_ClassLoader::singleton()->register();
  
  ```
  
  **Tags:** drupal
  
  > **Comments:**
  > **username_1**: Can you clarify what the "the mentioned items in my civicrm.settings.php" might be?  
  > **username_2**: What are your Drupal and CiviCRM versions and who is your host?  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_3 on 2015-10-22. Score: 4
  
  On your civicrm.settings.php, you have a line
  
  define( 'CIVICRM\_UF\_BASEURL', '<http://42.42.42.42>' );
  
  with the numbers being your real ip address. You need to modify and replace that with your domain name
  
  Once that's done, clear all caches again and it should work
  
  X+
  
  > **Comments:**
  > **username_0**: That is one of the items I could not find in the civicrm.settings.php file.  I have pasted my file to the question  
  > **username_4**: @username_0 -- at a glance, that doesn't look like the right settings file to me. Did you get it in sites/default/civicrm.settings.php?  
  > **username_0**: You were correct I was looking in the wrong place - have found the correct file and made the change.  Problem fixed!! What a great group you all are many thanks.  
  
  ---
  
  ### Answer by username_5 on 2015-10-23. Score: 1
  
  You're looking in the wrong place for civicrm.settings.php. Check /sites/default/civicrm.settings.php (or wherever your Drupal settings.php is located, if it's not in /sites/default)
  
  
  ---
  
  