Jump to content
  • Revista PROGRAMAR: Já está disponível a edição #60 da revista programar. Faz já o download aqui!

Sign in to follow this  
watt

erro ao ligar a uma BD postgre

Recommended Posts

watt

boas pessoal,

estou a desenvolver um site em que o tenho de ligar a uma bd em postgre. quando utilizo o pgadmin consigo ligar ao servidor, mas quando o tento fazer na minha pagina dá erro.

Warning: pg_connect() [function.pg-connect]: Unable to connect to PostgreSQL server: could not connect to server: Connection timed out Is the server running on host "xx.xx.xx.xx" and accepting TCP/IP connections on port 5432? in /public_html/r1/index.php on line 13

Could not open connection to database server

no file pg_hba.conf

tenho nos acessos:

host all all 0.0.0.0/0 trust

alguém sabe como posso resolver este erro? atenção que o site está num servidor e a BD noutro.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.