Caching problem. Site only works with cache off I have this drupal 7 site.
I wanted to clone it in order to try some new stuff in it, without working on my localhost. So I did it, following these steps:

Cloned the database:

mysqldump -h localhost -u XX -p XXX &gt; backup.sql
mysql -h localhost -u newXX -p newXX &lt; backup.sql


And then cloned the files and changed their perms:

rsync -avHl /home/XX/public_html/* /home/newXX/public_html
chown -R newXX. /home/newXX/public_html/*


After that I've updated and changed the settings file (to use in the cloned files the new database credentials), and created a new .htmlaccess file.

All went well and good. The new site was just like the older site, and both sites were running ok. 

A few days have passed since then.

But after that the old site have all WSOD inside every page, except the frontpage.

It was a cache problem, that didn't solved clearing all cache tables, but adding this into my settings file:

$conf = array(
'cache' =&gt; '0',
'preprocess_css' =&gt; '0',
'preprocess_js' =&gt; '0',
'block_cache' =&gt; '0',
'page_compression' =&gt; '0',
);


The thing is that I can't have my site without caching, and even after successfully logging in and manually unchecked all cache items under admin/config/development/performance, I get the WSOD if I try and remove the $conf array I've manually set at the settings.php file.

Note: I have memcached installed on my server, and this is what I've added in my settings.php file:

$conf['cache_backends'][] = 'sites/all/modules/memcache/memcache.inc';
$conf['cache_default_class'] = 'MemCacheDrupal';
$conf['memcache_key_prefix'] = 'memcache_liga';
$conf['cache_class_cache_form'] = 'DrupalDatabaseCache';


Please note that I've uninstalled memcache module on the cloned site, and deleted that configuration inside the settings file of the cloned site.

Why is all this happening? And what I may do about this?

Update: I forgot to mention that I've added to my index.php right after the opening php tag, this:

error_reporting(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);


And when the error appears (WSOD), the page is still completely blank!
Here is how I do in my local projects, may be it can help you.

I have one main project(local) and four its instances(cloned). Same files, same db structure (I'm using Memcache Storage module).. First time when I've tried to clone and work on them I faced some strange problems, then I found that they were sharing cached data (I was using default memcached instance with 11211 port).. Then I just copied the default memcached.conf file as memcached_1.conf(memcached_2.conf,...) and changed their port as 11212,... in them, restarted all memcached instanes(sudo service memcached restart), and specified those ports to to my cloned projects in their settings.php, that solved my problem..