That still doesn't answer my question why you are using an outdated and non-supported version.
"cannot establish the connection"
is not a valid Postgres error message.
Is there any message in the Postgres logfiles?
Did you set up pg_hba.conf correctly to allow connections from your application?
Are you sure your webserver/application server is up and running?
The "cannot establish the connection" could also be a browser error message indicating that is (the browser) is not able to contact your webserver/application server.
And if you are currently running 7.4.26 why do you want to download an even older release?