0

I have a weird situation with cloned site, I have copied the entire content from a production server, and made a different directory for testing environment. The steps I did to clone a site is:

  1. Copied all the contents from the main folder /www/d7/ to new folder /www/test/
  2. Made a separate server config in nginx to browse the content from browser
  3. Original site can be browsed via http://d7.example.com and the copied site can be browsed via http://test.example.com, the nginx have separate logs for both
  4. Dumped the original database after flushing drupal cache, created new database called 'test', with new username 'test' and new password 'test', imported the dumped database to new database 'test'.
  5. Changed the database connection parameter in the file /www/test/sites/default/settings.php to accumulate newly created database.

Now, when I put the production site in offline mode, the test site also goes to offline mode, how come this is possible ? The most weird thing is if I put the site to online mode from test site, the production site also goes to online mode. I even tried creating new database, new database user and changing the settings.php still same issue.

I tried installing different modules to different sites, and the installed modules shows in their respective sites.

Can anyone tell me what's going on here ?

Update with Answer:

As Clive commented below, I changed the memcached_storage settings in settings.php file to $conf['memcache_storage_key_prefix'] = 'test_site'; and I don't have any issues now.

  • 3
    If you have any special caching enabled in settings.php (e.g. Memcache) make sure you're specifying unique bins for each site – Clive Jun 4 '13 at 17:59
  • aye, might be memcached as you said. I copied contents from one site to another without changing the memcached settings... thank you for pointing this... I will change the memcached settings and inform again – user12947 Jun 4 '13 at 18:07
  • @Clive, thank you very much for pointing towards memcached, it is working after changing the memcached bins for test site. – user12947 Jun 4 '13 at 18:17
  • If you solved your problem you can answer your own question and accept the answer (after a period of time). That way this will appear as answered, and may help someone in the future with the same issue. – beth Jun 4 '13 at 19:04
1

As beth, said in the comment, I am answering this, even after updating the question with answer.

The culprit was Memcached bin, since I am using memcahce_storage module for memcached, the bins of the main site and test site were same, hence, creating this confusion.

I edited the settings.php page of test site and changed the prefix for memcached for test-site as $conf['memcache_storage_key_prefix'] = 'test_site';, now everything is perfect !!!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy