An extension that reaches PHP’s extension directory can still be binary-incompatible with the runtime loading it. An **“undefined symbol”** startup warning usually means the module was built for a different PHP API, thread-safety mode, architecture or linked-library set. Renaming or relocating the .so file cannot repair that mismatch.
Last updated: November 24, 2026.
php -n -v
php -n -i | grep -E 'PHP Version|Thread Safety|Architecture|PHP API|Zend Extension Build'
php-config --version
php-config --extension-dir
file /path/to/pdo_kdb.so
ldd /path/to/pdo_kdb.soThe -n option starts PHP without loading configuration files, so the broken extension does not obscure the runtime details. Run the matching commands inside the same container or host that will load the module.
Match more than the extension directory
PHP chooses a default Unix extension directory using the debug mode, ZTS or non-ZTS mode and Zend module API number. The PHP extension-loading documentation explains those directory components. A path containing no-debug-non-zts-20131226 describes the runtime directory, but it does not prove that a vendor binary was compiled for that build.
Check whether the module and PHP are both 32-bit or 64-bit, whether PHP is ZTS or NTS, and whether every library shown by ldd exists. An unresolved PHP symbol such as file_globals_id points back to the extension build. Obtain the vendor package for the exact runtime, or rebuild from source; do not add unrelated libraries until the missing dependency is identified.
Build with the runtime’s own tools
PHP’s phpize instructions require the development package that supplies headers matching the target PHP installation. Run that installation’s phpize, configure with its php-config, then build and install. When multiple PHP versions exist, an unqualified phpize or php-config can silently select the wrong headers.
After installing the compatible module, enable it in the configuration file reported by php --ini, then verify with php -m and a minimal connection test. If the extension is available only as an incompatible proprietary binary, the safe resolution is a matching vendor build or a supported client interface—not forcing PHP to load it.