PHP Startup: Unable to load dynamic library

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face: is for home/non-enterprise users. If you’re running a business, paid support can be accessed via where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:


Or for longer, use three backticks above and below the code snippet:


Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 12.0.2): Nextcloud 16.0.0
Operating system and version (eg, Ubuntu 17.04): Ubuntu 18.04 LTE
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.29
PHP version (eg, 7.1): PHP 7.2.17

The issue you are facing:

I get the error defined below, but can’t figure out how nextcloud is submitting its test to create this error. Any of my tests and info checks don’t define pdo_mysql relating to /usr/lib/php/20170718 like this is. It is truly loaded, so I feel I don’t relate to a call the same as Nextcloud’s PHP calls. Is there an example string of nextcloud’s system/security check that I could make and manually run to trigger this? I’m currently viewing back and forth between the Overview & Logging page. I basically don’t know where this is defined to be a loaded extension to remove it. The loaded ones I know all about.

Is this the first time you’ve seen this error? (Y/N): Reoccuring, but only upon/within nextcloud’s overview/tests

Steps to replicate it:

  1. View Administration - Overview page to run its tests
  2. View Administration - Logging to see the error

The output of your Nextcloud log in Admin > Logging:

PHP Startup: Unable to load dynamic library 'pdo_mysql' (tried: /usr/lib/php/20170718/pdo_mysql (/usr/lib/php/20170718/pdo_mysql: cannot open shared object file: No such file or directory), /usr/lib/php/20170718/ (/usr/lib/php/20170718/ undefined symbol: mysqlnd_allocator)) at Unknown#0

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

$CONFIG = array (
  'instanceid' => 'oc7qy9tv3hdx',
  'passwordsalt' => 'DwORlJ6mKGW1GuepTdS/FWKd1i71g1',
  'secret' => 'SrARzt0AaJ2bmyYopQ/cIUkoSmOwTflcB32K5Kbe4U2itONZ',
  'trusted_domains' => 
  array (
    0 =>',
  'datadirectory' => '/hdd/htdocs/username/domain/sub/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '',
  'overwrite.cli.url' => '',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost:3306',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'oc_admin',
  'dbpassword' => 'sN+jK70P4/q5+CerjSIqZuAZqH5n6f',
  'installed' => true,
  'memcache.local' => '\OC\Memcache\APCu',

The output of your Apache/nginx/system log in /var/log/____:

Clean/Clear (No topic-related)

The displayed message is not cause by Nextcloud but your Apache web server. It tells you that the mentioned PHP library cannot be loaded because of an undefined symbol. This kind of problem appears if e.g. the pdo_mysql module has been compiled in a different environment or requirement couldn’t be found on exists in a wrong version. Wrong version means, that e.g. a required library exists on your system, but with in wrong version etc.

Aunt G. provides more detailed information to fix the problem:…0…1…gws-wiz._jsKvhVs7uI

1 Like

I know it lands on PHP. My question is how would nextcloud run to trigger such error? I get no error at all of any attempt I’ve tried to do such, or within any logs. Anything/everything is loaded fine via my tests/checks. I’m aiming just to duplicate this error outside of nextcloud and looking how nextcloud runs its check/test to cause it.

Twas just the order in which the extension loaded, not due to the order on a single file’s extension list, but in the case multiple .ini files are run. Only down side in this case was the log only noted 1 error at a time, so I had to alter/update my options and re-run its test each time.

A rough example is if there’s a “file missing” type error or such, and there’s truly 5 files missing, the error log will only display the 1st error, and not the next until the 1st doesn’t exist.

Good to hear that you were able to fix it. :+1: