How to connect to postgre database using php in xampp?

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

$conexion = pg_connect("host=localhost port=5432 password=*** user=postgres dbname=***") or die('Can't connect!!!: ' . pg_last_error());
?>

Replies

  • Manish Goyal
    Manish Goyal
    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 are reading an archived discussion.

Related Posts

My classmates and I had talked about this.. can anyone tell me why the sea is salty??!😕
Volvo's usually a known name in the luxury buses in India. Volvo's entered the high-end car market in India with Volvo S60. The price is Rs. 27,00,000/- (Ex. Showroom, Delhi)....
CEans, I'm wondering if someone can take this project. The idea is to simplify the 'posting' process for those who are new to forums. I'm thinking why can't we setup...
I recently made few additions to the site. Anyone wants to 'share' what's new on CE and tell me whether you 'like' it? 😀
The Ultimate Hackers!! 😁 Enjoy the video!! [video=youtube;0L7DTMKekoU]https://www.youtube.com/watch?v=0L7DTMKekoU[/video]