We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents aa9d140 + 995f11a commit 53eaeadCopy full SHA for 53eaead
sapi/fpm/fpm/fpm_php.c
@@ -93,7 +93,21 @@ int fpm_php_apply_defines_ex(struct key_value_s *kv, int mode) /* {{{ */
93
if (!strcmp(name, "extension") && *value) {
94
zval zv;
95
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
105
php_dl(value, MODULE_PERSISTENT, &zv, 1);
106
107
108
+ zend_rc_debug = orig_rc_debug;
109
110
111
zend_interned_strings_switch_storage(1);
112
return Z_TYPE(zv) == IS_TRUE ? FPM_PHP_INI_EXTENSION_LOADED : FPM_PHP_INI_EXTENSION_FAILED;
113
}
0 commit comments