1. Home >
  2. Apps >
  3. Groups >

How to connect to postgre database using php in xampp?

Question asked by Manish Goyal in #Databases on Mar 12, 2011
Manish Goyal
Manish Goyal · Mar 12, 2011
Rank A2 - PRO
I am facing problem in connecting to postgre database in xampp

when try to execute the following script

It is showing me an unexpected error ie undefined function pg_connect()

Here is the script

<?php
$conexion = pg_connect("host=localhost port=5432 password=*** user=postgres dbname=***") or die('Can't connect!!!: ' . pg_last_error());
?>
Posted in: #Databases
Manish Goyal
Manish Goyal · Mar 12, 2011
Rank A2 - PRO
AHH
26 view but no reply

Anyway i got the solution ,

For this you have to modify php.ini file that you can search in xampp folder

You must log-in or sign-up to reply to this post.

Click to Log-In or Sign-Up