Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2005
    Location
    Mumbai, India
    Posts
    161

    Unanswered: [SOLVED] FATAL: no pg_hba.conf entry for host

    Just one line code:
    PHP Code:
    <?php
    $test
    =pg_connect("host=localhost dbname=somedb user=someuser password=someuser");
    ?>
    I get this Error :

    Warning: pg_connect() [function.pg-connect]: Unable to connect to PostgreSQL server: FATAL: no pg_hba.conf entry for host "xxx.xx.xxx.xxx", user "someuser", database "someuser", SSL off in /xxx...xxx/www/test.php on line 2

    Anyone know whats wrong ? This cant be a PHP problem because my code works fine on my PC thats why Im asking this in this forum and not a PHP one.

    Thanks
    Last edited by anjanesh; 03-10-05 at 04:03.

  2. #2
    Join Date
    Feb 2005
    Posts
    5
    Hi

    Sometime you can allow the access to postgre for only certain IP addresses and restrict others. You have to change the allowed host settings in postgre server.

  3. #3
    Join Date
    Feb 2005
    Location
    Mumbai, India
    Posts
    161
    Thanks. I contacted my host and found that it wasnt localhost - it was on a central server and I had to change that.
    Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •