From ace38c559c7258bc7ead6e98d030b2b81cc5e19a Mon Sep 17 00:00:00 2001 From: jisangs Date: Thu, 22 Oct 2026 14:56:43 +0900 Subject: [PATCH] =?UTF-8?q?PHP=20=EC=B7=A8=EC=95=BD=EC=A0=90=20=ED=8C=A8?= =?UTF-8?q?=EC=B9=98=EB=A5=BC=20=EC=9C=84=ED=95=B4=20PHP=20=EB=B2=84?= =?UTF-8?q?=EC=A0=84=20=EC=97=85=EA=B7=B8=EB=A0=88=EC=9D=B4=EB=93=9C=20(7.?= =?UTF-8?q?3=20->=208.3)=20=EC=8A=A4=ED=85=8C=EC=9D=B4=EC=A7=95=20?= =?UTF-8?q?=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deploy/stage-git/Dockerfile | 9 +++++---- src/web/server/setup/connect_db.php | 3 +++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/deploy/stage-git/Dockerfile b/deploy/stage-git/Dockerfile index ad7295e..03f9fa8 100644 --- a/deploy/stage-git/Dockerfile +++ b/deploy/stage-git/Dockerfile @@ -1,8 +1,9 @@ -FROM php:7.3-apache +FROM php:8.3-apache -RUN apt-get update && apt-get install -y libonig-dev \ - && docker-php-ext-install mysqli mbstring \ - && rm -rf /var/lib/apt/lists/* +# mbstring, curl 은 공식 이미지에 기본 포함. 빠져 있으면 빌드 단계에서 실패시킨다. +RUN docker-php-ext-install mysqli \ + && php -m | grep -qix mbstring \ + && php -m | grep -qix curl RUN a2enmod rewrite diff --git a/src/web/server/setup/connect_db.php b/src/web/server/setup/connect_db.php index 27aaf50..f3f0a4f 100644 --- a/src/web/server/setup/connect_db.php +++ b/src/web/server/setup/connect_db.php @@ -13,6 +13,9 @@ if($hasServiceDBSetting == true) { if (!isset($db_port)) $db_port = 3306; +// PHP 8.1+ 는 mysqli 오류 시 예외를 던진다. 기존처럼 반환값/connect_error 로 처리하기 위해 끈다. +mysqli_report(MYSQLI_REPORT_OFF); + // connect db with persistent connection (connection pool) $db_conn = new mysqli("p:".$db_host, $db_user, $db_passwd, $db_name, $db_port);