Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

DannyLlamuca's avatar

deploy database connection

Hello good day, I am deploying a Laravel 10 project in digitalocean, I am trying to connect to a database that is on an external server. but I have this error and I already declared the environment variables for the connection

SQLSTATE[08006] [7] invalid integer value "${db.HOSTNAME}" for connection option "port" (Connection: pgsql, SQL: select * from "tpersona" where "cedpersona" = 0602165913 limit 1)

0 likes
1 reply
Tray2's avatar

It clearly states that you have a string instead of a int in your env file where you specify the port for the database.

Please or to participate in this conversation.