[PHP] - N1QL Query don't work

I have a problem with my app. I use a web server and a couchbase server (community 4.5).
In my app, when I do a get or upsert, it’s work. But when I do a query on my bucket I have an error:

LCB_CONNECT_ERROR: Error while establishing TCP connection. Enable detailed error codes (via LCB_CNTL_DETAILED_ERRCODES, or via `detailed_errcodes` in the connection string) and/or enable logging to get more information

This is my code :

I change port 8091 to 8080 in static_config file.
When I do a cbq query, I connect to @IP:8080 and it’s work.

I don’t have any ideas to do my query on my php app :slight_smile:

Do you run Couchbase on 8080?

You should use "couchbase://IP" without port

When I do this, I got this for openBucket.

LCB_ETIMEDOUT: Client-Side timeout exceeded for operation. Inspect network conditions or increase the timeout

Could you increase log level and post the logs here?


This is a php log for one try.
I don’t understand because I change moxi_port to 3389 because port 11210 is not open on my server.

php client does not use moxi, it connects to couchbase nodes directly, so you have to make at least ports 8091, 11210 and 8093 accessible for the client PHP process.

More about ports:

1 Like

Ok, thanks for your prompt response.