$conn_string = "host=x.x.x.x port=5432 dbname=xxxx user=COMPAX password=xxxx";
$connect = pg_connect($conn_string);
RESULT:
Warning: pg_connect() [function.pg-connect]: Unable to connect to PostgreSQL server: Password authentication failed for user 'COMPAX' . in xxx on line 4