Index: branches/PHP_5_2/Zend/zend_API.c =================================================================== --- branches/PHP_5_2/Zend/zend_API.c (revision 313266) +++ branches/PHP_5_2/Zend/zend_API.c (working copy) @@ -1942,7 +1942,7 @@ #if HAVE_LIBDL || defined(HAVE_MACH_O_DYLD_H) #if !(defined(NETWARE) && defined(APACHE_1_BUILD)) - if (module->handle) { + if (module->handle && !getenv("ZEND_DONT_UNLOAD_MODULES")) { DL_UNLOAD(module->handle); } #endif Index: branches/PHP_5_3/Zend/zend_API.c =================================================================== --- branches/PHP_5_3/Zend/zend_API.c (revision 313266) +++ branches/PHP_5_3/Zend/zend_API.c (working copy) @@ -2133,7 +2133,7 @@ #if HAVE_LIBDL #if !(defined(NETWARE) && defined(APACHE_1_BUILD)) - if (module->handle) { + if (module->handle && !getenv("ZEND_DONT_UNLOAD_MODULES")) { DL_UNLOAD(module->handle); } #endif