SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Sep 2000
    Location
    London, UK
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Once again, problems problems problems!

    I'm using the following command to login in to a PostgreSQL database using PHP, and I constantly get an error on incorrect password (in the example below 'yada'), but I KNOW the password is correct, and I can't find anything in my database config that might be restricting me access. Has anyone got any ideas. The syntax i'm using is:

    pg_connect("dbname=abc123 host=hostname user=booboo password=yada")

    Thanks in advance for any help!

    Jon

  2. #2
    ********* wombat firepages's Avatar
    Join Date
    Jul 2000
    Location
    Perth Australia
    Posts
    1,717
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    looks fine to me - this is my postgressql connection test (if/when I have to use it)

    <html>
    <body>

    <?php
    $dbDatabase = "dbname";
    $dbServer = "servername";
    $dbUserName = "username";
    $dbPassword = "*****";
    $conn = pg_connect ( "dbname=$dbDatabase
    host=$dbServer
    user=$dbUserName
    password=$dbPassword" );
    if (!$conn) {
    print "bugger can not connect to database - where is MySQL?.";
    exit;
    } else { echo "connected";}

    ?>

    </body></html>


Bookmarks

Posting Permissions

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