Warning: pg_connect(): Unable to connect to PostgreSQL server: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL: Peer authentication failed for user "mooadmin" in /var/www/onaslant/register/register_student.php on line 37

Fatal error: Uncaught TypeError: pg_query(): Argument #1 ($connection) must be of type PgSql\Connection, bool given in /var/www/onaslant/register/register_student.php:47 Stack trace: #0 /var/www/onaslant/register/register_student.php(47): pg_query() #1 {main} thrown in /var/www/onaslant/register/register_student.php on line 47