summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nxt_php_sapi.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/nxt_php_sapi.c b/src/nxt_php_sapi.c
index 23c148c8..3fb3b0db 100644
--- a/src/nxt_php_sapi.c
+++ b/src/nxt_php_sapi.c
@@ -1101,10 +1101,20 @@ nxt_php_execute(nxt_php_run_ctx_t *ctx, nxt_unit_request_t *r)
nxt_memzero(&file_handle, sizeof(file_handle));
file_handle.type = ZEND_HANDLE_FILENAME;
+#if (PHP_VERSION_ID >= 80100)
+ file_handle.filename = zend_string_init((char *) ctx->script_filename.start,
+ ctx->script_filename.length, 0);
+ file_handle.primary_script = 1;
+#else
file_handle.filename = (char *) ctx->script_filename.start;
+#endif
php_execute_script(&file_handle TSRMLS_CC);
+#if (PHP_VERSION_ID >= 80100)
+ zend_destroy_file_handle(&file_handle);
+#endif
+
/* Prevention of consuming possible unread request body. */
#if (PHP_VERSION_ID < 50600)
read_post = sapi_module.read_post;