php connection cannot establish to postgresql on linode

I create Database Clusters postgresql on linode service.
I try to connect database by Navicat it working fine!!
But when I try my web application php it cannot establish a connection.

I already setup 0.0.0.0/0 on access manage .

How can i do?

3 Replies

A post with, essentially, "I did this and it doesn't work" in it is not going to get much response:

  • What error are you getting?

  • What log entries are being generated?

  • A snippet of your code might be helpful.

Post each between the appropriate Markdown marker: a line containing ``` (3 backtick characters…the backtick character is next to the 1 on your keyboard).

-- sw

I download a ca certificate (from database server) then I upload this ca to my php server .
then I add this text to my php postgresql connection string : "sslmode=verify-full sslrootcert=/var/app/current/mcscloudca.crt"

I still get error message :
Warning: pg_connect(): Unable to connect to PostgreSQL server: SSL SYSCALL error: Connection reset by peer FATAL

I dunno what to tell you… You're doing something wrong. Postgres doesn't like your TLS credentials so it's failing to set up the secure connection.

  • Did you verify usernames/passwords?

  • Did you verify the validity of your certificate?

  • Did you Google the error message?

-- sw

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct