fixed random failing of pg_connect after refreshing the page
detected that pg_connect failure is due to crash.rave.org itself, and not a problem in the coding. Currently using localhost as host