Index: /tags/1.1/utils.c
===================================================================
--- /tags/1.1/utils.c	(revision 148)
+++ /tags/1.1/utils.c	(revision 246)
@@ -272,6 +272,4 @@
 				NULL
 				) == FAILURE) {
-		CG(in_compilation) = 1;
-		CG(compiled_filename) = filename;
 		CG(zend_lineno) = 0;
 #ifdef IS_UNICODE
@@ -308,6 +306,4 @@
 					NULL
 					) == FAILURE) {
-			CG(in_compilation) = 1;
-			CG(compiled_filename) = filename;
 			CG(zend_lineno) = ZESW(func->op_array.opcodes[0].lineno, func->op_array.line_start);
 #ifdef IS_UNICODE
@@ -341,6 +337,4 @@
 				ZESW(&stored_ce_ptr, NULL)
 				) == FAILURE) {
-		CG(in_compilation) = 1;
-		CG(compiled_filename) = filename;
 		CG(zend_lineno) = ZESW(0, cep->line_start);
 #ifdef IS_UNICODE
@@ -396,4 +390,9 @@
 
 	sandbox->filename = filename;
+
+#ifdef E_STRICT
+	sandbox->orig_user_error_handler_error_reporting = EG(user_error_handler_error_reporting);
+	EG(user_error_handler_error_reporting) &= ~E_STRICT;
+#endif
 
 	return sandbox;
@@ -428,5 +427,5 @@
 	/* install class */
 	while (b != NULL) {
-		xc_install_class(sandbox->filename, (xc_cest_t*)b->pData,
+		xc_install_class(sandbox->filename, (xc_cest_t*) b->pData,
 				BUCKET_KEY_TYPE(b), ZSTR(BUCKET_KEY(b)), b->nKeyLength TSRMLS_CC);
 		b = b->pListNext;
@@ -448,5 +447,10 @@
 
 	if (install) {
+		CG(in_compilation)    = 1;
+		CG(compiled_filename) = sandbox->filename;
+		CG(zend_lineno)       = 0;
 		xc_sandbox_install(sandbox TSRMLS_CC);
+		CG(in_compilation)    = 0;
+		CG(compiled_filename) = NULL;
 
 		/* no free as it's installed */
@@ -469,4 +473,8 @@
 	memcpy(&EG(included_files), &OG(included_files), sizeof(EG(included_files)));
 
+#ifdef E_STRICT
+	EG(user_error_handler_error_reporting) = sandbox->orig_user_error_handler_error_reporting;
+#endif
+
 	if (sandbox->alloc) {
 		efree(sandbox);
Index: /tags/1.1/utils.h
===================================================================
--- /tags/1.1/utils.h	(revision 131)
+++ /tags/1.1/utils.h	(revision 246)
@@ -35,4 +35,5 @@
 typedef struct {
 	int alloc;
+	int orig_user_error_handler_error_reporting;
 	char *filename;
 
Index: /tags/1.1/xcache.c
===================================================================
--- /tags/1.1/xcache.c	(revision 154)
+++ /tags/1.1/xcache.c	(revision 246)
@@ -985,8 +985,7 @@
 
 restore:
-	if (php_check_open_basedir(stored_xce->name.str.val TSRMLS_CC) != 0) {
-		return NULL;
-	}
-
+	CG(in_compilation)    = 1;
+	CG(compiled_filename) = stored_xce->name.str.val;
+	CG(zend_lineno)       = 0;
 #ifdef DEBUG
 	fprintf(stderr, "restoring\n");
@@ -1016,4 +1015,6 @@
 		zend_bailout();
 	}
+	CG(in_compilation)    = 0;
+	CG(compiled_filename) = NULL;
 #ifdef DEBUG
 	fprintf(stderr, "restored\n");
