Unable to load dynamic library 'oci8.so' (PHP 7.2)

unable to load dynamic library pdo_dblib
unable to load dynamic library error
php warning: php startup: unable to load dynamic library windows
php warning: php startup: unable to load dynamic library mysqli
php startup: unable to load dynamic library mac
php 7.2 unable to load dynamic library
laravel unable to load dynamic library
unable to load dynamic library phar so

Since the update of PHP 7.1 to PHP 7.2 I can't install oci8. I have this error:

root@3ab6027c8d95:/var/www# php -v

PHP Warning: PHP Startup: Unable to load dynamic library 'oci8.so' (tried: /usr/local/lib/php/extensions/no-debug-non-zts-20170718/oci8.so (libmql1.so: cannot open shared object file: No such file or directory), /usr/local/lib/php/extensions/no-debug-non-zts-20170718/oci8.so.so (/usr/local/lib/php/extensions/no-debug-non-zts-20170718/oci8.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

PHP 7.2.0 (cli) (built: Dec 12 2017 05:52:58) ( NTS ) Copyright (c) 1997-2017 The PHP Group Zend Engine v3.2.0, Copyright (c) 1998-2017 Zend Technologies with Zend OPcache v7.2.0, Copyright (c) 1999-2017, by Zend Technologies

I'm using Docker environment, I created a github repo for this, it works if I use the version 7.1 of PHP (shenron/docker-php-fpm:7.2).

I don't understand why the script try to launch this file: /usr/local/lib/php/extensions/no-debug-non-zts-20170718/oci8.so.so.

To my point of view there are two possibilities; or the driver is not compatible, or pecl can't today install oci8.

Has anyone the same problem ?

Thank you for your help.

/usr/local/lib/php/extensions/no-debug-non-zts-20170718/oci8.so.so is only the second guess on the shared library file name. You can safely ignore that.

The actual problem is: (tried: /usr/local/lib/php/extensions/no-debug-non-zts-20170718/oci8.so (libmql1.so: cannot open shared object file: No such file or directory)

oci8.so itself depends on multiple shared libraries, you can use ldd to find out which ones:

ldd /usr/local/lib/php/extensions/no-debug-non-zts-20170718/oci8.so
    linux-vdso.so.1 (0x00007ffc8bfe7000)
    libclntsh.so.12.1 => /usr/local/instantclient/libclntsh.so.12.1 (0x00007fb9919e0000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fb991641000)
    libmql1.so => not found
    libipc1.so => not found
    libnnz12.so => not found
    libons.so => not found
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fb99143d000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fb991139000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fb990f1c000)
    libnsl.so.1 => /lib/x86_64-linux-gnu/libnsl.so.1 (0x00007fb990d04000)
    librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fb990afc000)
    /lib64/ld-linux-x86-64.so.2 (0x00007fb994bc8000)
    libaio.so.1 => /lib/x86_64-linux-gnu/libaio.so.1 (0x00007fb9908fa000)
    libclntshcore.so.12.1 => not found

Those .so files seem to be part of a zip file in your repository. Running PHP like this LD_LIBRARY_PATH=/usr/local/instantclient_12_1/ php works fine inside your container. You need to move those so files to a sane location.

How to fix PHP Warning: PHP Startup: Unable to load dynamic , PHP Warning: PHP Startup: Unable to load dynamic library 'C:/php\php_gd2.dll' - Det g\xe5r inte att hitta den angivna modulen.\r\n in Unknown on line 0. PHP Warning: PHP Startup: Unable to load dynamic library 'ext/phpchartdir550.dll' - ext/phpchartdir550.dll: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library 'ext/pdo.so' - ext/pdo.so: cannot open shared object file: No such file or directory in Unknown on

For anyone stumbling upon this question, here is the proper way to handle it in linux. (I am using CentOS commands for the demo below but Ubnutu shouldn't be any different)

step 1: get oracle libs

EDIT: Thanks to Christopher Jones for the comment, you can find the direct rpm links at https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/

wget oracle-instantclient18.3-basic-18.3.0.0.0-1.x86_64.rpm 
wget oracle-instantclient18.3-devel-18.3.0.0.0-1.x86_64.rpm 
step 2: install
yum install oracle-instantclient18.3-basic-18.3.0.0.0-1.x86_64.rpm
yum install  oracle-instantclient18.3-devel-18.3.0.0.0-1.x86_64.rpm 
step 3: configure (make the path of the oracle libs to be discoverable)
sudo sh -c "echo /usr/lib/oracle/18.3/client64/lib > /etc/ld.so.conf.d/oracle.conf"
sudo ldconfig
test
php -v
# and you should get something like
PHP 7.2.12 (cli) (built: Nov  6 2018 16:40:25)...

SOLVED, Hello I have got a lot of this error on my server: [13-Apr-2017 16:32:55 UTC] PHP Warning: PHP Startup: Unable to load dynamic library I started to get the PHP Warning: PHP Startup: Unable to load dynamic library message related to dll. I commented out mysql(and i).dll in the same file but the message didn't go away up until I commented out " " in /opt/lampp/etc/php.ini .

If running ldd /usr/local/lib/php/extensions/no-debug-non-zts-20170718/oci8.so gives you something like this, with missing files:

ldd /usr/local/lib/php/extensions/no-debug-non-zts-20170718/oci8.so
    linux-vdso.so.1 (0x00007ffc8bfe7000)
    libclntsh.so.12.1 => /usr/local/instantclient/libclntsh.so.12.1 (0x00007fb9919e0000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fb991641000)
    libmql1.so => not found
    libipc1.so => not found
    libnnz12.so => not found
    libons.so => not found
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fb99143d000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fb991139000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fb990f1c000)
    libnsl.so.1 => /lib/x86_64-linux-gnu/libnsl.so.1 (0x00007fb990d04000)
    librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fb990afc000)
    /lib64/ld-linux-x86-64.so.2 (0x00007fb994bc8000)
    libaio.so.1 => /lib/x86_64-linux-gnu/libaio.so.1 (0x00007fb9908fa000)
    libclntshcore.so.12.1 => not found

You can add the folder to your ldconfig like this (other readers - your path may vary):

echo /usr/local/instantclient_12_1/ > /etc/ld.so.conf.d/oracle-instantclient.conf

Then run ldconfig to read the new config.

PHP Startup: Unable to load dynamic library, with me but this message appears every time i use php commands in my terminal PHP Warning: PHP Startup: Unable to load dynamic … Unable to load dynamic library (readline.so) #377. Closed trinajstica opened this issue Jun 6, 2016 · 10 comments Closed Unable to load dynamic library (readline.

Added this to my Dockerfile:

# Install Oracle instantclient and oci8 extension
RUN mkdir /opt/oracle \
    && curl 'https://download.oracle.com/otn_software/linux/instantclient/19600/instantclient-basic-linux.x64-19.6.0.0.0dbru.zip' --output /opt/oracle/instantclient-basic-linux.zip \
    && curl 'https://download.oracle.com/otn_software/linux/instantclient/19600/instantclient-sdk-linux.x64-19.6.0.0.0dbru.zip' --output /opt/oracle/instantclient-sdk-linux.zip \
    && unzip '/opt/oracle/instantclient-basic-linux.zip' -d /opt/oracle \
    && unzip '/opt/oracle/instantclient-sdk-linux.zip' -d /opt/oracle \
    && rm /opt/oracle/instantclient-*.zip \
    && mv /opt/oracle/instantclient_* /opt/oracle/instantclient \
    && docker-php-ext-configure oci8 --with-oci8=instantclient,/opt/oracle/instantclient \
    && docker-php-ext-install oci8 \
    && echo /opt/oracle/instantclient/ > /etc/ld.so.conf.d/oracle-insantclient.conf \
    && ldconfig

libaio1 also needs to be installed btw.

16.04, Run: sudo gedit -H /etc/php/7.0/cli/php.ini. and comment out extension=php_intl.​dll . Windows was assigning an internal IP address. Setting a static IP didn't work. I was assuming it was a DHCP server failure. I connected my monitor to pfSense to see what was going on, and for every reboot it was the same warning: PHP startup, unable to load dynamic library. Tried to do an update, but couldn't. Tried to reset to factory, but

PHP Warning: PHP Startup: Unable to load dynamic library, PHP Warning: PHP Startup: Unable to load dynamic library. Posted 4 years ago by opilo. I updated my server using these two commands: Unknown(): Unable to load dynamic library 'C:\AppServ\php\extensions\php_saprfc.dll' - Das angegebene Modul wurde nicht gefunden. I DID Copy the file to the respective location, does any one have a hint ? Thanks a lot, regards, Juergen

PHP Warning: PHP Startup: Unable to load dynamic library · Issue , PHP Warning: PHP Startup: Unable to load dynamic library #316. Closed. cypherbits opened this issue on Nov 23, 2019 · 10 comments. Closed  Unable to load dynamic library #101. Closed lrstndm opened this issue Jun 28, 2016 · 15 comments Closed Unable to load dynamic library #101.

Unable to load dynamic library 'php_decimal.dll' · Issue #27 · php , PHP Warning: PHP Startup: Unable to load dynamic library 'php_decimal.dll' (​tried: C:\xampp\php\ext\php_decimal.dll (The specified module  [SOLVED] PHP Startup: Unable to load dynamic library Post by TrevorH » Tue Jun 04, 2013 8:48 am There is no 'distributed Centos 6.4 version' of this package.

Comments