0

I wasted hours of searching Google back and forth, and found no solution: CiviCRM is set up as an internal only CRM system for an organisation (i.e. IP address 192.168.178.36) - so far, so good. Now I took the server with me to work on CiviCRM, so I changed the IP address to 192.168.2.36 accordingly.

I've changed Apaches httpd.conf, and Apache runs without issues. Drupal seems to come up fine, but whenever I want to access CiviCRM via http://192.168.2.36/q=civicrm/dashboard the website answers with

a) the former IP address (192.168.178.36) in the header of the result page,

b) "Access denied - you are not authorized to access this page."

I deleted the content of all drupal cache tables, I deleted the content of the "templates_c" directory - no success :-(

Please, can someone point me into the right direction?

Regards

Bernhard

5
  • 1
    Did you change the url (or IP in your case) in both the sites/default/civicrm.settings.php and settings.php files?
    – Paul-Tahoe
    Jan 22, 2016 at 19:38
  • Yes, both $base_url (for Drupal) and CIVICRM_UF_BASEURL (for CiviCRM) point to "http://192.168.2.36"
    – Cpt. Jumbo
    Jan 23, 2016 at 15:45
  • Not to beat a dead horse, but if you haven't search through both those files for your old ip address, you should. It may appear other things like CIVICRM_TEMPLATE_COMPILEDIR and civicrm_root.
    – Paul-Tahoe
    Jan 23, 2016 at 16:56
  • A work around might be to put a cheap router between your server and the work network. That way you can have the same IP address.
    – Paul-Tahoe
    Jan 23, 2016 at 16:59
  • What you're trying to do isn't really isn't' much different from creating a test env minus the whole copying of db and code trees. There are lots of guides out there on all the things you need to do.
    – Paul-Tahoe
    Jan 23, 2016 at 17:01

2 Answers 2

1

Setting up a new database isn't necessary. For folks who encounter similar issues in the future: after checking your BASE_URL setting in civicrm.settings.php, delete your templates_c folder (found here), clear all CiviCRM caches, and rebuild your menus. Details on the latter two items are available here.

-1

The answer is hidden deep in the database. I tried to install Drupal again (just the program), and the same message came up. When I then created a new database, everything works as expected.

So be warned that you will need to setup a new database if you plan to move the server to a new location!

2
  • 1
    Did you try "Cleanup Caches" at civicrm/admin/setting/updateConfigBackend?reset=1 ?
    – Laryn
    Apr 26, 2016 at 2:50
  • 4
    "... you will need to setup a new database if you plan to move the server to a new location!" - That's definitively not true - we moved all our projects 3-4 dozen from one data center to another 2y ago and new IPs all around - not saying it's easy but it definitively takes some getting used to and practice moving Drupal/CiviCRM projects around. May 25, 2016 at 23:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.