title: PHP Startup: Unable to load dynamic library (path exist)
body: <p>I want to execute a program in a new VM of Debian 10 and I get warnings related to .so loading:</p>
  
  <p>Distribution related specs: Debian 10, php 7.3.11</p>
  
  <p>Execution:</p>
  
  <pre><code>./program.php
  </code></pre>
  
  <p>it contains the following shebang:</p>
  
  <pre><code>#!/usr/bin/env php
  </code></pre>
  
  <p>Warnings:</p>
  
  <pre><code>PHP Warning:  PHP Startup: Unable to load dynamic library 'mysqli' (tried: /usr/lib/php/20180731/mysqli (/usr/lib/php/20180731/mysqli: cannot open shared object file: No such file or directory), /usr/lib/php/20180731/mysqli.so (/usr/lib/php/20180731/mysqli.so: undefined symbol: mysqlnd_global_stats)) in Unknown on line 0
  PHP Warning:  PHP Startup: Unable to load dynamic library 'pdo_mysql' (tried: /usr/lib/php/20180731/pdo_mysql (/usr/lib/php/20180731/pdo_mysql: cannot open shared object file: No such file or directory), /usr/lib/php/20180731/pdo_mysql.so (/usr/lib/php/20180731/pdo_mysql.so: undefined symbol: mysqlnd_allocator)) in Unknown on line 0
  </code></pre>
  
  <p>here is the lines i modified the the php.ini file:</p>
  
  <pre><code>extension=mysqli
  extension=pdo_mysql
  </code></pre>
  
  <p>and here is the return of <code>ls -l /usr/lib/php/20180731</code></p>
  
  <pre><code>total 8788
  -rw-r--r-- 1 root root   34920 oct.  26 16:14 calendar.so
  -rw-r--r-- 1 root root   14440 oct.  26 16:14 ctype.so
  -rw-r--r-- 1 root root   92264 oct.  26 16:14 exif.so
  -rw-r--r-- 1 root root 5429360 oct.  26 16:14 fileinfo.so
  -rw-r--r-- 1 root root   67688 oct.  26 16:14 ftp.so
  -rw-r--r-- 1 root root   14440 oct.  26 16:14 gettext.so
  -rw-r--r-- 1 root root   47208 oct.  26 16:14 iconv.so
  -rw-r--r-- 1 root root   47208 oct.  26 16:14 json.so
  -rw-r--r-- 1 root root 1611912 oct.  26 16:14 mbstring.so
  -rw-r--r-- 1 root root  141416 oct.  26 16:14 mysqli.so
  -rw-r--r-- 1 root root  251512 oct.  26 16:14 mysqlnd.so
  -rw-r--r-- 1 root root  518640 oct.  26 16:14 opcache.so
  -rw-r--r-- 1 root root   30824 oct.  26 16:14 pdo_mysql.so
  -rw-r--r-- 1 root root  112744 oct.  26 16:14 pdo.so
  -rw-r--r-- 1 root root  280680 oct.  26 16:14 phar.so
  -rw-r--r-- 1 root root   39016 oct.  26 16:14 posix.so
  -rw-r--r-- 1 root root   34920 oct.  26 16:14 readline.so
  -rw-r--r-- 1 root root   14440 oct.  26 16:14 shmop.so
  -rw-r--r-- 1 root root   96360 oct.  26 16:14 sockets.so
  -rw-r--r-- 1 root root   22632 oct.  26 16:14 sysvmsg.so
  -rw-r--r-- 1 root root   14440 oct.  26 16:14 sysvsem.so
  -rw-r--r-- 1 root root   14440 oct.  26 16:14 sysvshm.so
  -rw-r--r-- 1 root root   22632 oct.  26 16:14 tokenizer.so
  </code></pre>
  
  <p>I cant find the reason php cant open the .so files</p>
  
  <p>I know there were many posts like mine, but they were only path related problem and my paths seems to be corects.</p>