|
33 | 33 | ZEND_TSRMLS_CACHE_DEFINE() |
34 | 34 | #endif |
35 | 35 |
|
36 | | -/* Timeouts are currently fundamentally broken with ZTS except on Linux and |
37 | | - * FreeBSD: https://bugs.php.net/bug.php?id=79464 */ |
38 | | -#ifndef ZEND_MAX_EXECUTION_TIMERS |
39 | | -static const char HARDCODED_INI[] = "max_execution_time=0\n" |
40 | | - "max_input_time=-1\n\0"; |
41 | | -#endif |
42 | | - |
43 | 36 | static const char *MODULES_TO_RELOAD[] = {"filter", "session", NULL}; |
44 | 37 |
|
45 | 38 | frankenphp_version frankenphp_get_version() { |
@@ -901,24 +894,17 @@ static void *php_main(void *arg) { |
901 | 894 | sapi_startup(&frankenphp_sapi_module); |
902 | 895 |
|
903 | 896 | #ifndef ZEND_MAX_EXECUTION_TIMERS |
904 | | -#if (PHP_VERSION_ID >= 80300) |
905 | | - frankenphp_sapi_module.ini_entries = HARDCODED_INI; |
906 | | -#else |
907 | | - frankenphp_sapi_module.ini_entries = malloc(sizeof(HARDCODED_INI)); |
908 | | - if (frankenphp_sapi_module.ini_entries == NULL) { |
909 | | - perror("malloc failed"); |
910 | | - exit(EXIT_FAILURE); |
911 | | - } |
912 | | - memcpy(frankenphp_sapi_module.ini_entries, HARDCODED_INI, |
913 | | - sizeof(HARDCODED_INI)); |
914 | | -#endif |
| 897 | + /* overwrite php.ini with custom user settings and disable |
| 898 | + * max_execution_timers */ |
| 899 | + char *php_ini_overrides = go_get_custom_php_ini(true); |
915 | 900 | #else |
916 | 901 | /* overwrite php.ini with custom user settings */ |
917 | | - char *php_ini_overrides = go_get_custom_php_ini(); |
| 902 | + char *php_ini_overrides = go_get_custom_php_ini(false); |
| 903 | +#endif |
| 904 | + |
918 | 905 | if (php_ini_overrides != NULL) { |
919 | 906 | frankenphp_sapi_module.ini_entries = php_ini_overrides; |
920 | 907 | } |
921 | | -#endif |
922 | 908 |
|
923 | 909 | frankenphp_sapi_module.startup(&frankenphp_sapi_module); |
924 | 910 |
|
|
0 commit comments