Couchbase 4.1.1 installed locally and on server but get different output from servers

I m new couchbase:
The query is same on both the machines:

SELECT language.* FROM nosql where language.type='language'

Output in my cloud server(Ubuntu server 14.0.4):

2016-09-13 22:02:38 - Array
(
    [0] => stdClass Object
        (
            [code] => en
            [created_date] => 11-02-2016 05:56:23
            [directory] => english
            [image] => gb.png
            [language_id] => 1cf0544179dcd27e5de70df2f54b8dbb
            [locale] => en_US.UTF-8,en_US,en-gb,english
            [modified_date] => 11-02-2016 05:56:23
            [name] => English
            [sort_order] => 1
            [status] => 1
            [type] => language
        )

)

Output from my local machine(Ubuntu desktop 14.0.4):

2016-09-13 16:41:57 - stdClass Object
(
    [rows] => Array
        (
            [0] => stdClass Object
                (
                    [code] => en
                    [created_date] => 11-02-2016 05:56:23
                    [directory] => english
                    [image] => gb.png
                    [language_id] => 1cf0544179dcd27e5de70df2f54b8dbb
                    [locale] => en_US.UTF-8,en_US,en-gb,english
                    [modified_date] => 11-02-2016 05:56:23
                    [name] => English
                    [sort_order] => 1
                    [status] => 1
                    [type] => language
                )

    )

[status] => success
[metrics] => Array
    (
        [elapsedTime] => 1.003046379s
        [executionTime] => 1.002993935s
        [resultCount] => 1
        [resultSize] => 447
    )

)

With reference:

Please help me, this getting delayed from going live.

Thanks in advance,
Goutham

Could you report the versions of php extensions?

php -i | grep couchbase -A3

Local:

root@goutham:/opt/couchbase/bin# php -i | grep couchbase -A3
PHP Warning:  Module 'json' already loaded in Unknown on line 0
couchbase

couchbase support => enabled
extension version => 2.2.2
libcouchbase runtime version => 2.6.2 (git: 788e1eeda075eddd8204ecc3fc5028add74e8074)
libcouchbase headers version => 2.6.2 (git: 788e1eeda075eddd8204ecc3fc5028add74e8074)

Directive => Local Value => Master Value
couchbase.log_level => WARN => WARN

ctype

--
PWD => /opt/couchbase/bin
LANG => en_IN
SHLVL => 1
SUDO_COMMAND => /bin/bash
--
_SERVER["PWD"] => /opt/couchbase/bin
_SERVER["LANG"] => en_IN
_SERVER["SHLVL"] => 1
_SERVER["SUDO_COMMAND"] => /bin/bash

Server:

root@intoweb:/opt/couchbase/bin# php -i | grep couchbase -A3
couchbase

Version => 2.1.0

--
PWD => /opt/couchbase/bin
LANG => en_GB.UTF-8
SHLVL => 1
HOME => /root
--
_SERVER["PWD"] => /opt/couchbase/bin
_SERVER["LANG"] => en_GB.UTF-8
_SERVER["SHLVL"] => 1
_SERVER["HOME"] => /root

your server has 2.1.0 version of php extension, and it was backward incompatible change in N1QL result in 2.2.0: http://developer.couchbase.com/server/other-products/release-notes-archives/php-sdk#story-h2-4

1 Like

Thanks issue fixed by installing 2.1.0 and removing json.so from php.ini