Merge pull request #3053 from duchymor/master

fix php8 oci8
This commit is contained in:
Shao Yu-Lung (Allen) 2021-09-22 14:42:49 +08:00 committed by GitHub
commit ebd5a22568
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 4 deletions

View File

@ -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 \

View File

@ -904,9 +904,11 @@ RUN if [ ${INSTALL_OCI8} = true ]; then \
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.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' \