From 9947ec2acc0cf1681d70bb5730d43342bdc621ee Mon Sep 17 00:00:00 2001 From: Calvin Buckley Date: Mon, 31 Aug 2026 18:46:26 -0300 Subject: [PATCH 1/3] sapi: Remove sapi_force_http_10 This was introduced in 2b95b3c83ba2ab5c695b9bfef1054ec73b7b4ccc. This is not used anywhere and the value is dubious. --- UPGRADING.INTERNALS | 5 +++++ main/SAPI.c | 9 --------- main/SAPI.h | 4 ---- 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS index 41432be1e429..45a36c26f8a0 100644 --- a/UPGRADING.INTERNALS +++ b/UPGRADING.INTERNALS @@ -14,6 +14,9 @@ PHP 8.7 INTERNALS UPGRADE NOTES 1. Internal API changes ======================== +- Removed: + . The sapi_force_http_10() function was removed. + ======================== 2. Build system changes ======================== @@ -29,3 +32,5 @@ PHP 8.7 INTERNALS UPGRADE NOTES ======================== 5. SAPI changes ======================== + +- The force_http_10 method has been removed. diff --git a/main/SAPI.c b/main/SAPI.c index 7de36af440c3..faac0e54d0d1 100644 --- a/main/SAPI.c +++ b/main/SAPI.c @@ -1045,15 +1045,6 @@ SAPI_API int sapi_get_fd(int *fd) } } -SAPI_API int sapi_force_http_10(void) -{ - if (sapi_module.force_http_10) { - return sapi_module.force_http_10(); - } else { - return FAILURE; - } -} - SAPI_API int sapi_get_target_uid(uid_t *obj) { diff --git a/main/SAPI.h b/main/SAPI.h index 2621b9184d1b..f72532557776 100644 --- a/main/SAPI.h +++ b/main/SAPI.h @@ -225,7 +225,6 @@ SAPI_API size_t sapi_apply_default_charset(char **mimetype, size_t len); SAPI_API void sapi_activate_headers_only(void); SAPI_API int sapi_get_fd(int *fd); -SAPI_API int sapi_force_http_10(void); SAPI_API int sapi_get_target_uid(uid_t *); SAPI_API int sapi_get_target_gid(gid_t *); @@ -273,8 +272,6 @@ struct _sapi_module_struct { int (*get_fd)(int *fd); - int (*force_http_10)(void); - int (*get_target_uid)(uid_t *); int (*get_target_gid)(gid_t *); @@ -330,7 +327,6 @@ END_EXTERN_C() 0, /* php_ini_ignore */ \ 0, /* php_ini_ignore_cwd */ \ NULL, /* get_fd */ \ - NULL, /* force_http_10 */ \ NULL, /* get_target_uid */ \ NULL, /* get_target_gid */ \ NULL, /* input_filter */ \ From 4ff4c3b4ce7e2680149f0002307a4bdbd971e78f Mon Sep 17 00:00:00 2001 From: Calvin Buckley Date: Mon, 31 Aug 2026 19:12:23 -0300 Subject: [PATCH 2/3] sapi: Remove sapi_get_fd This was introduced in 09f463ddae79c53a065d28da61a33fda96669f84. This is not used anywhere. --- UPGRADING.INTERNALS | 3 +++ main/SAPI.c | 9 --------- main/SAPI.h | 5 ----- 3 files changed, 3 insertions(+), 14 deletions(-) diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS index 45a36c26f8a0..b73b183acca1 100644 --- a/UPGRADING.INTERNALS +++ b/UPGRADING.INTERNALS @@ -16,6 +16,7 @@ PHP 8.7 INTERNALS UPGRADE NOTES - Removed: . The sapi_force_http_10() function was removed. + . The sapi_get_fd() function was removed. ======================== 2. Build system changes @@ -34,3 +35,5 @@ PHP 8.7 INTERNALS UPGRADE NOTES ======================== - The force_http_10 method has been removed. + +- The get_fd method has been removed. diff --git a/main/SAPI.c b/main/SAPI.c index faac0e54d0d1..1a25397f6d55 100644 --- a/main/SAPI.c +++ b/main/SAPI.c @@ -1036,15 +1036,6 @@ SAPI_API char *sapi_getenv(const char *name, size_t name_len) return value; } -SAPI_API int sapi_get_fd(int *fd) -{ - if (sapi_module.get_fd) { - return sapi_module.get_fd(fd); - } else { - return FAILURE; - } -} - SAPI_API int sapi_get_target_uid(uid_t *obj) { diff --git a/main/SAPI.h b/main/SAPI.h index f72532557776..4f573b47d04d 100644 --- a/main/SAPI.h +++ b/main/SAPI.h @@ -224,8 +224,6 @@ SAPI_API void sapi_get_default_content_type_header(sapi_header_struct *default_h SAPI_API size_t sapi_apply_default_charset(char **mimetype, size_t len); SAPI_API void sapi_activate_headers_only(void); -SAPI_API int sapi_get_fd(int *fd); - SAPI_API int sapi_get_target_uid(uid_t *); SAPI_API int sapi_get_target_gid(gid_t *); SAPI_API double sapi_get_request_time(void); @@ -270,8 +268,6 @@ struct _sapi_module_struct { int php_ini_ignore; int php_ini_ignore_cwd; /* don't look for php.ini in the current directory */ - int (*get_fd)(int *fd); - int (*get_target_uid)(uid_t *); int (*get_target_gid)(gid_t *); @@ -326,7 +322,6 @@ END_EXTERN_C() NULL, /* executable_location */ \ 0, /* php_ini_ignore */ \ 0, /* php_ini_ignore_cwd */ \ - NULL, /* get_fd */ \ NULL, /* get_target_uid */ \ NULL, /* get_target_gid */ \ NULL, /* input_filter */ \ From c780db326fb4cd9d7ecf96ddfe49c46b4d747e10 Mon Sep 17 00:00:00 2001 From: Calvin Buckley Date: Mon, 31 Aug 2026 19:16:44 -0300 Subject: [PATCH 3/3] sapi: Remove sapi_get_target_[ug]id These were introduced in 294e776d950f7393faad5a96988c5122edf23e66. These are not used anywhere. --- UPGRADING.INTERNALS | 3 +++ main/SAPI.c | 19 ------------------- main/SAPI.h | 7 ------- 3 files changed, 3 insertions(+), 26 deletions(-) diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS index b73b183acca1..e1a4f915f41c 100644 --- a/UPGRADING.INTERNALS +++ b/UPGRADING.INTERNALS @@ -17,6 +17,7 @@ PHP 8.7 INTERNALS UPGRADE NOTES - Removed: . The sapi_force_http_10() function was removed. . The sapi_get_fd() function was removed. + . The sapi_get_target_uid() and sapi_get_target_gid() functions were removed. ======================== 2. Build system changes @@ -37,3 +38,5 @@ PHP 8.7 INTERNALS UPGRADE NOTES - The force_http_10 method has been removed. - The get_fd method has been removed. + +- The get_target_uid and get_target_gid methods have been removed. diff --git a/main/SAPI.c b/main/SAPI.c index 1a25397f6d55..ecb89df13507 100644 --- a/main/SAPI.c +++ b/main/SAPI.c @@ -1036,25 +1036,6 @@ SAPI_API char *sapi_getenv(const char *name, size_t name_len) return value; } - -SAPI_API int sapi_get_target_uid(uid_t *obj) -{ - if (sapi_module.get_target_uid) { - return sapi_module.get_target_uid(obj); - } else { - return FAILURE; - } -} - -SAPI_API int sapi_get_target_gid(gid_t *obj) -{ - if (sapi_module.get_target_gid) { - return sapi_module.get_target_gid(obj); - } else { - return FAILURE; - } -} - SAPI_API double sapi_get_request_time(void) { if(SG(global_request_time)) return SG(global_request_time); diff --git a/main/SAPI.h b/main/SAPI.h index 4f573b47d04d..734cf31bcf0c 100644 --- a/main/SAPI.h +++ b/main/SAPI.h @@ -224,8 +224,6 @@ SAPI_API void sapi_get_default_content_type_header(sapi_header_struct *default_h SAPI_API size_t sapi_apply_default_charset(char **mimetype, size_t len); SAPI_API void sapi_activate_headers_only(void); -SAPI_API int sapi_get_target_uid(uid_t *); -SAPI_API int sapi_get_target_gid(gid_t *); SAPI_API double sapi_get_request_time(void); SAPI_API void sapi_terminate_process(void); END_EXTERN_C() @@ -268,9 +266,6 @@ struct _sapi_module_struct { int php_ini_ignore; int php_ini_ignore_cwd; /* don't look for php.ini in the current directory */ - int (*get_target_uid)(uid_t *); - int (*get_target_gid)(gid_t *); - unsigned int (*input_filter)(int arg, const char *var, char **val, size_t val_len, size_t *new_val_len); void (*ini_defaults)(HashTable *configuration_hash); @@ -322,8 +317,6 @@ END_EXTERN_C() NULL, /* executable_location */ \ 0, /* php_ini_ignore */ \ 0, /* php_ini_ignore_cwd */ \ - NULL, /* get_target_uid */ \ - NULL, /* get_target_gid */ \ NULL, /* input_filter */ \ NULL, /* ini_defaults */ \ 0, /* phpinfo_as_text; */ \