Skip to content

Loading…

Unable to load dynamic library '/usr/local/php/lib/php/extensions/no-debug-zts-20100525/redis.so' #271

Open
shenzhe opened this Issue · 10 comments

7 participants

@shenzhe

Unable to load dynamic library '/usr/local/php/lib/php/extensions/no-debug-zts-20100525/redis.so'

my php ZTS Enabled

@nicolasff

Hello,

Is there any other message that might help diagnose the issue?

Thanks.

@shenzhe

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/service/php_pthreads/lib/php/extensions/no-debug-zts-20100525/redis.so' - /usr/local/service/php_pthreads/lib/php/extensions/no-debug-zts-20100525/redis.so: undefined symbol: executor_globals in Unknown on line 0

@michael-grunder
phpredis member

Hey,

Do you have multiple copies of PHP on the system? This can happen if you build an extension against the wrong PHP headers. If it's not an issue of pointing to the correct PHP headers, you can always make sure that you're doing a clean rebuild.

Can you try cloning phpredis into a new directory and then doing another rebuild?

@Anubhavjain8

Hellos,
I am also facing the same issue. I have tried on a fresh box. php been compiled with --enable-maintainer-zts too. shanzhe or michael have you figure out the solution ?

@michael-grunder
phpredis member

I have a couple of questions:

What version of PHP are you running, and how did you build it (the ./configure command mostly)
How did you build phpredis (shared extension it would seem if it's looking for an .so)

You can try running this sequence (for phpredis) to make sure the .so file gets to the right place.

make clean
phpize
./configure
make
sudo make install

Typically this is a problem if phpredis is built with the wrong PHP headers, or some other make/install error in general.

Cheers,
Mike

@frangeris

@michael-grunder You're just right! :+1:

@shenzhe just make a fresh compilation with your new php version, make sure to run make clean before phpize && ./configure

hope help :)

@BigShaby

It seems I have the same problem.
(1) I have finished installing the phpredis, and the redis.so is install in /usr/lib64/php/modules.
(2) It's work when my Apache working under 'prefork' model.
(3) Now I switch my Apache to 'worker' model, and restart apache by command 'apachectl restart', it shows ' class Redis undefine' and error_log of apache shows '/usr/lib64/php-zts/modules/redis.so' not found.
(4) I try copy the redis.so to '/usr/lib64/php-zts/modules/redis.so', error_log shows ''/usr/lib64/php-zts/modules/redis.so: undefined symbol: executor_globals in Unknown on line 0'
Still don't know how to fix it.

@remicollet

NTS and ZTS build are not compatible.

Which distro is this ? Seems a RPM base one, should look in my repo where both NTS and ZTS extension are available (Fedora, RHEL, CentOS, php 5.4, 5.5 and 5.6).

@BigShaby

@remicollet

It's Red Hat, and PHP is installed by yum.
$ cat /proc/version
"Linux version 3.4.83-70.111.amzn1.x86_64 (mockbuild@gobi-build-31003) (gcc version 4.6.3 20120306 (Red Hat 4.6.3-2) (GCC) ) #1 SMP Fri Mar 14 08:05:54 UTC 2014"
$ php -v
PHP 5.4.23 (cli) (built: Dec 16 2013 18:54:22)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
with eAccelerator v1.0-dev, Copyright (c) 2004-2012 eAccelerator, by eAccelerator
Here are my questions:
Can I add ZTS support without recompiling source code of PHP?
Which addons is needed by ZTS?

@remicollet

@BigShaby I think we are now out of topic here.

but
1/ you are not running Red Hat (not a RH kernel, not a RH PHP version and not a RH gcc version, seems to be a heavily altered Amazon OS)
2/ you are using an outdated unsecure PHP version
3/ you should ask the provider of the PHP packages
4/ according to your previous comment if you have /usr/lib64/php-zts/modules directory, you have ZTS support in PHP
5/ again you could find PHP and redis package in my repo http://rpms.famillecollet.com/ but without warranty on something so much different from RHEL / CentOS (so back to 3)
6/ ZTS is usually a bad idea... see http://fr2.php.net/manual/en/install.unix.apache2.php

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.