File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -893,13 +893,13 @@ static void *php_main(void *arg) {
893893
894894 sapi_startup (& frankenphp_sapi_module );
895895
896- #ifndef ZEND_MAX_EXECUTION_TIMERS
896+ #ifdef ZEND_MAX_EXECUTION_TIMERS
897+ /* overwrite php.ini with custom user settings */
898+ char * php_ini_overrides = go_get_custom_php_ini (false);
899+ #else
897900 /* overwrite php.ini with custom user settings and disable
898901 * max_execution_timers */
899902 char * php_ini_overrides = go_get_custom_php_ini (true);
900- #else
901- /* overwrite php.ini with custom user settings */
902- char * php_ini_overrides = go_get_custom_php_ini (false);
903903#endif
904904
905905 if (php_ini_overrides != NULL ) {
Original file line number Diff line number Diff line change @@ -196,13 +196,15 @@ func go_get_custom_php_ini(disableExecutionTimers C.bool) *C.char {
196196 mainThread .phpIni = make (map [string ]string )
197197 }
198198
199- // hardcoded ini settings if ZEND_MAX_EXECUTION_TIMERS is disabled
199+ // Timeouts are currently fundamentally broken
200+ // with ZTS except on Linux and FreeBSD: https://bugs.php.net/bug.php?id=79464
201+ // Disable timeouts if ZEND_MAX_EXECUTION_TIMERS is not supported
200202 if disableExecutionTimers {
201203 mainThread .phpIni ["max_execution_time" ] = "0"
202204 mainThread .phpIni ["max_input_time" ] = "-1"
203205 }
204206
205- // pass the php.ini overrides to PHP before startup
207+ // Pass the php.ini overrides to PHP before startup
206208 // TODO: if needed this would also be possible on a per-thread basis
207209 overrides := ""
208210 for k , v := range mainThread .phpIni {
You can’t perform that action at this time.
0 commit comments