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
582 stars 56 forks source link

Fail to compile with php8.1 #133

Closed joanhey closed 2 years ago

joanhey commented 2 years ago

As the ppa:ondrej/php include now php8.1-rc5, I'm testing the frameworks for the benchmark.

And it's failing with php-ngx:

php-ngx: Step 9/11 : 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                                                                           
php-ngx:  ---> Running in 1bd6b3cff392
php-ngx: /ngx_php7/src/ngx_http_php_module.c: In function 'ngx_http_php_init_worker':
php-ngx: /ngx_php7/src/ngx_http_php_module.c:765:23: error: assignment to 'void (*)(int,  const char *, const uint32_t,  zend_string *)' {aka 'void (*)(int,  const char *, const unsigned int,  struct _zend_string *)'} from incompatible pointer type 'void (*)(int,  zend_string *, const uint32_t,  zend_string *)' {aka 'void (*)(int,  struct _zend_string *, const unsigned int,  struct _zend_string *)'} [-Werror=incompatible-pointer-types]                                                                                                                     
php-ngx:   765 |     old_zend_error_cb = zend_error_cb;                                                                                    
php-ngx:       |                       ^
php-ngx: /ngx_php7/src/ngx_http_php_module.c:766:19: error: assignment to 'void (*)(int,  zend_string *, const uint32_t,  zend_string *)' {aka 'void (*)(int,  struct _zend_string *, const unsigned int,  struct _zend_string *)'} from incompatible pointer type 'void (*)(int,  const char *, const uint32_t,  zend_string *)' {aka 'void (*)(int,  const char *, const unsigned int,  struct _zend_string *)'} [-Werror=incompatible-pointer-types]
php-ngx:   766 |     zend_error_cb = ngx_php_error_cb;
php-ngx:       |                   ^
php-ngx: cc1: all warnings being treated as errors
php-ngx: make[1]: *** [objs/Makefile:1286: objs/addon/src/ngx_http_php_module.o] Error 1                                                   
php-ngx: make: *** [Makefile:10: build] Error 2                                                                                            
php-ngx: Removing intermediate container 1bd6b3cff392                                                                                      
php-ngx: Docker build failed; terminating

The final version php-8.1 is for 25 from this month.

rryqszq4 commented 2 years ago

OK.

mathieu-aubin commented 2 years ago

doesnt the project say php7 in the name? i'm confused

joanhey commented 2 years ago

Work from php 7.0 till 8.0 actually. And It will work with php 8.1 too.

rryqszq4 commented 2 years ago

@joanhey Try to support php version 8.1.0 . https://github.com/rryqszq4/ngx_php7/releases/tag/v0.0.26

rryqszq4 commented 2 years ago

@mathieu-aubin @joanhey Maybe need to create a new repository ngx_php8 ?

joanhey commented 2 years ago

I think that it's better to create a php-ngx or ngx-php repo. And use branchs and the php-ngx version for different php versions.

rryqszq4 commented 2 years ago

I think that it's better to create a php-ngx or ngx-php repo. And use branchs and the php-ngx version for different php versions.

ngx-php is nice.

joanhey commented 2 years ago

And it's time to create a github organization for ngx-php !!