diff --git a/frameworks/PHP/php-ngx/app-async.php b/frameworks/PHP/php-ngx/app-async.php index 427b27241bd..80b78b39eb7 100644 --- a/frameworks/PHP/php-ngx/app-async.php +++ b/frameworks/PHP/php-ngx/app-async.php @@ -37,7 +37,7 @@ function query() $my = new php\ngx\mysql(); yield from $my->connect(DB_HOST, DB_PORT, DB_USER, DB_PASS, DB_NAME); $query_count = 1; - $params = ngx::query_args()['q']; + $params = (int) ngx::query_args()['q']; if ($params > 1) { $query_count = min($params, 500); } @@ -68,7 +68,7 @@ function update() $my = new php\ngx\mysql(); yield from $my->connect(DB_HOST, DB_PORT, DB_USER, DB_PASS, DB_NAME); $query_count = 1; - $params = ngx::query_args()['q']; + $params = (int) ngx::query_args()['q']; if ($params > 1) { $query_count = min($params, 500); } diff --git a/frameworks/PHP/php-ngx/app.php b/frameworks/PHP/php-ngx/app.php index 53998cf3d94..809fc19279a 100644 --- a/frameworks/PHP/php-ngx/app.php +++ b/frameworks/PHP/php-ngx/app.php @@ -24,7 +24,7 @@ function query() ngx_header_set('Content-Type', 'application/json'); $query_count = 1; - $params = ngx::query_args()['q']; + $params = (int) ngx::query_args()['q']; if ($params > 1) { $query_count = min($params, 500); } @@ -42,7 +42,7 @@ function update() ngx_header_set('Content-Type', 'application/json'); $query_count = 1; - $params = ngx::query_args()['q']; + $params = (int) ngx::query_args()['q']; if ($params > 1) { $query_count = min($params, 500); } diff --git a/frameworks/PHP/php-ngx/php-ngx-async.dockerfile b/frameworks/PHP/php-ngx/php-ngx-async.dockerfile index 0f8bd9ee9e6..37cb2f442cd 100644 --- a/frameworks/PHP/php-ngx/php-ngx-async.dockerfile +++ b/frameworks/PHP/php-ngx/php-ngx-async.dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:20.04 +FROM ubuntu:20.10 ARG DEBIAN_FRONTEND=noninteractive @@ -6,20 +6,20 @@ RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /de RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null RUN apt-get update -yqq > /dev/null && \ apt-get install -yqq wget git unzip libxml2-dev cmake make systemtap-sdt-dev \ - zlibc zlib1g zlib1g-dev libpcre3 libpcre3-dev libargon2-0-dev libsodium-dev \ - php7.4 php7.4-common php7.4-dev libphp7.4-embed php7.4-mysql nginx > /dev/null + zlib1g-dev libpcre3-dev libargon2-0-dev libsodium-dev \ + php8.0-cli php8.0-dev libphp8.0-embed php8.0-mysql nginx > /dev/null ADD ./ ./ -ENV NGINX_VERSION=1.19.2 +ENV NGINX_VERSION=1.19.6 -RUN git clone -b v0.0.24 --single-branch --depth 1 https://github.com/rryqszq4/ngx_php7.git > /dev/null +RUN git clone -b v0.0.25 --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 && \ - ./configure --user=www --group=www \ + 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 \ diff --git a/frameworks/PHP/php-ngx/php-ngx-mysql.dockerfile b/frameworks/PHP/php-ngx/php-ngx-mysql.dockerfile index 66f73fa9551..29348083cf8 100644 --- a/frameworks/PHP/php-ngx/php-ngx-mysql.dockerfile +++ b/frameworks/PHP/php-ngx/php-ngx-mysql.dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:20.04 +FROM ubuntu:20.10 ARG DEBIAN_FRONTEND=noninteractive @@ -6,20 +6,20 @@ RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /de RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null RUN apt-get update -yqq > /dev/null && \ apt-get install -yqq wget git unzip libxml2-dev cmake make systemtap-sdt-dev \ - zlibc zlib1g zlib1g-dev libpcre3 libpcre3-dev libargon2-0-dev libsodium-dev \ - php7.4 php7.4-common php7.4-dev libphp7.4-embed php7.4-mysql nginx > /dev/null + zlib1g-dev libpcre3-dev libargon2-0-dev libsodium-dev \ + php8.0-cli php8.0-dev libphp8.0-embed php8.0-mysql nginx > /dev/null ADD ./ ./ -ENV NGINX_VERSION=1.19.2 +ENV NGINX_VERSION=1.19.6 -RUN git clone -b v0.0.24 --single-branch --depth 1 https://github.com/rryqszq4/ngx_php7.git > /dev/null +RUN git clone -b v0.0.25 --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 && \ - ./configure --user=www --group=www \ + 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 \ diff --git a/frameworks/PHP/php-ngx/php-ngx-pgsql.dockerfile b/frameworks/PHP/php-ngx/php-ngx-pgsql.dockerfile index 2fc781475be..2e2080bdf4e 100644 --- a/frameworks/PHP/php-ngx/php-ngx-pgsql.dockerfile +++ b/frameworks/PHP/php-ngx/php-ngx-pgsql.dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:20.04 +FROM ubuntu:20.10 ARG DEBIAN_FRONTEND=noninteractive @@ -6,20 +6,20 @@ RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /de RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null RUN apt-get update -yqq > /dev/null && \ apt-get install -yqq wget git unzip libxml2-dev cmake make systemtap-sdt-dev \ - zlibc zlib1g zlib1g-dev libpcre3 libpcre3-dev libargon2-0-dev libsodium-dev \ - php7.4 php7.4-common php7.4-dev libphp7.4-embed php7.4-pgsql nginx > /dev/null + zlib1g-dev libpcre3-dev libargon2-0-dev libsodium-dev \ + php8.0-cli php8.0-dev libphp8.0-embed php8.0-pgsql nginx > /dev/null ADD ./ ./ -ENV NGINX_VERSION=1.19.2 +ENV NGINX_VERSION=1.19.6 -RUN git clone -b v0.0.24 --single-branch --depth 1 https://github.com/rryqszq4/ngx_php7.git > /dev/null +RUN git clone -b v0.0.25 --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 && \ - ./configure --user=www --group=www \ + 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 \ diff --git a/frameworks/PHP/php-ngx/php-ngx.dockerfile b/frameworks/PHP/php-ngx/php-ngx.dockerfile index 4714e2a2715..8e40d7f2c5a 100644 --- a/frameworks/PHP/php-ngx/php-ngx.dockerfile +++ b/frameworks/PHP/php-ngx/php-ngx.dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:20.04 +FROM ubuntu:20.10 ARG DEBIAN_FRONTEND=noninteractive @@ -6,20 +6,19 @@ RUN apt-get update -yqq && apt-get install -yqq software-properties-common > /de RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php > /dev/null RUN apt-get update -yqq > /dev/null && \ apt-get install -yqq wget git unzip libxml2-dev cmake make systemtap-sdt-dev \ - zlibc zlib1g zlib1g-dev libpcre3 libpcre3-dev libargon2-0-dev libsodium-dev \ - php7.4 php7.4-common php7.4-dev libphp7.4-embed php7.4-mysql nginx > /dev/null - + zlib1g-dev libpcre3-dev libargon2-0-dev libsodium-dev \ + php8.0-cli php8.0-dev libphp8.0-embed php8.0-mysql nginx > /dev/null ADD ./ ./ -ENV NGINX_VERSION=1.19.2 +ENV NGINX_VERSION=1.19.6 -RUN git clone -b v0.0.24 --single-branch --depth 1 https://github.com/rryqszq4/ngx_php7.git > /dev/null +RUN git clone -b v0.0.25 --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 && \ - ./configure --user=www --group=www \ + bash ./configure --user=www --group=www \ --prefix=/nginx \ --with-ld-opt="-Wl,-rpath,$PHP_LIB" \ --add-module=/ngx_php7/third_party/ngx_devel_kit \