Index: /trunk/mod_cacher/xc_cacher.c
===================================================================
--- /trunk/mod_cacher/xc_cacher.c	(revision 1128)
+++ /trunk/mod_cacher/xc_cacher.c	(revision 1129)
@@ -3313,7 +3313,4 @@
 
 	if (strcmp(sapi_module.name, "cli") == 0) {
-		if ((env = getenv("XCACHE_TEST")) != NULL) {
-			xc_test = atoi(env);
-		}
 		if (!xc_test) {
 			/* disable cache for cli except for testing */
Index: /trunk/xcache.c
===================================================================
--- /trunk/xcache.c	(revision 1128)
+++ /trunk/xcache.c	(revision 1129)
@@ -690,4 +690,10 @@
 	}
 
+	if (strcmp(sapi_module.name, "cli") == 0) {
+		if ((env = getenv("XCACHE_TEST")) != NULL) {
+			xc_test = atoi(env);
+		}
+	}
+
 	xc_init_constant(module_number TSRMLS_CC);
 	xc_shm_init_modules();
Index: /trunk/xcache/xc_malloc.c
===================================================================
--- /trunk/xcache/xc_malloc.c	(revision 1128)
+++ /trunk/xcache/xc_malloc.c	(revision 1129)
@@ -25,7 +25,5 @@
 	xc_shmsize_t       size;
 	xc_shmsize_t       memoffset;
-#ifdef HAVE_XCACHE_TEST
 	HashTable blocks;
-#endif
 };
 /* }}} */
@@ -35,9 +33,7 @@
 static void *xc_add_to_blocks(xc_mem_t *mem, void *p, size_t size) /* {{{ */
 {
-#ifdef HAVE_XCACHE_TEST
 	if (p) {
 		zend_hash_add(&mem->shm->blocks, (void *) &p, sizeof(p), (void *) &size, sizeof(size), NULL);
 	}
-#endif
 	return p;
 }
@@ -45,7 +41,5 @@
 static void xc_del_from_blocks(xc_mem_t *mem, void *p) /* {{{ */
 {
-#ifdef HAVE_XCACHE_TEST
 	zend_hash_del(&mem->shm->blocks, (void *) &p, sizeof(p));
-#endif
 }
 /* }}} */
@@ -148,5 +142,4 @@
 static XC_SHM_IS_READWRITE(xc_malloc_is_readwrite) /* {{{ */
 {
-#ifdef HAVE_XCACHE_TEST
 	HashPosition pos;
 	size_t *psize;
@@ -161,5 +154,4 @@
 		zend_hash_move_forward_ex(&shm->blocks, &pos);
 	}
-#endif
 
 	return 0;
@@ -184,7 +176,5 @@
 static XC_SHM_DESTROY(xc_malloc_destroy) /* {{{ */
 {
-#ifdef HAVE_XCACHE_TEST
 	zend_hash_destroy(&shm->blocks);
-#endif
 	free(shm);
 	return;
@@ -197,7 +187,5 @@
 	shm->size = size;
 
-#ifdef HAVE_XCACHE_TEST
 	zend_hash_init(&shm->blocks, 64, NULL, NULL, 1);
-#endif
 	return shm;
 err:
