0

I have two servers dev and production, they are pretty simillar. Both have

CentOS 5.6
PHP 5.2.17

Here is installed list:

yum list installed | egrep 'couch|php|mem'
couchbase-server.x86_64                  1.8.0r-1                      installed
libcouchbase-devel.x86_64                2.0.1-1                       installed
libcouchbase1.x86_64                     1.0.1-1                       installed
libcouchbase2.x86_64                     2.0.1-1                       installed
libcouchbase2-core.x86_64                2.0.1-1                       installed
libcouchbase2-libev.x86_64               2.0.1-1                       installed
libmemcached.x86_64                      1.0.4-3.el5                   installed
memcached.x86_64                         1.4.10-1.el5                  installed
php.x86_64                               5.2.17-7.el5                  installed
php-cli.x86_64                           5.2.17-7.el5                  installed
php-common.x86_64                        5.2.17-7.el5                  installed
php-devel.x86_64                         5.2.17-7.el5                  installed
php-eaccelerator.x86_64                  2:0.9.6.1-1.el5               installed
php-fpm.x86_64                           5.2.17-7.el5                  installed
php-mcrypt.x86_64                        5.2.17-7.el5                  installed
php-mysql.x86_64                         5.2.17-7.el5                  installed
php-odbc.x86_64                          5.2.17-7.el5                  installed
php-pdo.x86_64                           5.2.17-7.el5                  installed
php-pear.noarch                          1:1.9.1-1.el5                 installed
php-pecl-memcache.x86_64                 3.0.6-1.el5                   installed
php-pecl-xdebug.x86_64                   2.1.2-1.el5                   installed
php-xml.x86_64                           5.2.17-7.el5                  installed

But i got problem with installing Couchbase PHP client library v.1.1.1 to production server. On dev i installed it and it working normally. But on production server i got this:

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

I already had such errors and know that problem can be in priority of loading php modules. So i set loading couchbase.so right after json.so in json.ini file. But the problem remained.

Guys from Couchbase say to update php to version 5.3, but i can't do this because some soft that we use can't work with php 5.3 normally.

Does anyone have some ideas, how this can be fixed?

Andrey Nikishaev
  • 3,759
  • 5
  • 40
  • 55
  • I found where was the problem. It was in json.so library. I don't know how this can be, because version of libs is similar. But when i copy this lib from dev server to production server(where couchbase lib not working), error gone, and couchbase lib now load normally. – Andrey Nikishaev Dec 19 '12 at 14:20

2 Answers2

1

try to explicitly determine the order of json.so and couchbase.so in php.ini, like this:

extension=json.so
extension=couchbase.so

this works for me!

click
  • 31
  • 1
  • 3
0

Fixed problem with installing php-5.2.17-24 from centalt repo.

cat > /etc/yum.repos.d/centalt.repo << EOF
[CentALT]
name=CentALT Packages for Enterprise Linux 5 - $basearch
baseurl=http://centos.alt.ru/repository/centos/5/$basearch/
enabled=1
gpgcheck=0
EOF

yum install php-common
Andrey Nikishaev
  • 3,759
  • 5
  • 40
  • 55