frankenphp
frankenphp copied to clipboard
Support for max_execution_time and max_input_time
max_input_time and max_execution_time are currently disable as they conflict with ZTS.
PHP will need to be improved if we want to support these options: https://externals.io/message/118859
I wonder if we could emulate this?
Provide a function in go (maybe go_register_execution_timers?) that is called during initialization in C by reading the settings from php.ini:
go_register_execution_timers(PG(max_execution_time));
Then in go, we create a timer and listen for the end of the request:
select {
case <- httpRequest.Context().Done():
case <- time.After(maxExecutionTime):
}
// tell PHP to die if it is still alive
WDYT?
Done for Linux. It will probably not be possible for mac and Windows.