rryqszq4 / ngx-php

ngx-php - Embedded php7 or php8 scripting language for nginx module. Mainline development version of the ngx-php.
BSD 2-Clause "Simplified" License
626 stars 56 forks source link

error in ngx_http_php_zend_uthread_log_inline_routine #128

Open xigaoli opened 3 years ago

xigaoli commented 3 years ago

When I use the log_by_php directive, the ngx_http_php_zend_uthread_log_inline_routine is called 3 time for each web request, and one of them triggers segfault. The PHP code are executed once though.

The block-version function (log_by_php_block) is not working but not quite sure about the reason. My guess is that at line 200 of /src/ngx_http_php_directive.c, there's a plcf->log_code = code; it could be plcf->log_inline_code = code.

My PHP version is 7.2, nginx version is 1.12.2. Let me know if there's a solution to this. Thanks in advance!