hace tiempo no programo y estoy tratando de hacer un programa personal y me encuentro con el siguiente problema
! ) Fatal error: Call to undefined function pg_pconnect() in C:\wamp\www\Gacnet\Gacnet.Modelo\Bd\Conexion_Postg res.php on line 25
Call Stack
# Time Memory Function Location
1 0.1188 679592 {main}( ) ..\Controlador_login.php:0
2 0.2301 800400 UsuarioDao->buscar_login( ) ..\Controlador_login.php:16
3 0.2301 800760 Conexion_Postgres->select( ) ..\UsuarioDao.php:46
4 0.2301 800760 Conexion_Postgres->Conectar( ) ..\Conexion_Postgres.php:46
y estos son los siguientes archivos
Conexion_postgres.php
Código PHP:
   <?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
 
/**
 * Description of Conexion_Mysql
 *
 * @author Andres Facturacion
 */
class Conexion_Postgres{
    //put your code herevar $conexion;
       var $conexion;
        var $consulta;
        var $descripcion;
 
        public function Conectar()
        {
          $host              = "localhost";
          $nombre_base_datos = "Gacnet_Morelco";
          $puerto            = "5432";
          $nombre_usuario    = "postgres";
          $contrasena        = "postgres";
          $this->conexion = pg_connect("host=$host port=$puerto dbname=$nombre_base_datos user=$nombre_usuario password=$contrasena") or die ("fALLO LA CONEXION A LA BASE DE DATOS");
        }
  //creacion de metodo insercion de datos(insert)
         function insertar($tabla, $valores)
            {
                   $this->Conectar();
                   $sSql='INSERT INTO '.$tabla.' VALUES ('.$valores.')';
                  $this->consulta=@pg_query($this->conexion,$sSql);
                  if(pg_errormessage())
                  {
                      return "ERROR: AL INSERTAR REGISTRO ".$sSql;
                  }
                   else
                   {
                       pg_query($this->conexion,"COMMIT");
                       return "OK";
                   }
            }
   //creacion de metodo de consulta(select)
            function select($campos, $tabla, $condicion, $orden)
            {
                   $this->Conectar();
                   $sSql='SELECT '.$campos.' FROM '.$tabla.' ';
                   if($condicion!="")
                   {
                       $sSql=$sSql."WHERE ".$condicion." ";
                   }
                   if($orden!="")
                   {
                       $sSql=$sSql."ORDER BY ".$orden;
                   }
                   $this->consulta=pg_query($this->conexion,$sSql);
                   if(pg_errormessage())
                   {
                       echo pg_errormessage()."CONSULTA = ".$sSql;
                   }
                          return $this->consulta;
            }
            //creacion de metodo de consulta(select)
            function fecha($fecha,$nmes)
            {
                   $this->Conectar();
                   $sSql="SELECT ADD_MONTHS('".$fecha."',".$nmes.")";
                $this->consulta=pg_query($this->conexion,$sSql);
                if(pg_errormessage())
                  {
                      return "ERROR: AL AUMENTAR LA FECHA ".$sSql;
                  }
                   else
                   {
                       pg_query($this->conexion,"COMMIT");
                   }
                          return $this->consulta;
            }
 
  //metodo que devuelve la cantidad de datos que arrojo la consulta(select)
                 function retorna_descripcion($campos, $tabla, $condicion, $orden)
            {
                   $this->Conectar();
                   $this->descripcion="";
                   $this->consulta=$this->consulta($campos, $tabla, $condicion, $orden);
                   while($row=pg_fetch_row($this->consulta))
                   {
                       $this->descripcion=$row[0];
                   }
                   return $this->descripcion;
            }
  //metodo que devuelve el valor de  una secuencia
            function retorna_netxval($seq)
            {
                $this->Conectar();
                   $this->descripcion="";
                   $sSql="SELECT NEXTVAL('".$seq."')";
                   $this->consulta=pg_query($this->conexion,$sSql);
                   while($row=pg_fetch_row($this->consulta))
                   {
                       $this->descripcion=$row[0];
                   }
                   return $this->descripcion;
            }
                /*Realizar actualizacion*/
            function actualizar($tabla, $valores, $condicion)
            {
                   $this->Conectar();
                   $sSql="UPDATE ".$tabla." SET ".$valores." WHERE ".$condicion;
                $this->consulta=pg_query($this->conexion,$sSql);
                if(pg_errormessage())
                  {
                      return "ERROR: AL ACTUALIZAR EL REGISTRO ".$sSql;
                  }
                   else
                   {
                       pg_query($this->conexion,"COMMIT");
                       return "OK";
                   }
            }
 
            /*Realizar borrado de datos*/
            function eliminar($tabla, $condicion)
            {
                   $this->Conectar();
                   $sSql="DELETE FROM ".$tabla." WHERE ".$condicion;
                $this->consulta=pg_query($this->conexion,$sSql);
                   if(pg_errormessage())
                  {
                      return "ERROR: AL ELIMINAR EL REGISTRO ".$sSql;
                  }
                   else
                   {
                       pg_query($this->conexion,"COMMIT");
                       return "OK";
                   }
            }
 
 
 
 
 
 
        public function ejecutarSentencia($sql)
        {
          $this->Conectar();
          $this->consulta =@pg_query($this->conexion,$sql);
          return $this->consulta;
        }
 
        public function cerrarBase()
        {
            //pg_free_result($this->consulta);
            pg_close($this->conexion);
        }
 
 
}
?>    Código PHP:
   <?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
 
/**
 * Description of UsuarioDao
 *
 * @author Andres Facturacion
 */
include_once '../../Gacnet.Modelo/Bd/Conexion_Postgres.php';
class UsuarioDao {
    //put your code here
    public function UsuarioDao(){
        $this->db= new Conexion_Postgres();
    }
 public function buscar_login($usu, $pass)
    {
         $con=$this->db->select("*","gn_usuario","gn_usu_usuario='".$usu."' and gn_usu_clave='".$pass."'","");
         if ($con!=NULL)
               {
                return true;
               }
    else {
            return false;
        }
         $this->db->cerrarBase();
    }
}
?>    Código PHP:
   <?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
include_once '../../Gacnet.Modelo/Dao/UsuarioDao.php';
include_once '../Vo/UsuarioVo.php';
session_start();
// creamos los objetos de dao y vo
$dao=new UsuarioDao();
$vo=new UsuarioVo();
 
$vo->setlogin($_POST["usuario"]);
$vo->setpass($_POST["pass"]);
//realizamos la consulta
$res=$dao->buscar_login($vo->getlogin(), $vo->getpass());
//verificamos la resuesta
if($res==true)
    {
     $_SESSION['usu']=$vo->getlogin();
     header("Location:../../Gacnet.Vista/Menu_Principal.php");
    }
 else{
      session_destroy();
      header("Location:../../index.php");
     }
 
?>    de antemano gracias por su colaboracion
 


