From 70ff1d6da74ae9bc1f1ee8b8de1caecf47823e30 Mon Sep 17 00:00:00 2001 From: Adam Ducho Date: Fri, 10 Sep 2021 09:32:43 +0200 Subject: [PATCH 1/2] php fix oci8 versions --- php-fpm/Dockerfile | 6 ++++-- workspace/Dockerfile | 12 +++++++----- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/php-fpm/Dockerfile b/php-fpm/Dockerfile index d6638a9e..19c45270 100644 --- a/php-fpm/Dockerfile +++ b/php-fpm/Dockerfile @@ -602,9 +602,11 @@ RUN if [ ${INSTALL_OCI8} = true ]; then \ freetds-dev && \ # Install PHP extensions if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \ - echo 'instantclient,/opt/oracle/instantclient_12_1/' | pecl install oci8-2.0.10; \ - else \ + echo 'instantclient,/opt/oracle/instantclient_12_1/' | pecl install oci8-2.0.12; \ + elif [ $(php -r "echo PHP_MAJOR_VERSION;") = "7" ]; then \ echo 'instantclient,/opt/oracle/instantclient_12_1/' | pecl install oci8-2.2.0; \ + else \ + echo 'instantclient,/opt/oracle/instantclient_12_1/' | pecl install oci8; \ fi \ && docker-php-ext-configure pdo_oci --with-pdo-oci=instantclient,/opt/oracle/instantclient_12_1,12.1 \ && docker-php-ext-configure pdo_dblib --with-libdir=/lib/x86_64-linux-gnu \ diff --git a/workspace/Dockerfile b/workspace/Dockerfile index d017a9d6..97be9629 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -903,11 +903,13 @@ RUN if [ ${INSTALL_OCI8} = true ]; then \ && apt-get install --no-install-recommends -y \ libaio-dev && \ # Install PHP extensions - if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \ - echo 'instantclient,/opt/oracle/instantclient_12_1/' | pecl install oci8-2.0.10; \ - else \ - echo 'instantclient,/opt/oracle/instantclient_12_1/' | pecl install oci8-2.2.0; \ - fi \ + if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \ + echo 'instantclient,/opt/oracle/instantclient_12_1/' | pecl install oci8-2.0.12; \ + elif [ $(php -r "echo PHP_MAJOR_VERSION;") = "7" ]; then \ + echo 'instantclient,/opt/oracle/instantclient_12_1/' | pecl install oci8-2.2.0; \ + else \ + echo 'instantclient,/opt/oracle/instantclient_12_1/' | pecl install oci8; \ + fi \ && echo "extension=oci8.so" >> /etc/php/${LARADOCK_PHP_VERSION}/cli/php.ini \ && php -m | grep -q 'oci8' \ ;fi From 5b04b8a6d192d5a0c97348ed0741053de1b96ce9 Mon Sep 17 00:00:00 2001 From: Adam Ducho Date: Fri, 10 Sep 2021 09:36:58 +0200 Subject: [PATCH 2/2] php fix oci8 versions --- workspace/Dockerfile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/workspace/Dockerfile b/workspace/Dockerfile index 97be9629..80e6978a 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -903,13 +903,13 @@ RUN if [ ${INSTALL_OCI8} = true ]; then \ && apt-get install --no-install-recommends -y \ libaio-dev && \ # Install PHP extensions - if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \ - echo 'instantclient,/opt/oracle/instantclient_12_1/' | pecl install oci8-2.0.12; \ - elif [ $(php -r "echo PHP_MAJOR_VERSION;") = "7" ]; then \ - echo 'instantclient,/opt/oracle/instantclient_12_1/' | pecl install oci8-2.2.0; \ - else \ - echo 'instantclient,/opt/oracle/instantclient_12_1/' | pecl install oci8; \ - fi \ + if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \ + echo 'instantclient,/opt/oracle/instantclient_12_1/' | pecl install oci8-2.0.12; \ + elif [ $(php -r "echo PHP_MAJOR_VERSION;") = "7" ]; then \ + echo 'instantclient,/opt/oracle/instantclient_12_1/' | pecl install oci8-2.2.0; \ + else \ + echo 'instantclient,/opt/oracle/instantclient_12_1/' | pecl install oci8; \ + fi \ && echo "extension=oci8.so" >> /etc/php/${LARADOCK_PHP_VERSION}/cli/php.ini \ && php -m | grep -q 'oci8' \ ;fi