We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d7afe6e + 65bd8d2 commit 2c59a6bCopy full SHA for 2c59a6b
main/main.c
@@ -407,7 +407,15 @@ static PHP_INI_MH(OnUpdateTimeout)
407
}
408
zend_unset_timeout();
409
ZEND_ATOL(EG(timeout_seconds), ZSTR_VAL(new_value));
410
- zend_set_timeout(EG(timeout_seconds), 0);
+ if (stage != PHP_INI_STAGE_DEACTIVATE) {
411
+ /*
412
+ * If we're restoring INI values, we shouldn't reset the timer.
413
+ * Otherwise, the timer is active when PHP is idle, such as the
414
+ * the CLI web server or CGI. Running a script will re-activate
415
+ * the timeout, so it's not needed to do so at script end.
416
+ */
417
+ zend_set_timeout(EG(timeout_seconds), 0);
418
+ }
419
return SUCCESS;
420
421
/* }}} */
0 commit comments