Ver Mensaje Individual
  #9 (permalink)  
Antiguo 22/03/2012, 12:20
Montes28
 
Fecha de Ingreso: septiembre-2010
Mensajes: 1.853
Antigüedad: 13 años, 7 meses
Puntos: 6
Respuesta: problema con PDO

gildus gracias por responder hice

Código PHP:
Ver original
  1. $db = new PDO("pgsql:host=$servidor;port=$port;dbname=$bd;user=$usuario;password=$contrasenia");

pero me aparece el siguiente error

Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[08006] [7] could not connect to server: Permission denied Is the server running on host "localhost" and accepting TCP/IP connections on port 5432?' in /var/www/html/calendario/models/login_Model.php:6 Stack trace: #0 /var/www/html/calendario/models/login_Model.php(6): PDO->__construct('pgsql:host=loca...') #1 /var/www/html/calendario/controllers/login_Controller.php(6): require('/var/www/html/c...') #2 /var/www/html/calendario/index.php(67): login_users() #3 {main} thrown in /var/www/html/calendario/models/login_Model.php on line 6

no se que mas hacer