- Saved searches
- Use saved searches to filter your results more quickly
- Unable to use homebrew to install phpredis. #1341
- Unable to use homebrew to install phpredis. #1341
- Comments
- Solution
- Saved searches
- Use saved searches to filter your results more quickly
- Unable to load dynamic library ‘redis.so’ on php8.1 with igbinary #2056
- Unable to load dynamic library ‘redis.so’ on php8.1 with igbinary #2056
- Comments
- Expected behaviour
- Actual behaviour
- I’m seeing this behaviour on
- Steps to reproduce, backtrace or example script
- Saved searches
- Use saved searches to filter your results more quickly
- PHP Startup: Unable to load dynamic library ‘redis.so’ #213
- PHP Startup: Unable to load dynamic library ‘redis.so’ #213
- Comments
- Expected Behavior
- Current Behavior
- Possible Solution
- Steps to Reproduce (for bugs)
- Context
- Your Environment
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 use homebrew to install phpredis. #1341
Unable to use homebrew to install phpredis. #1341
Comments
Homebrew-php is deprecated/deleted/dead as a dodo.
Homebrew-core is now the thing.
brew install php70-redis (or any version) is no longer present.
Whilst it isn’t directly phpredis’s issue what some third party package manager has done, I’m hoping someone here knows the right magic to install this extension, ideally via homebrew (but not necessary if an easier option is available).
The text was updated successfully, but these errors were encountered:
I realised that once I realised phpredis and pecl/redis are the same. Any reason why the names aren’t consistent?
pecl install redis results in this:
Build process completed successfully Installing '/usr/local/Cellar/php/7.2.7/pecl/20170718/redis.so' Warning: mkdir(): File exists in System.php on line 294 Warning: mkdir(): File exists in /usr/local/Cellar/php/7.2.7/share/php/pear/System.php on line 294 ERROR: failed to mkdir /usr/local/Cellar/php/7.2.7/pecl/20170718
Solution
Because /usr/local/Cellar/php/7.2.7/pecl is not a directory. It’s a symlink to /usr/local/lib/php/pecl
The solution to that is that the pecl that’s being used is in /usr/local/Cellar/php/7.2.7/bin/pecl , and not the 7.2.7/pecl file, so that symlink can be removed, and a directory created.
For those who bump into this problem.
Double check which pecl and what that file is pointing to, etc.
One issue I ran into is that pecl install redis dumped extension=»redis.so» at the top of my php.ini`. This was invalid, and gave me an error like this:
Warning: PHP Startup: Unable to load dynamic library 'redis.so' (tried: /usr/local/lib/php/pecl/20170718/redis.so (dlopen(/usr/local/lib/php/pecl/20170718/redis.so, 9): image not found), /usr/local/lib/php/pecl/20170718/redis.so.so (dlopen(/usr/local/lib/php/pecl/20170718/redis.so.so, 9): image not found)) in Unknown on line 0
I removed the extension=»redis.so» line and instead created /usr/local/etc/php/7.2/conf.d/ext-redis.ini with:
extension="/usr/local/Cellar/php/7.2.9_2/pecl/20170718/redis.so"
$ find your php; for me it was /usr/local/etc/php/7.1/conf.d/
$ navigate there and:
cat >> ext-redis.ini extension=»/usr/local/Cellar/php@7.1/7.1.25/pecl/20160303/redis.so»
AyeCaramba
$ brew services restart php@7.1
version in the above
extension=»/usr/local/Cellar/php@7.1/7.1.25/pecl/20160303/redis.so»
may differ to make sure to double check that path.
One issue I ran into is that pecl install redis dumped extension=»redis.so» at the top of my php.ini`. This was invalid, and gave me an error like this:
Warning: PHP Startup: Unable to load dynamic library 'redis.so' (tried: /usr/local/lib/php/pecl/20170718/redis.so (dlopen(/usr/local/lib/php/pecl/20170718/redis.so, 9): image not found), /usr/local/lib/php/pecl/20170718/redis.so.so (dlopen(/usr/local/lib/php/pecl/20170718/redis.so.so, 9): image not found)) in Unknown on line 0
I removed the extension=»redis.so» line and instead created /usr/local/etc/php/7.2/conf.d/ext-redis.ini with:
extension="/usr/local/Cellar/php/7.2.9_2/pecl/20170718/redis.so"
I got the same issue and until I saw this comment and it works.
Default location is totally wrong lol
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 ‘redis.so’ on php8.1 with igbinary #2056
Unable to load dynamic library ‘redis.so’ on php8.1 with igbinary #2056
Comments
Expected behaviour
Actual behaviour
I’m seeing this behaviour on
$ pecl install igbinary // 3.2.7
$ pecl install zstd
$ pecl install redis
Steps to reproduce, backtrace or example script
[13-Jan-2022 20:34:31] NOTICE: PHP message: PHP Warning: PHP Startup: Unable to load dynamic library ‘redis.so’ (tried: /usr/local/lib/php/pecl/20210902/redis.so (dlopen(/usr/local/lib/php/pecl/20210902/redis.so, 0x0009): symbol not found in flat namespace ‘_igbinary_serialize’), /usr/local/lib/php/pecl/20210902/redis.so.so (dlopen(/usr/local/lib/php/pecl/20210902/redis.so.so, 0x0009): tried: ‘/usr/local/lib/php/pecl/20210902/redis.so.so’ (no such file), ‘/usr/local/lib/redis.so.so’ (no such file), ‘/usr/lib/redis.so.so’ (no such file))) in Unknown on line 0The 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
PHP Startup: Unable to load dynamic library ‘redis.so’ #213
PHP Startup: Unable to load dynamic library ‘redis.so’ #213
Comments
Expected Behavior
Enable redis support in PHP in thecodingmachine/php:7.4-v3-slim-fpm
Current Behavior
Container crashing on start or giving constant errors on load.
Possible Solution
As discussed in #200 maybe add delay or other order of loading
Steps to Reproduce (for bugs)
ARG PHP_EXTENSIONS="apcu mysqli pdo_mysql ldap redis intl imap" ARG NODE_VERSION=10 FROM thecodingmachine/php:7.4-v3-slim-fpm as php7.4-base-node10
php: container_name: 'php' build: context: ./php environment: PHP_EXTENSION_REDIS: 1 PHP_EXTENSION_GETTEXT: 1 PHP_EXTENSION_PDO: 1 PHP_EXTENSION_PDO_MYSQL: 1 PHP_EXTENSION_LDAP: 1 PHP_EXTENSION_INTL: 1
php | PHP Warning: PHP Startup: Unable to load dynamic library 'redis.so' (tried: /usr/lib/php/20190902/redis.so (/usr/lib/php/20190902/redis.so: undefined symbol: igbinary_serialize), /usr/lib/php/20190902/redis.so.so (/usr/lib/php/20190902/redis.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 php | /usr/local/bin/docker-entrypoint-as-root.sh: line 129: supercronic: command not found php | PHP Warning: PHP Startup: Unable to load dynamic library 'redis.so' (tried: /usr/lib/php/20190902/redis.so (/usr/lib/php/20190902/redis.so: undefined symbol: igbinary_serialize), /usr/lib/php/20190902/redis.so.so (/usr/lib/php/20190902/redis.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 php | bash: line 2: syntax error near unexpected token `(' php | bash: line 2: `Warning: PHP Startup: Unable to load dynamic library 'redis.so' (tried: /usr/lib/php/20190902/redis.so (/usr/lib/php/20190902/redis.so: undefined symbol: igbinary_serialize), /usr/lib/php/20190902/redis.so.so (/usr/lib/php/20190902/redis.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0'
When disabling PHP_EXTENSION_REDIS: 0 it starts:
php | [16-Oct-2020 09:34:05] NOTICE: fpm is running, pid 1845 php | [16-Oct-2020 09:34:05] NOTICE: ready to handle connections php | [16-Oct-2020 09:34:05] NOTICE: systemd monitor interval set to 10000ms
On another container that has redis in ARG PHP_EXTENSIONS i get this error everytime i do something in console with php:
PHP Warning: PHP Startup: Unable to load dynamic library 'redis.so' (tried: /usr/lib/php/20190902/redis.so (/usr/lib/php/20190902/redis.so: undefined symbol: igbinary_serialize), /usr/lib/php/20190902/redis.so.so (/usr/lib/php/20190902/redis.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
Context
Im trying to enable redis support in the image. If i turn off redis PHP_EXTENSION_REDIS: 0 i wont get any errors, but if I turn it on, it will either crash on start or if it runs, php will give error when trying to use redis for connection.
Similar problem discussed here #200 but i didn’t find any solution.
Your Environment
- Version used: thecodingmachine/php:7.4-v3-slim-fpm
- Operating System and version: Native Linux Ubuntu 20.04 and aslo Windows 2004 with WSL2 Ubuntu 20.04 and Docker for windows
The text was updated successfully, but these errors were encountered:
Hi @mbrodala thanks for your response, I use docker-compose up -d with this
version: '3.1' services: php: build: context: ./php args: - PHP_ROOT_DIR=/usr/local/etc environment: TEMPLATE_PHP_INI: development PHP_EXTENSION_GETTEXT: 1 PHP_EXTENSION_PDO: 1 PHP_EXTENSION_PDO_MYSQL: 1 PHP_EXTENSION_LDAP: 1 PHP_EXTENSION_INTL: 1 PHP_EXTENSION_REDIS: 1 volumes: - ./project:/var/www/html - ./logs/php:/usr/local/etc/logs - ./logs/php:/usr/local/var/log
If i run «docker-compose run php -d» it will give me error also:
❯ docker-compose run php -d Creating network "toolbox_default" with the default driver Creating toolbox_php_run . done PHP Warning: PHP Startup: Unable to load dynamic library 'redis.so' (tried: /usr/lib/php/20190902/redis.so (/usr/lib/php/20190902/redis.so: undefined symbol: igbinary_serialize), /usr/lib/php/20190902/redis.so.so (/usr/lib/php/20190902/redis.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 /usr/local/bin/docker-entrypoint-as-root.sh: line 129: supercronic: command not found PHP Warning: PHP Startup: Unable to load dynamic library 'redis.so' (tried: /usr/lib/php/20190902/redis.so (/usr/lib/php/20190902/redis.so: undefined symbol: igbinary_serialize), /usr/lib/php/20190902/redis.so.so (/usr/lib/php/20190902/redis.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 bash: line 2: syntax error near unexpected token `(' bash: line 2: `Warning: PHP Startup: Unable to load dynamic library 'redis.so' (tried: /usr/lib/php/20190902/redis.so (/usr/lib/php/20190902/redis.so: undefined symbol: igbinary_serialize), /usr/lib/php/20190902/redis.so.so (/usr/lib/php/20190902/redis.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0'