I’m having issues connecting to any database from my php/symfony application
when I try to connect to pg_connect("host=localhost port=5432 dbname=dbname user=username");
the app just dies with no error in any logs.
If I try the same connection without host specified pg_connect("port=5432 dbname=dbname user=username");
it connects successfully. I would need to connect to other db servers, so need to specify the host.
I can connect to same database in command line using psql without any issues. I tried searching everywhere but nothing seems to be working or cannot figure whats the issue. I recently upgraded to Sonoma and believe thats when it started happening.
Versions: MacOS 14.5, PHP , PostgreSQL 14 server, Homebrew 4.1.21; Apple Mac M1
I reinstalled php and postgresql with no luck
I also updated the setting of listen_addresses in my postgresql.conf to ‘*’
also, verified the pg_hba.conf config trust properties.
Expecting to connect to database.