Open jeijei4 opened 2 years ago
@jeijei4 Thanks report ! Need more time to research~
The same problem using Ubuntu 21.04 or 21.10.
But it's working without problems with Ubuntu 20.04.
FROM ubuntu:20.04
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /dev/null
RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null
RUN apt-get update -yqq > /dev/null && apt-get upgrade -yqq > /dev/null && \
apt-get install -yqq wget git unzip libxml2-dev cmake make systemtap-sdt-dev \
zlib1g-dev libpcre3-dev libargon2-0-dev libsodium-dev \
php8.1-cli php8.1-dev libphp8.1-embed php8.1-mysql nginx > /dev/null
ADD ./ ./
ENV NGINX_VERSION 1.21.6
RUN git clone -b v0.0.26 --single-branch --depth 1 https://github.com/rryqszq4/ngx_php7.git > /dev/null
RUN wget -q http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz && \
tar -zxf nginx-${NGINX_VERSION}.tar.gz && \
cd nginx-${NGINX_VERSION} && \
export PHP_LIB=/usr/lib && \
bash ./configure --user=www --group=www \
--prefix=/nginx \
--with-ld-opt="-Wl,-rpath,$PHP_LIB" \
--add-module=/ngx_php7/third_party/ngx_devel_kit \
--add-module=/ngx_php7 > /dev/null && \
make > /dev/null && make install > /dev/null
EXPOSE 8080
CMD /nginx/sbin/nginx -c /deploy/nginx_default.conf
If we change to 21.04 or 21.10
php-ngx: In file included from /usr/include/php/20210902/Zend/zend_dtrace_gen.h:10,
php-ngx: from /usr/include/php/20210902/Zend/zend_dtrace.h:38,
php-ngx: from /ngx_php7/src/ngx_http_php8_zend_uthread.c:36:
php-ngx: /ngx_php7/src/ngx_http_php8_zend_uthread.c: In function 'ngx_http_php_zend_throw_exception_internal':
php-ngx: /usr/include/php/20210902/Zend/zend_dtrace_gen.h:32:1: error: memory input 0 is not directly addressable
php-ngx: 32 | DTRACE_PROBE1 (php, exception__thrown, arg1)
php-ngx: | ^~~~~~~~~~~~~
php-ngx: /ngx_php7/src/ngx_http_php8_zend_uthread.c:436:13: note: in expansion of macro 'DTRACE_EXCEPTION_THROWN'
php-ngx: 436 | DTRACE_EXCEPTION_THROWN(ZSTR_VAL(exception->ce->name));
php-ngx: | ^~~~~~~~~~~~~~~~~~~~~~~
php-ngx: /usr/include/php/20210902/Zend/zend_dtrace_gen.h:32:1: error: memory input 0 is not directly addressable
php-ngx: 32 | DTRACE_PROBE1 (php, exception__thrown, arg1)
php-ngx: | ^~~~~~~~~~~~~
php-ngx: /ngx_php7/src/ngx_http_php8_zend_uthread.c:438:13: note: in expansion of macro 'DTRACE_EXCEPTION_THROWN'
php-ngx: 438 | DTRACE_EXCEPTION_THROWN(NULL);
php-ngx: | ^~~~~~~~~~~~~~~~~~~~~~~
php-ngx: make[1]: *** [objs/Makefile:1328: objs/addon/src/ngx_http_php8_zend_uthread.o] Error 1
php-ngx: make: *** [Makefile:10: build] Error 2
php-ngx: Removing intermediate container b510eb640248
php-ngx: Docker build failed; terminating
The research will be easier :)
got same problem on debian 11
@rryqszq4 are you OK ?
Now fail with, ubuntu 20.04 and php 8.2.
Now it's working with PHP 8.2.
I added the tests with Ubuntu 22.04, so we will try to fix it. The error in the tests is the same https://github.com/rryqszq4/ngx-php/actions/runs/4677281560/jobs/8284601262
~I think that I found the problem. And it's very simple.~
~All PHP versions in Ubuntu 22.04 don't use --enable-dtrace
.
So we need to validate it first, or remove the dtrace code.~
I can't find the problem for now.
We found the bug, we are deciding the best way to implement the fix.
I'm having the same issue with PHP 8.2.7, Nginx 1.25.1 and Linux Mint 21 (Ubuntu 22.04)
Please could you try with the development branch. Theoretically is working, but will be better to have feedback from the users. But still not send the changes to the master branch.
It's working, but we need to create a new version, to download easily. The next branch, it is working with new OS versions.
Ping @rryqszq4
Also working with PHP 8.3. Only waiting for new ngx-php version release.
Ubuntu 22.04, Nginx 1.25.3 and PHP 8.3. Nginx 1.25.x support http3.
https://github.com/TechEmpower/FrameworkBenchmarks/pull/8614
https://github.com/rryqszq4/ngx-php/blob/73ef8b155d3182fa1a9514761afe1f10cd0bd48f/src/ngx_http_php8_zend_uthread.c#L44
OS: Fedora 35 php: 8.1 remi (php81) nginx: 1.21.5
Error:
Code: