diff --git a/auto/modules/php b/auto/modules/php index e92a67cd..7d224ec1 100644 --- a/auto/modules/php +++ b/auto/modules/php @@ -149,7 +149,11 @@ nxt_feature_test=" #include int main() { + #if (PHP_VERSION_ID < 80200) php_module_startup(NULL, NULL, 0); + #else + php_module_startup(NULL, NULL); + #endif return 0; }" diff --git a/docs/changes.xml b/docs/changes.xml index 5da00d88..96877044 100644 --- a/docs/changes.xml +++ b/docs/changes.xml @@ -31,6 +31,12 @@ NGINX Unit updated to 1.29.0. date="" time="" packager="Nginx Packaging <nginx-packaging@f5.com>"> + + +compatibility with PHP 8.2. + + + support rack v3 in ruby applications. diff --git a/src/nxt_php_sapi.c b/src/nxt_php_sapi.c index 42fdbc68..b7eb29d1 100644 --- a/src/nxt_php_sapi.c +++ b/src/nxt_php_sapi.c @@ -1150,7 +1150,11 @@ nxt_php_vcwd_chdir(nxt_unit_request_info_t *req, u_char *dir) static int nxt_php_startup(sapi_module_struct *sapi_module) { +#if (PHP_VERSION_ID < 80200) return php_module_startup(sapi_module, &nxt_php_unit_module, 1); +#else + return php_module_startup(sapi_module, &nxt_php_unit_module); +#endif }