Uploaded image for project: 'Couchbase PHP client library'
  1. Couchbase PHP client library
  2. PCBC-112

"undefined symbol: php_json_decode in Unknown on line 0" when load couchbase.so library

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Incomplete
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: library
    • Security Level: Public
    • Labels:
      None
    • Environment:

      Description

      Affects Versions:
      1.0.6-1
      1.1.0dp9-1

      Here are steps to reproduce error in version 1.0.6-1, (version 1.1.0dp9-1 is similar):
      1. create file /etc/yum.repos.d/couchbase.repo

      [couchbase]
      name = Couchbase package repository

      1. baseurl = http://packages.couchbase.com/rpm/6.2/x86_64
        baseurl = http://packages.couchbase.com/preview/rpm/5.5/x86_64
        gpgcheck=0

      2. yum install libcouchbase1

      3.

      1. wget http://packages.couchbase.com/clients/php/php-ext-couchbase-1.0.5-centos62-x86_64.tar.gz
      2. tar xzf php-ext-couchbase-1.0.5-centos62-x86_64.tar.gz
      3. cp php-ext-couchbase/couchbase.so /usr/lib64/php/modules/

      4. add the following line to /etc/php.d/json.ini:
      extension=couchbase.so

      5. # service php-fpm restart
      Stopping php-fpm: [ OK ]
      Starting php-fpm: [10-Sep-2012 17:42:45] NOTICE: PHP message: 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_decode in Unknown on line 0
      [ OK ]

      No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

        Hide
        alkavan Igal Alkon added a comment - - edited

        I just had the same issue when install on CentOS 6.3
        the solution thanhbv offered worked although all tested failed !
        i did:
        make install
        mv /etc/php.d/json.ini /etc/php.d/0json.ini

        then phpinfo();
        [root@null ~]# php phpinfo.php | grep couch
        /etc/php.d/couchbase.ini,
        couchbase
        couchbase support => enabled
        couchbase.compression_factor => 1.3 => 1.3
        couchbase.compression_threshold => 2000 => 2000
        couchbase.compressor => none => none
        couchbase.durability_default_poll_interval => 100000 => 100000
        couchbase.durability_default_timeout => 40000000 => 40000000
        couchbase.serializer => php => php
        couchbase.view_timeout => 75 => 75
        OLDPWD => /root/php-ext-couchbase
        _SERVER["OLDPWD"] => /root/php-ext-couchbase

        Using the compiled one from the site did not work.

        Show
        alkavan Igal Alkon added a comment - - edited I just had the same issue when install on CentOS 6.3 the solution thanhbv offered worked although all tested failed ! i did: make install mv /etc/php.d/json.ini /etc/php.d/0json.ini then phpinfo(); [root@null ~] # php phpinfo.php | grep couch /etc/php.d/couchbase.ini, couchbase couchbase support => enabled couchbase.compression_factor => 1.3 => 1.3 couchbase.compression_threshold => 2000 => 2000 couchbase.compressor => none => none couchbase.durability_default_poll_interval => 100000 => 100000 couchbase.durability_default_timeout => 40000000 => 40000000 couchbase.serializer => php => php couchbase.view_timeout => 75 => 75 OLDPWD => /root/php-ext-couchbase _SERVER ["OLDPWD"] => /root/php-ext-couchbase Using the compiled one from the site did not work.
        Hide
        ingenthr Matt Ingenthron added a comment -

        See tracking of support of PHP 5.4 in PCBC-151.

        Show
        ingenthr Matt Ingenthron added a comment - See tracking of support of PHP 5.4 in PCBC-151 .
        Hide
        ingenthr Matt Ingenthron added a comment -

        Though, I should have said, I think in this original bug, there were multiple issues. I'm going to close this one and open a specific issue for support of PHP 5.4.

        Show
        ingenthr Matt Ingenthron added a comment - Though, I should have said, I think in this original bug, there were multiple issues. I'm going to close this one and open a specific issue for support of PHP 5.4.
        Hide
        ingenthr Matt Ingenthron added a comment -

        Correct, needs to be reopened.

        A workaround for now would be to download the PHP 1.0.6 source, build, test and release. Source is available from:
        https://github.com/couchbase/php-ext-couchbase/archive/1.0.6.tar.gz

        The included README covers how to build/test. It does require a php development environment, which is a separate package on RH. Usually I think it's php54-devel, but I'd have to check.

        Show
        ingenthr Matt Ingenthron added a comment - Correct, needs to be reopened. A workaround for now would be to download the PHP 1.0.6 source, build, test and release. Source is available from: https://github.com/couchbase/php-ext-couchbase/archive/1.0.6.tar.gz The included README covers how to build/test. It does require a php development environment, which is a separate package on RH. Usually I think it's php54-devel, but I'd have to check.
        Hide
        perry Perry Krug added a comment -

        So this needs to be reopened right? because it requires us to build a specific a package for RHEL 5.4?

        Show
        perry Perry Krug added a comment - So this needs to be reopened right? because it requires us to build a specific a package for RHEL 5.4?

          People

          • Assignee:
            Unassigned
            Reporter:
            thanhbv thanhbv
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Gerrit Reviews

              There are no open Gerrit changes