File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -93,7 +93,21 @@ int fpm_php_apply_defines_ex(struct key_value_s *kv, int mode) /* {{{ */
9393 if (!strcmp (name , "extension" ) && * value ) {
9494 zval zv ;
9595 zend_interned_strings_switch_storage (0 );
96+
97+ #if ZEND_RC_DEBUG
98+ bool orig_rc_debug = zend_rc_debug ;
99+ /* Loading extensions after php_module_startup() breaks some invariants.
100+ * For instance, it will update the refcount of persistent strings,
101+ * which is normally not allowed at this stage. */
102+ zend_rc_debug = false;
103+ #endif
104+
96105 php_dl (value , MODULE_PERSISTENT , & zv , 1 );
106+
107+ #if ZEND_RC_DEBUG
108+ zend_rc_debug = orig_rc_debug ;
109+ #endif
110+
97111 zend_interned_strings_switch_storage (1 );
98112 return Z_TYPE (zv ) == IS_TRUE ? FPM_PHP_INI_EXTENSION_LOADED : FPM_PHP_INI_EXTENSION_FAILED ;
99113 }
You can’t perform that action at this time.
0 commit comments