Difficulties connecting to postgresql database (SOLVED)

Hi guys, can anyone help me. I’m having problems connecting to the PostgreSql database. it doesn’t say it couldn’t find the driver and so I can’t make the connection to my remote machine. obs: I put all the data correctly and I have PostgreSql installed.

Hi.
Are you able to connect to the DB using a third-party DB app like DBeaver?

im using windows 11

yes

only through wappler that I can’t, and that’s why I’m unable to access my application locally on windows, but when I put it online it works normally

You’re not using Docker, right?

Your PHP installation is missing the PostgreSQL driver, you need to check your php.ini

Edit: But does phpPgAdmin work?

So, I'm not using docker. So how can I do it?

and i am using laragon as apache server

Edit your project/target settings like below:

in the local application where it will be used the application will not use docker

Ok, then you need to figure out how to make your PHP load the PostgreSQL extension/driver. Sadly, I can’t help you here as I don’t use Laragon :frowning:

I can recommend you to check your php.ini and enable the PostgreSQL driver/extension

Enabling such driver would allow your PHP scripts to execute functions like pg_connect(), which is needed for PostgreSQL connections

I managed to solve

With Laragon itself I managed to put the postgres driver in PHP.ini

2 Likes