Skip to content
New issue

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

Some extensions are failed to load in php 7.4 #94

Open
vuphuong87 opened this issue Apr 5, 2020 · 24 comments
Open

Some extensions are failed to load in php 7.4 #94

vuphuong87 opened this issue Apr 5, 2020 · 24 comments

Comments

@vuphuong87
Copy link

These extensions are failed to loaded when using php 7.4 with Alphin 3.10.

  • amqp
  • mcrypt
  • redis

For example, the php7-amqp we're using is 1.9.4 which supports php 7.3 only.
Can we somehow use the newer versions?

Thank you.

@canberkkoc
Copy link

I have problem with wddx, mcrypt too.

@hernandev
Copy link
Member

investigating, reply in a few hours after new builds.

@hernandev
Copy link
Member

new build available, please test and report back.

@hernandev
Copy link
Member

hell it's been 5 hours since this, this project takes a lot of time jesus

@canberkkoc
Copy link

Hi my problem is going on, i have some output like this :

/ # php7

PHP Warning:  PHP Startup: Unable to load dynamic library 'wddx.so' (tried: /usr/lib/php7/modules/wddx.so (Error relocating /usr/lib/php7/modules/wddx.so: _zval_ptr_dtor: symbol not found), /usr/lib/php7/modules/wddx.so.so (Error loading shared library /usr/lib/php7/modules/wddx.so.so: No such file or directory)) in Unknown on line 0

PHP Warning:  PHP Startup: Unable to load dynamic library 'mcrypt.so' (tried: /usr/lib/php7/modules/mcrypt.so (Error relocating /usr/lib/php7/modules/mcrypt.so: _array_init: symbol not found), /usr/lib/php7/modules/mcrypt.so.so (Error loading shared library /usr/lib/php7/modules/mcrypt.so.so: No such file or directory)) in Unknown on line 0

@oguzy
Copy link

oguzy commented May 11, 2020

docker run -it alpine:3.11 sh
/ # cd /etc/apk/keys
/etc/apk/keys # curl -LO https://dl.bintray.com/php-alpine/key/php-alpine.rsa.
pub
sh: curl: not found
/etc/apk/keys # apk add curl
fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/community/x86_64/APKINDEX.tar.gz
(1/4) Installing ca-certificates (20191127-r1)
(2/4) Installing nghttp2-libs (1.40.0-r0)
(3/4) Installing libcurl (7.67.0-r0)
(4/4) Installing curl (7.67.0-r0)
Executing busybox-1.31.1-r9.trigger
Executing ca-certificates-20191127-r1.trigger
OK: 7 MiB in 18 packages
/etc/apk/keys # https://dl.bintray.com/php-alpine/key/php-alpine.rsa.pub
sh: https://dl.bintray.com/php-alpine/key/php-alpine.rsa.pub: not found
/etc/apk/keys # curl -LO https://dl.bintray.com/php-alpine/key/php-alpine.rsa.
pub
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   451  100   451    0     0   1025      0 --:--:-- --:--:-- --:--:--  1022
/etc/apk/keys # apk update
fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/community/x86_64/APKINDEX.tar.gz
v3.11.6-32-g9ddc349524 [http://dl-cdn.alpinelinux.org/alpine/v3.11/main]
v3.11.6-28-g4b76c8208f [http://dl-cdn.alpinelinux.org/alpine/v3.11/community]
OK: 11270 distinct packages available
/etc/apk/keys # echo "https://dl.bintray.com/php-alpine/v3.9/php-7.4" >> /etc/
apk/repositories
/etc/apk/keys # apk add php7
fetch https://dl.bintray.com/php-alpine/v3.9/php-7.4/x86_64/APKINDEX.tar.gz
(1/9) Installing php7-common (7.4.5-r1)
(2/9) Installing argon2-libs (20190702-r1)
(3/9) Installing ncurses-terminfo-base (6.1_p20200118-r4)
(4/9) Installing ncurses-libs (6.1_p20200118-r4)
(5/9) Installing libedit (20191211.3.1-r0)
(6/9) Installing pcre2 (10.34-r1)
(7/9) Installing xz-libs (5.2.4-r0)
(8/9) Installing libxml2 (2.9.10-r3)
(9/9) Installing php7 (7.4.5-r1)
Executing busybox-1.31.1-r9.trigger
OK: 30 MiB in 27 packages
/etc/apk/keys # apk search mcrypt
libmcrypt-doc-2.5.8-r7
php7-pecl-mcrypt-1.0.3-r0
libmcrypt-2.5.8-r7
libmcrypt-dev-2.5.8-r7
/etc/apk/keys # apk add php7-pecl-mcrypt
(1/2) Installing libmcrypt (2.5.8-r7)
(2/2) Installing php7-pecl-mcrypt (1.0.3-r0)
OK: 30 MiB in 29 packages
/etc/apk/keys # php7 -m
PHP Warning:  PHP Startup: Unable to load dynamic library 'mcrypt.so' (tried: /usr/lib/php7/modules/mcrypt.so (Error relocating /usr/lib/php7/modules/mcrypt.so: php_error_docref0: symbol not found), /usr/lib/php7/modules/mcrypt.so.so (Error loading shared library /usr/lib/php7/modules/mcrypt.so.so: No such file or directory)) in Unknown on line 0
[PHP Modules]
Core
date
fileinfo
filter
hash
libxml
pcre
readline
Reflection
SimpleXML
SPL
standard
tokenizer
xmlwriter

@oguzy
Copy link

oguzy commented May 11, 2020

seems mcrypt is broken

@nicogominet
Copy link

nicogominet commented Jun 3, 2020

I have issues on some extensions as well: fileinfo, simplexml, tokenizer and xmlwriter:

PHP Warning:  PHP Startup: Unable to load dynamic library 'fileinfo.so' (tried: /usr/lib/php7/modules/fileinfo.so (Error relocating /usr/lib/php7/modules/fileinfo.so: php_error_docref0: symbol not found), /usr/lib/php7/modules/fileinfo.so.so (Error loading shared library /usr/lib/php7/modules/fileinfo.so.so: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'simplexml.so' (tried: /usr/lib/php7/modules/simplexml.so (Error relocating /usr/lib/php7/modules/simplexml.so: add_next_index_zval: symbol not found), /usr/lib/php7/modules/simplexml.so.so (Error loading shared library /usr/lib/php7/modules/simplexml.so.so: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'tokenizer.so' (tried: /usr/lib/php7/modules/tokenizer.so (Error relocating /usr/lib/php7/modules/tokenizer.so: add_next_index_zval: symbol not found), /usr/lib/php7/modules/tokenizer.so.so (Error loading shared library /usr/lib/php7/modules/tokenizer.so.so: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'xmlwriter.so' (tried: /usr/lib/php7/modules/xmlwriter.so (Error relocating /usr/lib/php7/modules/xmlwriter.so: php_error_docref0: symbol not found), /usr/lib/php7/modules/xmlwriter.so.so (Error loading shared library /usr/lib/php7/modules/xmlwriter.so.so: No such file or directory)) in Unknown on line 0

@ajtrichards
Copy link

ajtrichards commented Jun 5, 2020

If it helps, I'm getting the following extensions reporting as missing:

With Alpine 3.11

PHP Warning:  PHP Startup: Unable to load dynamic library 'fileinfo.so' (tried: /usr/lib/php7/modules/fileinfo.so (Error relocating /usr/lib/php7/modules/fileinfo.so: php_error_docref0: symbol not found), /usr/lib/php7/modules/fileinfo.so.so (Error loading shared library /usr/lib/php7/modules/fileinfo.so.so: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'recode.so' (tried: /usr/lib/php7/modules/recode.so (Error relocating /usr/lib/php7/modules/recode.so: php_error_docref0: symbol not found), /usr/lib/php7/modules/recode.so.so (Error loading shared library /usr/lib/php7/modules/recode.so.so: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'simplexml.so' (tried: /usr/lib/php7/modules/simplexml.so (Error relocating /usr/lib/php7/modules/simplexml.so: add_next_index_zval: symbol not found), /usr/lib/php7/modules/simplexml.so.so (Error loading shared library /usr/lib/php7/modules/simplexml.so.so: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'tokenizer.so' (tried: /usr/lib/php7/modules/tokenizer.so (Error relocating /usr/lib/php7/modules/tokenizer.so: add_next_index_zval: symbol not found), /usr/lib/php7/modules/tokenizer.so.so (Error loading shared library /usr/lib/php7/modules/tokenizer.so.so: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'xmlwriter.so' (tried: /usr/lib/php7/modules/xmlwriter.so (Error relocating /usr/lib/php7/modules/xmlwriter.so: php_error_docref0: symbol not found), /usr/lib/php7/modules/xmlwriter.so.so (Error loading shared library /usr/lib/php7/modules/xmlwriter.so.so: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'wddx.so' (tried: /usr/lib/php7/modules/wddx.so (Error relocating /usr/lib/php7/modules/wddx.so: php_XML_SetCharacterDataHandler: symbol not found), /usr/lib/php7/modules/wddx.so.so (Error loading shared library /usr/lib/php7/modules/wddx.so.so: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'mcrypt.so' (tried: /usr/lib/php7/modules/mcrypt.so (Error relocating /usr/lib/php7/modules/mcrypt.so: php_error_docref0: symbol not found), /usr/lib/php7/modules/mcrypt.so.so (Error loading shared library /usr/lib/php7/modules/mcrypt.so.so: No such file or directory)) in Unknown on line 0

With Alpine 3.10

PHP Warning:  PHP Startup: Unable to load dynamic library 'fileinfo.so' (tried: /usr/lib/php7/modules/fileinfo.so (Error relocating /usr/lib/php7/modules/fileinfo.so: php_error_docref0: symbol not found), /usr/lib/php7/modules/fileinfo.so.so (Error loading shared library /usr/lib/php7/modules/fileinfo.so.so: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'recode.so' (tried: /usr/lib/php7/modules/recode.so (Error relocating /usr/lib/php7/modules/recode.so: php_error_docref0: symbol not found), /usr/lib/php7/modules/recode.so.so (Error loading shared library /usr/lib/php7/modules/recode.so.so: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'simplexml.so' (tried: /usr/lib/php7/modules/simplexml.so (Error relocating /usr/lib/php7/modules/simplexml.so: add_next_index_zval: symbol not found), /usr/lib/php7/modules/simplexml.so.so (Error loading shared library /usr/lib/php7/modules/simplexml.so.so: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'tokenizer.so' (tried: /usr/lib/php7/modules/tokenizer.so (Error relocating /usr/lib/php7/modules/tokenizer.so: add_next_index_zval: symbol not found), /usr/lib/php7/modules/tokenizer.so.so (Error loading shared library /usr/lib/php7/modules/tokenizer.so.so: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'xmlwriter.so' (tried: /usr/lib/php7/modules/xmlwriter.so (Error relocating /usr/lib/php7/modules/xmlwriter.so: php_error_docref0: symbol not found), /usr/lib/php7/modules/xmlwriter.so.so (Error loading shared library /usr/lib/php7/modules/xmlwriter.so.so: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'wddx.so' (tried: /usr/lib/php7/modules/wddx.so (Error relocating /usr/lib/php7/modules/wddx.so: php_XML_SetCharacterDataHandler: symbol not found), /usr/lib/php7/modules/wddx.so.so (Error loading shared library /usr/lib/php7/modules/wddx.so.so: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'mcrypt.so' (tried: /usr/lib/php7/modules/mcrypt.so (Error relocating /usr/lib/php7/modules/mcrypt.so: php_error_docref0: symbol not found), /usr/lib/php7/modules/mcrypt.so.so (Error loading shared library /usr/lib/php7/modules/mcrypt.so.so: No such file or directory)) in Unknown on line 0

Thanks 👍

@elton-fonseca
Copy link

I have same problem :(

PHP Warning:  PHP Startup: Unable to load dynamic library 'fileinfo.so' (tried: /usr/lib/php7/modules/fileinfo.so (Error relocating /usr/lib/php7/modules/fileinfo.so: php_error_docref0: symbol not found), /usr/lib/php7/modules/fileinfo.so.so (Error loading shared library /usr/lib/php7/modules/fileinfo.so.so: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'intl.so' (tried: /usr/lib/php7/modules/intl.so (Error relocating /usr/lib/php7/modules/intl.so: php_error_docref0: symbol not found), /usr/lib/php7/modules/intl.so.so (Error loading shared library /usr/lib/php7/modules/intl.so.so: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'simplexml.so' (tried: /usr/lib/php7/modules/simplexml.so (Error relocating /usr/lib/php7/modules/simplexml.so: add_next_index_zval: symbol not found), /usr/lib/php7/modules/simplexml.so.so (Error loading shared library /usr/lib/php7/modules/simplexml.so.so: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'tokenizer.so' (tried: /usr/lib/php7/modules/tokenizer.so (Error relocating /usr/lib/php7/modules/tokenizer.so: add_next_index_zval: symbol not found), /usr/lib/php7/modules/tokenizer.so.so (Error loading shared library /usr/lib/php7/modules/tokenizer.so.so: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'xmlwriter.so' (tried: /usr/lib/php7/modules/xmlwriter.so (Error relocating /usr/lib/php7/modules/xmlwriter.so: php_error_docref0: symbol not found), /usr/lib/php7/modules/xmlwriter.so.so (Error loading shared library /usr/lib/php7/modules/xmlwriter.so.so: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'imagick.so' (tried: /usr/lib/php7/modules/imagick.so (Error relocating /usr/lib/php7/modules/imagick.so: add_index_zval: symbol not found), /usr/lib/php7/modules/imagick.so.so (Error loading shared library /usr/lib/php7/modules/imagick.so.so: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'mcrypt.so' (tried: /usr/lib/php7/modules/mcrypt.so (Error relocating /usr/lib/php7/modules/mcrypt.so: php_error_docref0: symbol not found), /usr/lib/php7/modules/mcrypt.so.so (Error loading shared library /usr/lib/php7/modules/mcrypt.so.so: No such file or directory)) in Unknown on line 0

@codecreate-dev
Copy link

Mcrypt is deprecated in PHP 7.2 now, try libsodium plus the built in hashing and password functions like:

Mcrypt
https://www.php.net/manual/en/intro.mcrypt.php

Alternatives:

https://www.php.net/manual/en/refs.crypto.php

@codecreate-dev
Copy link

@PauVal99
Copy link

PauVal99 commented Jul 15, 2020

Alpine 3.11

PHP Warning:  PHP Startup: Unable to load dynamic library 'gd' (tried: /usr/lib/php7/modules/gd (Error loading shared library /usr/lib/php7/modules/gd: No such file or directory), /usr/lib/php7/modules/gd.so (Error relocating /usr/lib/php7/modules/gd.so: _try_convert_to_string: symbol not found)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'iconv' (tried: /usr/lib/php7/modules/iconv (Error loading shared library /usr/lib/php7/modules/iconv: No such file or directory), /usr/lib/php7/modules/iconv.so (Error relocating /usr/lib/php7/modules/iconv.so: zval_try_get_string_func: symbol not found)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'intl' (tried: /usr/lib/php7/modules/intl (Error loading shared library /usr/lib/php7/modules/intl: No such file or directory), /usr/lib/php7/modules/intl.so (Error relocating /usr/lib/php7/modules/intl.so: zval_try_get_string_func: symbol not found)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'json' (tried: /usr/lib/php7/modules/json (Error loading shared library /usr/lib/php7/modules/json: No such file or directory), /usr/lib/php7/modules/json.so (Error relocating /usr/lib/php7/modules/json.so: php_error_docref: symbol not found)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'mbstring' (tried: /usr/lib/php7/modules/mbstring (Error loading shared library /usr/lib/php7/modules/mbstring: No such file or directory), /usr/lib/php7/modules/mbstring.so (Error relocating /usr/lib/php7/modules/mbstring.so: zval_try_get_string_func: symbol not found)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'openssl' (tried: /usr/lib/php7/modules/openssl (Error loading shared library /usr/lib/php7/modules/openssl: No such file or directory), /usr/lib/php7/modules/openssl.so (Error relocating /usr/lib/php7/modules/openssl.so: zend_try_assign_typed_ref_stringl: symbol not found)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'pdo' (tried: /usr/lib/php7/modules/pdo (Error loading shared library /usr/lib/php7/modules/pdo: No such file or directory), /usr/lib/php7/modules/pdo.so (Error relocating /usr/lib/php7/modules/pdo.so: _try_convert_to_string: symbol not found)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'pdo_pgsql' (tried: /usr/lib/php7/modules/pdo_pgsql (Error loading shared library /usr/lib/php7/modules/pdo_pgsql: No such file or directory), /usr/lib/php7/modules/pdo_pgsql.so (Error relocating /usr/lib/php7/modules/pdo_pgsql.so: _try_convert_to_string: symbol not found)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'session' (tried: /usr/lib/php7/modules/session (Error loading shared library /usr/lib/php7/modules/session: No such file or directory), /usr/lib/php7/modules/session.so (Error relocating /usr/lib/php7/modules/session.so: _try_convert_to_string: symbol not found)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'xml' (tried: /usr/lib/php7/modules/xml (Error loading shared library /usr/lib/php7/modules/xml: No such file or directory), /usr/lib/php7/modules/xml.so (Error relocating /usr/lib/php7/modules/xml.so: _try_convert_to_string: symbol not found)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'dom' (tried: /usr/lib/php7/modules/dom (Error loading shared library /usr/lib/php7/modules/dom: No such file or directory), /usr/lib/php7/modules/dom.so (Error relocating /usr/lib/php7/modules/dom.so: php_error_docref: symbol not found)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'mysqlnd' (tried: /usr/lib/php7/modules/mysqlnd (Error loading shared library /usr/lib/php7/modules/mysqlnd: No such file or directory), /usr/lib/php7/modules/mysqlnd.so (Error relocating /usr/lib/php7/modules/mysqlnd.so: BIO_new_mem_buf: symbol not found)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'pdo_mysql' (tried: /usr/lib/php7/modules/pdo_mysql (Error loading shared library /usr/lib/php7/modules/pdo_mysql: No such file or directory), /usr/lib/php7/modules/pdo_mysql.so (Error relocating /usr/lib/php7/modules/pdo_mysql.so: zval_try_get_string_func: symbol not found)) in Unknown on line 0```

@ricricucit
Copy link

ricricucit commented Jul 27, 2020

also Alpine 3.11:

PHP Warning:  PHP Startup: Unable to load dynamic library 'curl' (tried: /usr/lib/php7/modules/curl (Error loading shared library /usr/lib/php7/modules/curl: No such file or directory), /usr/lib/php7/modules/curl.so (Error relocating /usr/lib/php7/modules/curl.so: zend_try_assign_typed_ref_long: symbol not found)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'gd' (tried: /usr/lib/php7/modules/gd (Error loading shared library /usr/lib/php7/modules/gd: No such file or directory), /usr/lib/php7/modules/gd.so (Error relocating /usr/lib/php7/modules/gd.so: _try_convert_to_string: symbol not found)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'iconv' (tried: /usr/lib/php7/modules/iconv (Error loading shared library /usr/lib/php7/modules/iconv: No such file or directory), /usr/lib/php7/modules/iconv.so (Error relocating /usr/lib/php7/modules/iconv.so: zval_try_get_string_func: symbol not found)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'intl' (tried: /usr/lib/php7/modules/intl (Error loading shared library /usr/lib/php7/modules/intl: No such file or directory), /usr/lib/php7/modules/intl.so (Error relocating /usr/lib/php7/modules/intl.so: zval_try_get_string_func: symbol not found)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'json' (tried: /usr/lib/php7/modules/json (Error loading shared library /usr/lib/php7/modules/json: No such file or directory), /usr/lib/php7/modules/json.so (Error relocating /usr/lib/php7/modules/json.so: php_error_docref: symbol not found)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'mbstring' (tried: /usr/lib/php7/modules/mbstring (Error loading shared library /usr/lib/php7/modules/mbstring: No such file or directory), /usr/lib/php7/modules/mbstring.so (Error relocating /usr/lib/php7/modules/mbstring.so: zval_try_get_string_func: symbol not found)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'openssl' (tried: /usr/lib/php7/modules/openssl (Error loading shared library /usr/lib/php7/modules/openssl: No such file or directory), /usr/lib/php7/modules/openssl.so (Error relocating /usr/lib/php7/modules/openssl.so: zend_try_assign_typed_ref_stringl: symbol not found)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'pdo' (tried: /usr/lib/php7/modules/pdo (Error loading shared library /usr/lib/php7/modules/pdo: No such file or directory), /usr/lib/php7/modules/pdo.so (Error relocating /usr/lib/php7/modules/pdo.so: _try_convert_to_string: symbol not found)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'pdo_pgsql' (tried: /usr/lib/php7/modules/pdo_pgsql (Error loading shared library /usr/lib/php7/modules/pdo_pgsql: No such file or directory), /usr/lib/php7/modules/pdo_pgsql.so (Error relocating /usr/lib/php7/modules/pdo_pgsql.so: _try_convert_to_string: symbol not found)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'pgsql' (tried: /usr/lib/php7/modules/pgsql (Error loading shared library /usr/lib/php7/modules/pgsql: No such file or directory), /usr/lib/php7/modules/pgsql.so (Error relocating /usr/lib/php7/modules/pgsql.so: zval_try_get_string_func: symbol not found)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'session' (tried: /usr/lib/php7/modules/session (Error loading shared library /usr/lib/php7/modules/session: No such file or directory), /usr/lib/php7/modules/session.so (Error relocating /usr/lib/php7/modules/session.so: _try_convert_to_string: symbol not found)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'xml' (tried: /usr/lib/php7/modules/xml (Error loading shared library /usr/lib/php7/modules/xml: No such file or directory), /usr/lib/php7/modules/xml.so (Error relocating /usr/lib/php7/modules/xml.so: _try_convert_to_string: symbol not found)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'zip' (tried: /usr/lib/php7/modules/zip (Error loading shared library /usr/lib/php7/modules/zip: No such file or directory), /usr/lib/php7/modules/zip.so (Error relocating /usr/lib/php7/modules/zip.so: zval_try_get_string_func: symbol not found)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'zlib' (tried: /usr/lib/php7/modules/zlib (Error loading shared library /usr/lib/php7/modules/zlib: No such file or directory), /usr/lib/php7/modules/zlib.so (Error relocating /usr/lib/php7/modules/zlib.so: php_error_docref: symbol not found)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'dom' (tried: /usr/lib/php7/modules/dom (Error loading shared library /usr/lib/php7/modules/dom: No such file or directory), /usr/lib/php7/modules/dom.so (Error relocating /usr/lib/php7/modules/dom.so: php_error_docref: symbol not found)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'mysqlnd' (tried: /usr/lib/php7/modules/mysqlnd (Error loading shared library /usr/lib/php7/modules/mysqlnd: No such file or directory), /usr/lib/php7/modules/mysqlnd.so (Error relocating /usr/lib/php7/modules/mysqlnd.so: BIO_new_mem_buf: symbol not found)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'mysqli' (tried: /usr/lib/php7/modules/mysqli (Error loading shared library /usr/lib/php7/modules/mysqli: No such file or directory), /usr/lib/php7/modules/mysqli.so (Error relocating /usr/lib/php7/modules/mysqli.so: zval_try_get_string_func: symbol not found)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'pdo_mysql' (tried: /usr/lib/php7/modules/pdo_mysql (Error loading shared library /usr/lib/php7/modules/pdo_mysql: No such file or directory), /usr/lib/php7/modules/pdo_mysql.so (Error relocating /usr/lib/php7/modules/pdo_mysql.so: zval_try_get_string_func: symbol not found)) in Unknown on line 0

@henzeb
Copy link

henzeb commented Jul 30, 2020

Same problem here. Similar list as previous comment. The fun part of it being that the files it is looking for are actually there inside /usr/lib/php7/modules/.

It has nothing to do with read permissions, it has, in my case, probably something to do with php7.3 being installed instead of php7.4.

The php7-cli is installed from the alpine repository. You can see what is happening by running an empty alpine docker container with only the required lines to add the repository. first you install php7. then you have no cli, that is, "php" does not exist, but "php7" does. when installing php7-cli, the php7 binary is being downgraded.

A workaround involving manually symlinking to the php7 library is not going to cut it for everyone, since a few packages are installing the 7.3 version. in my case fileinfo, simplexml, tokenizer, xmlwriter, imagick.

I hope this helps solving this issue.

@henzeb
Copy link

henzeb commented Jul 30, 2020

I'm a bit further in this. The following extensions are missing: php-simplexml, php-tokenizer, php-xmlwriter and php-fileinfo. I believe those are core extensions.

If you do not need those, you can safely use the workaround where you symlink the php7 instance. "ln -sf /usr/bin/php7 /usr/bin/php"

@hernandev
Copy link
Member

all fixed long ago guys

@gonzaloplaza
Copy link

Hi .. i'm still having issues with PHP 7.4 , tested with Alpine 3.11 & 3.12 and php-json extension

Installing the extension:

RUN apk --no-cache add php php-fpm php-dom php-openssl php-curl \
  php-zlib php-xml php-phar php-iconv php-intl php-ctype php-session \
  php-mbstring php-gd php-json && ln -s /usr/bin/php7 /usr/bin/php

JSON extension is listed and checked with extension_loaded('json') -> OK

Step 11/30 : RUN php -m
 ---> Running in 44852d8c0c47
[PHP Modules]
Core
ctype
curl
date
dom
fileinfo
filter
gd
hash
iconv
intl
json
libxml
mbstring
openssl
pcre
Phar
readline
Reflection
session
SimpleXML
SPL
standard
tokenizer
xml
xmlwriter
zlib

[Zend Modules]

Removing intermediate container 44852d8c0c47
 ---> 57bde3eba41a
Step 12/30 : RUN php -r "var_dump(extension_loaded('json'));"
 ---> Running in 3b1224fde979
bool(true)
Removing intermediate container 3b1224fde979

But after that when i'm running composer install i'm getting this error because this extension is required in composer.json. Never seen this error before.

Step 25/30 : RUN curl -s https://getcomposer.org/installer | php     && chown -hR nobody:nobody ./composer.phar     && php ./composer.phar --version     && php ./composer.phar install --no-scripts --optimize-autoloader --no-interaction --no-progress     && chown -hR nobody:nobody ./vendor && ls -la ./vendor
 ---> Running in 05ff9bb6c795
Some settings on your machine make Composer unable to work properly.
Make sure that you fix the issues listed below and run this script again:

The json extension is missing.
Install it or recompile php without --disable-json

thanks

@hernandev
Copy link
Member

@gonzaloplaza can you please share the full Dockerfile, either here or by email: [email protected]

@hernandev hernandev reopened this Jan 14, 2021
@gonzaloplaza
Copy link

gonzaloplaza commented Jan 14, 2021

@henzeb just fixed.

I've commented/removed this old line found inside our Dockerfile. Looks like it was causing the problem.

# fix work iconv library with alphine
#RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/community/ --allow-untrusted gnu-libiconv
#ENV LD_PRELOAD /usr/lib/preloadable_libiconv.so php

Thank you

@renodesper
Copy link

Hi, I'm still having issues with PHP 7.4 when using Alpine 3.12. Below is the error that shows up:

PHP Warning:  PHP Startup: Unable to load dynamic library 'fileinfo.so' (tried: /usr/lib/php7/modules/fileinfo.so (Error relocating /usr/lib/php7/modules/fileinfo.so: php_error_docref0: symbol not found), /usr/lib/php7/modules/fileinfo.so.so (Error loading shared library /usr/lib/php7/modules/fileinfo.so.so: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'simplexml.so' (tried: /usr/lib/php7/modules/simplexml.so (Error relocating /usr/lib/php7/modules/simplexml.so: add_next_index_zval: symbol not found), /usr/lib/php7/modules/simplexml.so.so (Error loading shared library /usr/lib/php7/modules/simplexml.so.so: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'tokenizer.so' (tried: /usr/lib/php7/modules/tokenizer.so (Error relocating /usr/lib/php7/modules/tokenizer.so: add_next_index_zval: symbol not found), /usr/lib/php7/modules/tokenizer.so.so (Error loading shared library /usr/lib/php7/modules/tokenizer.so.so: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'xmlwriter.so' (tried: /usr/lib/php7/modules/xmlwriter.so (Error relocating /usr/lib/php7/modules/xmlwriter.so: php_error_docref0: symbol not found), /usr/lib/php7/modules/xmlwriter.so.so (Error loading shared library /usr/lib/php7/modules/xmlwriter.so.so: No such file or directory)) in Unknown on line 0

And this is the Docker file that I use:

FROM alpine:3.12

ADD https://dl.bintray.com/php-alpine/key/php-alpine.rsa.pub /etc/apk/keys/php-alpine.rsa.pub
RUN apk --no-cache add ca-certificates && \
    echo "https://dl.bintray.com/php-alpine/v3.12/php-7.4" >> /etc/apk/repositories
RUN apk --no-cache add composer curl gcc git make musl-dev nginx openssl openssl-dev supervisor tzdata
RUN apk --no-cache add \
    php-ctype \
    php-curl \
    php-dev \
    php-dom \
    php-fileinfo \
    php-fpm \
    php-gd \
    php-iconv \
    php-imagick \
    php-intl \
    php-json \
    php-mbstring \
    php-mysqli \
    php-opcache \
    php-openssl \
    php-pdo \
    php-pdo_mysql \
    php-pear \
    php-redis \
    php-simplexml \
    php-tokenizer \
    php-xdebug \
    php-xmlreader \
    php-xmlwriter \
    php-zip \
    php-zlib \
    php-mongodb
RUN ln -s /usr/bin/php7 /usr/bin/php

WORKDIR /var/www

COPY . /var/www
RUN rm composer.lock && composer install

EXPOSE 80
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]

If those libraries are deprecated. Do you know what I can use to replace it?

@limingxinleo
Copy link
Contributor

php7-zlib is failed to load in php 7.3

/ # apk add php7-zlib
fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/community/x86_64/APKINDEX.tar.gz
fetch https://dl.bintray.com/php-alpine/v3.11/php-7.3/x86_64/APKINDEX.tar.gz
OK: 69 MiB in 90 packages
/ # apk add php-zlib
OK: 69 MiB in 90 packages
/ # php --ri zlib
Extension 'zlib' not present.

hyperf/hyperf-docker#23

@funkjedi
Copy link

@limingxinleo not sure if you resolved this yet but i had the same issue. fix for me was to force the version of php-common being installed. if i didn't it was installing php7-common-7.3.22-r0.

apk add php php-common=7.3 php-zlib

@limingxinleo
Copy link
Contributor

limingxinleo commented Mar 16, 2021

@funkjedi

Thanks, it works.

Could you tell me why it was installing php7-common-7.3.22-r0 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests