CrazyEngineers
  • How to connect to postgre database using php in xampp?

    Manish Goyal

    Manish Goyal

    @manish-r2Hoep
    Updated: Oct 22, 2024
    Views: 1.1K
    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());
    ?>
    0
    Replies
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Replies
  • Manish Goyal

    MemberMar 12, 2011

    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
    Are you sure? This action cannot be undone.
    Cancel
Home Channels Search Login Register