Php warning php startup unable to load dynamic library undefined symbol

Arch Linux

I have two hosts with identical PHP 7.2.0-2 environments that serve a flat-file CMS. I first noticed this problem when httpd on host 1 would failover to host 2 and the CMS on host 2 complaining about not having gd, curl and zip modules loaded or installed. They have been. When I looked closer at host 2 I stumbled upon this.

Failed loading /usr/lib/php/modules/opcache.so: /usr/lib/php/modules/opcache.so: undefined symbol: zend_known_strings PHP Warning: PHP Startup: bz2: Unable to initialize module\nModule compiled with module API=20170718\nPHP compiled with module API=20160303\nThese options need to match\n in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/curl.so' - /usr/lib/php/modules/curl.so: undefined symbol: zend_empty_string in Unknown on line 0 PHP Warning: PHP Startup: gd: Unable to initialize module\nModule compiled with module API=20170718\nPHP compiled with module API=20160303\nThese options need to match\n in Unknown on line 0 PHP Warning: PHP Startup: gettext: Unable to initialize module\nModule compiled with module API=20170718\nPHP compiled with module API=20160303\nThese options need to match\n in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/iconv.so' - /usr/lib/php/modules/iconv.so: undefined symbol: zend_spprintf in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/imap.so' - /usr/lib/php/modules/imap.so: undefined symbol: zend_spprintf in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/intl.so' - /usr/lib/php/modules/intl.so: undefined symbol: zend_strpprintf in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/ldap.so' - /usr/lib/php/modules/ldap.so: undefined symbol: zend_get_callable_name in Unknown on line 0 PHP Warning: PHP Startup: sodium: Unable to initialize module\nModule compiled with module API=20170718\nPHP compiled with module API=20160303\nThese options need to match\n in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/mysqli.so' - /usr/lib/php/modules/mysqli.so: undefined symbol: zend_vspprintf in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/pdo_mysql.so' - /usr/lib/php/modules/pdo_mysql.so: undefined symbol: zend_strpprintf in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/pdo_pgsql.so' - /usr/lib/php/modules/pdo_pgsql.so: undefined symbol: zend_strpprintf in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/pgsql.so' - /usr/lib/php/modules/pgsql.so: undefined symbol: zend_spprintf in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/sqlite3.so' - /usr/lib/php/modules/sqlite3.so: undefined symbol: zend_vspprintf in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/xmlrpc.so' - /usr/lib/php/modules/xmlrpc.so: undefined symbol: zend_spprintf in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/zip.so' - /usr/lib/php/modules/zip.so: undefined symbol: zend_spprintf in Unknown on line 0 PHP Warning: PHP Startup: apcu: Unable to initialize module\nModule compiled with module API=20170718\nPHP compiled with module API=20160303\nThese options need to match\n in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/apc.so' - /usr/lib/php/modules/apc.so: undefined symbol: apc_iterator_obj_init in Unknown on line 0 PHP Warning: PHP Startup: geoip: Unable to initialize module\nModule compiled with module API=20170718\nPHP compiled with module API=20160303\nThese options need to match\n in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/imagick.so' - /usr/lib/php/modules/imagick.so: undefined symbol: zend_spprintf in Unknown on line 0 PHP Warning: PHP Startup: rrd: Unable to initialize module\nModule compiled with module API=20170718\nPHP compiled with module API=20160303\nThese options need to match\n in Unknown on line 0

So I checked and found the packages are built for PHP Api Version 20170718.

phpize -v Configuring for: PHP Api Version: 20170718 Zend Module Api No: 20170718 Zend Extension Api No: 320170718

The really strange thing is host 1 and 2 have the exact same PHP package versions installed.

php 7.2.0-2 php-apache 7.2.0-2 php-apcu 5.1.8-2 php-apcu-bc 1.0.3-3 php-gd 7.2.0-2 php-geoip 1.1.1-3 php-imagick 3.4.3-3 php-imap 7.2.0-2 php-intl 7.2.0-2 php-pear 1:1.10.5-1 php-pgsql 7.2.0-2 php-phpdbg 7.2.0-2 php-rrd 2.0.1-1 php-sodium 7.2.0-2 php-sqlite 7.2.0-2 php-tidy 7.2.0-2 php-xsl 7.2.0-2

The wrongfully claimed missing modules and modules hitting the dynamic library problem are of course loaded in php.ini and other respective conf.d files. I have gone as far as looking at the PKGBUILD for PHP 7.2.0-2 and other PHP related packages, but nothing stood out to me that should be causing this. I’ve blown away PHP and started fresh to no avail. Host 1 is fine, but not host 2 using the same exact package versions. Both hosts are using reflector to update the mirrors list daily.

Читайте также:  Links to same page html

I can’t wrap my head around this one.

Last edited by cirkit (2018-01-01 11:48:20)

Источник

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to load dynamic library ‘ffi.so’: undefined symbol: ffi_type_pointer #8521

Unable to load dynamic library ‘ffi.so’: undefined symbol: ffi_type_pointer #8521

Comments

Description

As title described, I could not load the extension ffi.so normally, BTW, PHP is built manually from source code with configure option —disable-all , that is why I need to compile ffi extension independently.

Environment

Step to reproduce:

1. cd /path/to/src/php-7.4.16/ext/ffi 2. /usr/local/php74/bin/phpize 3. ./configure --with-php-config=/usr/local/php74/bin/php-config FFI_CFLAGS=/usr/local/include/ FFI_LIBS=/usrlocal/lib64/ 4. make 5. make install 6. echo "extension=ffi.so" >> /usr/local/php74/lib/php.ini 7. /usr/local/php74/bin/php -v

Current behavior

Warning: PHP Startup: Unable to load dynamic library ‘ffi.so’ (/usr/local/php74/lib/php/extensions/debug-non-zts-20190902/ffi.so: undefined symbol: ffi_type_pointer)

Expected outcome

ffi extension can work normally as expected

More info

Actually, I also tried PHP 8.1.5 , but still failed, Additionally I have done the same job in extension php-ffi which even cound NOT be compiled successfully, and throw error messages as below:

/user/local/php74/ext/php-ffi/ffi.c: In function ‘zif_ffi_trampoline’: /user/local/php74/ext/php-ffi/ffi.c:2380:3: warning: implicit declaration of function ‘ffi_prep_cif_var’ [-Wimplicit-function-declaration] if (ffi_prep_cif_var(&cif, type->func.abi, arg_count, EX_NUM_ARGS(), ret_type, arg_types) != FFI_OK) < ^ /user/local/php74/ext/php-ffi/ffi.c: In function ‘zend_ffi_make_func_type’: /user/local/php74/ext/php-ffi/ffi.c:5545:21: error: ‘FFI_FASTCALL’ undeclared (first use in this function) type->func.abi = FFI_FASTCALL; ^ /user/local/php74/ext/php-ffi/ffi.c:5545:21: note: each undeclared identifier is reported only once for each function it appears in /user/local/php74/ext/php-ffi/ffi.c:5548:21: error: ‘FFI_THISCALL’ undeclared (first use in this function) type->func.abi = FFI_THISCALL; ^ /user/local/php74/ext/php-ffi/ffi.c:5551:21: error: ‘FFI_STDCALL’ undeclared (first use in this function) type->func.abi = FFI_STDCALL; ^ make: *** [ffi.lo] Error 1 

PHP Version

Operating System

The text was updated successfully, but these errors were encountered:

Источник

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to load dynamic library ‘/usr/lib/php/20160303/pdo_sqlsrv.so’ — /usr/lib/php/20160303/pdo_sqlsrv.so: undefined symbol: php_pdo_register_driver in Unknown on line 0 #736

Unable to load dynamic library ‘/usr/lib/php/20160303/pdo_sqlsrv.so’ — /usr/lib/php/20160303/pdo_sqlsrv.so: undefined symbol: php_pdo_register_driver in Unknown on line 0 #736

Comments

SQL Server version

Microsoft SQL Server 2017 (RTM) — 14.0.1000.169 (X64) Aug 22 2017 17:04:49 Copyright (C) 2017 Microsoft Corporation Express Edition (64-bit) on Windows 10 Pro 10.0 (Build 16299: )

Client operating system

PHP version

Problem description

I have installed pdo_sqlsrv via sudo pecl install pdo_sqlsrv and added it to php.ini with

echo "extension=/usr/lib/php/20160303/pdo_sqlsrv.so" >> /etc/php/7.1/fpm/php.ini echo "extension=/usr/lib/php/20160303/pdo_sqlsrv.so" >> /etc/php/7.1/cli/php.ini 

PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/lib/php/20160303/pdo_sqlsrv.so’ — /usr/lib/php/20160303/pdo_sqlsrv.so: undefined symbol: php_pdo_register_driver in Unknown on line 0

pdo_sqlsrv also does not show up in phpinfo() . Can anyone help me fix this?

The text was updated successfully, but these errors were encountered:

Thank you very much for taking the time to help! I managed to solve the problem. I followed the instructions but had to do one more thing:

It was neccessary to copy /etc/php/7.1/cli/conf.d/30-pdo_sqlsrv.ini to /etc/php/7.1/fpm/conf.d for pdo_sqlsrv to show up in phpinfo and for my Laravel application to be able to use it.

I am having this exact issue and am still having problems.

I am running on CentOS7 with php 7.1

So i went to the repo and downloaded the .so files and placed them in my php/modules directory but now i get a different error entirely.

PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/php_sqlsrv_71_ts.so' - /usr/lib64/php/modules/php_sqlsrv_71_ts.so: undefined symbol: tsrm_get_ls_cache in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/php_pdo_sqlsrv_71_ts.so' - /usr/lib64/php/modules/php_pdo_sqlsrv_71_ts.so: undefined symbol: executor_globals_id in Unknown on line 0 

this is the original error.

PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/lib64/php/modules/pdo_sqlsrv.so’ — /usr/lib64/php/modules/pdo_sqlsrv.so: undefined symbol: php_pdo_register_driver in Unknown on line 0

any help would be appreciated . I cannot get this to work so i can start my laravel development. I have been at this for hours. tried uninstalling everything and reinstalling etc.

Источник

Оцените статью