PHP: forced initialization of $_SERVER in fastcgi_finish_request().

The "auto_globals_jit" PHP option postponed the initialization of the $_SERVER
global variable until the script using it had been loaded (e. g. via the
"include" expression).  As a result, nxt_php_register_variables() could be
called after fastcgi_finish_request() had finished the request and nulled
ctx->req, which thus caused a segmentation fault.
This commit is contained in:
Valentin Bartenev
2021-05-07 07:46:25 +03:00
parent 6703b68ed0
commit b0e32bc015
2 changed files with 33 additions and 1 deletions

View File

@@ -44,6 +44,13 @@ points on a per-request basis during static file serving.
</para>
</change>
<change type="bugfix">
<para>
a segmentation fault might have occurred in the PHP module if
fastcgi_finish_request() was used with the "auto_globals_jit" option enabled.
</para>
</change>
</changes>