diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ee00aa03..6b4fddff 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,8 +23,8 @@ env: jobs: build_php_22-04: name: Compile PHP Ubuntu 22.04 - if: ${{ contains(github.event.head_commit.message, '= 8 && PHP_MINOR_VERSION > 2) +#if (PHP_MAJOR_VERSION >= 8 && PHP_MINOR_VERSION > 2) "ngx-php", #else "cli-server", /* name */ @@ -424,8 +424,12 @@ int php_ngx_module_init() setmode(_fileno(stderr), O_BINARY); /* make the stdio mode be binary */ #endif +#if (PHP_MAJOR_VERSION >= 8 && PHP_MINOR_VERSION > 2) + php_ngx_module.ini_entries = HARDCODED_INI; +#else php_ngx_module.ini_entries = malloc(sizeof(HARDCODED_INI)); memcpy(php_ngx_module.ini_entries, HARDCODED_INI, sizeof(HARDCODED_INI)); +#endif php_ngx_module.additional_functions = additional_functions; @@ -466,8 +470,12 @@ void php_ngx_module_shutdown() #ifdef ZTS tsrm_shutdown(); #endif + +#if (PHP_MAJOR_VERSION <= 8 && PHP_MINOR_VERSION <= 2) if (php_ngx_module.ini_entries){ free(php_ngx_module.ini_entries); php_ngx_module.ini_entries = NULL; } +#endif + }