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

Failure to load JSON module, even with workaround provided via instructions

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 1.1.2
    • Fix Version/s: None
    • Component/s: docs, library
    • Security Level: Public
    • Labels:
      None

      Description

      On a Centos 5.8 system, I am unable to follow our instructions (http://www.couchbase.com/develop/php/current) to success.

      After setting everything up, I get the following error about JSON:
      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

      This is even after I put the json.so as an extension in the PHP.ini file.

      php -i shows the proper JSON related output:
      ~ $ php -i | grep json
      json
      json support => enabled
      json version => 1.2.1

      I will note that installing via the new PECL method helps to resolve this, but you still get the error if you don't include json.so in the php.ini file.

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

        Activity

        Hide
        sharon Sharon Barr (Inactive) added a comment -

        The user is using PHP 5.4.11 and was following the steps on http://eugenioz.blogspot.com/2013/01/installing-php-54-couchbase-server-20.html

        Show
        sharon Sharon Barr (Inactive) added a comment - The user is using PHP 5.4.11 and was following the steps on http://eugenioz.blogspot.com/2013/01/installing-php-54-couchbase-server-20.html
        Hide
        ingenthr Matt Ingenthron added a comment -

        Note that installing from PECL isn't for a release yet. We do have a snapshot up there though, but that needs to be installed through:

        sudo pecl install channel://pecl.php.net/couchbase-1.1.4

        Show
        ingenthr Matt Ingenthron added a comment - Note that installing from PECL isn't for a release yet. We do have a snapshot up there though, but that needs to be installed through: sudo pecl install channel://pecl.php.net/couchbase-1.1.4
        Hide
        perry Perry Krug added a comment -

        Any progress on figuring out what was going wrong with this server?

        Show
        perry Perry Krug added a comment - Any progress on figuring out what was going wrong with this server?
        Hide
        perry Perry Krug added a comment -

        Any comment/progress on this issue?

        Show
        perry Perry Krug added a comment - Any comment/progress on this issue?
        Hide
        ingenthr Matt Ingenthron added a comment -

        sorry, not at the moment. I did try to ssh to the server at one point, but I think I was too late.

        Can you identify where the user got the php 5.4.11? I can try that on my centos system to see if I can identify the source of the issue.

        Show
        ingenthr Matt Ingenthron added a comment - sorry, not at the moment. I did try to ssh to the server at one point, but I think I was too late. Can you identify where the user got the php 5.4.11? I can try that on my centos system to see if I can identify the source of the issue.
        Hide
        perry Perry Krug added a comment -

        I'm not sure where Sharon's user got php 5.4.11 from, but this is the PHP54 package I had installed on the RightScale system that had this issue reproduced:
        [root@ip-10-197-24-67 ~]# yum info php54
        Loaded plugins: security
        Excluding Packages from none
        Finished
        Available Packages
        Name : php54
        Arch : x86_64
        Version : 5.4.4
        Release : 1.ius.el5
        Size : 3.1 M
        Repo : rightscale-epel
        Summary : PHP scripting language for creating dynamic web sites
        URL : http://www.php.net/
        License : PHP
        Description: PHP is an HTML-embedded scripting language. PHP attempts to make it
        : easy for developers to write dynamically generated web pages. PHP
        : also offers built-in database integration for several commercial
        : and non-commercial database management systems, so writing a
        : database-enabled webpage with PHP is fairly simple. The most common
        : use of PHP coding is probably as a replacement for CGI scripts.
        :
        : The php package contains the module which adds support for the PHP
        : language to Apache HTTP Server.

        What else do you need in order to identify, reproduce and resolve this?

        Show
        perry Perry Krug added a comment - I'm not sure where Sharon's user got php 5.4.11 from, but this is the PHP54 package I had installed on the RightScale system that had this issue reproduced: [root@ip-10-197-24-67 ~] # yum info php54 Loaded plugins: security Excluding Packages from none Finished Available Packages Name : php54 Arch : x86_64 Version : 5.4.4 Release : 1.ius.el5 Size : 3.1 M Repo : rightscale-epel Summary : PHP scripting language for creating dynamic web sites URL : http://www.php.net/ License : PHP Description: PHP is an HTML-embedded scripting language. PHP attempts to make it : easy for developers to write dynamically generated web pages. PHP : also offers built-in database integration for several commercial : and non-commercial database management systems, so writing a : database-enabled webpage with PHP is fairly simple. The most common : use of PHP coding is probably as a replacement for CGI scripts. : : The php package contains the module which adds support for the PHP : language to Apache HTTP Server. What else do you need in order to identify, reproduce and resolve this?
        Hide
        brett19 Brett Lawson added a comment -

        Do we have a RightScale account we can try to use to reproduce this issue?

        Show
        brett19 Brett Lawson added a comment - Do we have a RightScale account we can try to use to reproduce this issue?
        Hide
        trond Trond Norbye added a comment -

        Please ensure that the json extension is loaded before the couchbase extension.

        If you're using a single .ini file it should look like:

        extension=json.so
        extension=couchbase.so

        If you're using multiple ini files you must either ensure their load order, or add extension=json.so before you try to load couchbase.so (and cause it to be loaded "multiple" times).

        Show
        trond Trond Norbye added a comment - Please ensure that the json extension is loaded before the couchbase extension. If you're using a single .ini file it should look like: extension=json.so extension=couchbase.so If you're using multiple ini files you must either ensure their load order, or add extension=json.so before you try to load couchbase.so (and cause it to be loaded "multiple" times).

          People

          • Assignee:
            brett19 Brett Lawson
            Reporter:
            perry Perry Krug
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Gerrit Reviews

              There are no open Gerrit changes