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
640 stars 55 forks source link

error: initialization makes integer from pointer without a cast #2

Open lykhouzov opened 7 years ago

lykhouzov commented 7 years ago

when compiling the module there is an error:

/opt/ngx_php7-0.0.3/src/php/php_ngx.c:254:5: error: initialization makes integer from pointer without a cast [-Werror=int-conversion]
     NULL,
     ^~~~
/opt/ngx_php7-0.0.3/src/php/php_ngx.c:254:5: note: (near initialization for 'php_ngx_module.php_ini_ignore')
/opt/ngx_php7-0.0.3/src/php/php_ngx.c:255:5: error: initialization makes integer from pointer without a cast [-Werror=int-conversion]
     NULL,
     ^~~~
/opt/ngx_php7-0.0.3/src/php/php_ngx.c:255:5: note: (near initialization for 'php_ngx_module.php_ini_ignore_cwd')
/opt/ngx_php7-0.0.3/src/php/php_ngx.c:267:5: error: initialization makes integer from pointer without a cast [-Werror=int-conversion]
     NULL,
     ^~~~
/opt/ngx_php7-0.0.3/src/php/php_ngx.c:267:5: note: (near initialization for 'php_ngx_module.phpinfo_as_text')
/opt/ngx_php7-0.0.3/src/php/php_ngx.c:273:5: error: excess elements in struct initializer [-Werror]
     NULL,
     ^~~~
/opt/ngx_php7-0.0.3/src/php/php_ngx.c:273:5: note: (near initialization for 'php_ngx_module')
/opt/ngx_php7-0.0.3/src/php/php_ngx.c:274:5: error: excess elements in struct initializer [-Werror]
     NULL
     ^~~~
/opt/ngx_php7-0.0.3/src/php/php_ngx.c:274:5: note: (near initialization for 'php_ngx_module')
cc1: all warnings being treated as errors
make[1]: *** [objs/Makefile:1208: objs/addon/php/php_ngx.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/opt/nginx-1.9.15'
make: *** [Makefile:8: build] Error 2
rryqszq4 commented 7 years ago

@lykhouzov Well, Can you show me the php version and your operating system.

rryqszq4 commented 7 years ago

@lykhouzov Has always been support php 7.1 See https://github.com/rryqszq4/ngx_php7/commit/2bb613a87884c7f14a3b4b0d66372e38cdcbee07 or master.