Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion main/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,15 @@ static PHP_INI_MH(OnUpdateTimeout)
}
zend_unset_timeout();
ZEND_ATOL(EG(timeout_seconds), ZSTR_VAL(new_value));
zend_set_timeout(EG(timeout_seconds), 0);
if (stage != PHP_INI_STAGE_DEACTIVATE) {
/*
* If we're restoring INI values, we shouldn't reset the timer.
* Otherwise, the timer is active when PHP is idle, such as the
* the CLI web server or CGI. Running a script will re-activate
* the timeout, so it's not needed to do so at script end.
*/
zend_set_timeout(EG(timeout_seconds), 0);
}
return SUCCESS;
}
/* }}} */
Expand Down