A change in the production site affects test and staging sites and vice versa I have a production site like www.example.com and I use 2 subdomains test.example.com and stage.example com for testing and staging purposes. Each of these 3 versions of the site uses it's own database. The user and password is the same for all 3 databases, but of course the database names differs. I have checked and double checked that the correct database names are set in the settings.php file for the 3 sites, respectively. 

Nevertheless, when I do a content change in one of these 3 site versions, that same change becomes immediately visible in all 3 sites. 

I have tried to turn off all my caching modules, like Boost and Memcache and Content.

EDITED:
I have now narrowed it down to a caching problem. If I flush all cache in the site that shows the wrong content, it reverts to the right content. So content changes ends up in the right database. But as I said, even though I have all caching turned off, and all caching modules are disabled, all content changes in one site are immediately reflected in the 2 other sites (until I flush all cache in these 2 other sites).

Does anyone have an idea about where to look? Some common caching in the server environment?
What you're describing can happen when you link several sites up to the same cache system, but give the same prefix for each of them in settings.php (or don't provide a prefix at all, which is essentially the same thing).

I'm not 100% sure, but disabling the memcache module might not stop it being used if you're declaring its use in settings.php, which you most likely will be. 

It might not be the cause, but it definitely could result in exactly the situation you find yourself in. Check settings.php in each of the sites, and see what the state of those prefixes are. If this is the problem, providing different prefixes for each site will fix it straight away.