Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

HOWTO: Install phpPgAdmin to support Postgresql db's using C

Discussion in 'General Discussion' started by ozzi4648, Oct 24, 2002.

  1. ozzi4648

    ozzi4648 Guest

    [quote:10015b0c2a][i:10015b0c2a]Originally posted by iminteractive[/i:10015b0c2a]

    I'll try the rpm method, tho I would have preffered to do it from source. I already have the --with-pgsql=/usr as per the tutorial in the URL you gave me.. I was reffering to the ./config when you compile postgre from source, but I suppose I won't need that with the RPM install. Anyways.. here I go.[/quote:10015b0c2a]

    Or from source

    ./configure
    gmake
    su
    gmake install
    adduser postgres
    mkdir /usr/local/pgsql/data
    chown postgres /usr/local/pgsql/data
    su - postgres
    /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
    /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data &logfile 2&&1 &
    /usr/local/pgsql/bin/createdb test
    /usr/local/pgsql/bin/psql test

    If its not installed on your server.
     
  2. haze

    haze Well-Known Member

    Joined:
    Dec 21, 2001
    Messages:
    1,550
    Likes Received:
    3
    Trophy Points:
    318
    Lol, I had the install fine, its just the customer ./configure.. forget it.. its installed now!

    Anyways, everything is running fine now, thank for all the info!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. ozzi4648

    ozzi4648 Guest

    [quote:d47f846fdb][i:d47f846fdb]Originally posted by iminteractive[/i:d47f846fdb]

    Lol, I had the install fine, its just the customer ./configure.. forget it.. its installed now!

    Anyways, everything is running fine now, thank for all the info![/quote:d47f846fdb]

    Great, so you can get into phppgadmin from all sites?
     
  4. dgbaker

    dgbaker Well-Known Member PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,574
    Likes Received:
    3
    Trophy Points:
    343
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    The installs seemed to have gone fine (Great instructions) although I'm getting the following in the browser

    &You do not have postgresql support built into your PHP Web Server.
    phpPgAdmin requires postgresql support to function properly!
    Please check the PHP documentation for corrective action.&

    I did follow the instructions to the letter (I thought) what am I missing?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. dgbaker

    dgbaker Well-Known Member PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,574
    Likes Received:
    3
    Trophy Points:
    343
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    Okay, I've got past that error and am now getting the following when trying to run psql at the command line

    psql: FATAL 1: Missing or erroneous pg_hba.conf file, see postmaster log for details

    But it does exist. /var/lib/pgsql/data/pg_hba.conf

    It looks correct. In the browser phppgadmin does give the login screen but cannot login probably due to the fatal error with psql.

    Any help is appreciated. Installs where mostly done through whm rpm installer except for phppgadmin.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #25 dgbaker, Oct 26, 2002
    Last edited: Apr 11, 2003
  6. ozzi4648

    ozzi4648 Guest

    [quote:56975c3d06][i:56975c3d06]Originally posted by dgbaker[/i:56975c3d06]

    The installs seemed to have gone fine (Great instructions) although I'm getting the following in the browser

    &You do not have postgresql support built into your PHP Web Server.
    phpPgAdmin requires postgresql support to function properly!
    Please check the PHP documentation for corrective action.&

    I did follow the instructions to the letter (I thought) what am I missing?[/quote:56975c3d06]

    What your missing is this!

    A working version of php, 4.x.x compiled '--with-pgsql=shared' or '--with-pgsql=/usr'

    Your php is not compile using '--with-pgsql=/usr'. Go back to my site, at the top of the tutorial you will find information on how to compile php using the above options.
     
  7. ozzi4648

    ozzi4648 Guest

    [quote:c8d28d0daa][i:c8d28d0daa]Originally posted by dgbaker[/i:c8d28d0daa]

    Okay, I've got past that error and am now getting the following when trying to run psql at the command line

    psql: FATAL 1: Missing or erroneous pg_hba.conf file, see postmaster log for details

    But it does exist. /var/lib/pgsql/data/pg_hba.conf

    It looks correct. In the browser phppgadmin does give the login screen but cannot login probably due to the fatal error with psql.

    Any help is appreciated. Installs where mostly done through whm rpm installer except for phppgadmin.

    Thanks
    David
    Virtual-Hosting dot CA
    http://www.virtual-hosting.ca
    [/quote:c8d28d0daa]

    I know what you did: Here look this is what i said:

    Change the follow statement from:

    local all trust
    host all 127.0.0.1 255.255.255.255 trust

    to

    local all crypt
    host all 127.0.0.1 255.255.255.255 crypt

    BE CAREFUL WITH NEWLINES!!!! IF YOU ADD THEM YOU COULD RENDER THIS FILE IN-OPERABLE!

    Reload the file using vi or pico and place your cursor to the end of the lines, crypt. Make sure that you dont have an extra space after the two crypt words above. You just added an extra space or something. Save the file and see if that works. See my warning above!
     
  8. dgbaker

    dgbaker Well-Known Member PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,574
    Likes Received:
    3
    Trophy Points:
    343
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    ozzi4648 - I did have it -

    Build Date Oct 26 2002 13:16:30
    Configure Command './configure' '--with-gettext' '--with-xml' '--enable-sockets' '--with-mysql' '--with-config-file-path=/usr/local/cpanel/3rdparty/etc' '--prefix=/usr/local/cpanel/3rdparty' '--with-pgsql=/usr/local/pgsql'

    I got around that part but still have the &fatal error& - Missing or erroneous pg_hba.conf file, see postmaster log for details

    I cannot though find a postmaster log file.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. dgbaker

    dgbaker Well-Known Member PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,574
    Likes Received:
    3
    Trophy Points:
    343
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    Okay I redid and rechecked the pg_hba.conf file, no extra spaces and it is word for word space by space as listed in your comments.

    Still- no go same fatal error. It seems like psql does not know where the file is.
    Mine is located in /var/lib/psql/data
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. ozzi4648

    ozzi4648 Guest

    [quote:ae727c18a8][i:ae727c18a8]Originally posted by dgbaker[/i:ae727c18a8]

    ozzi4648 - I did have it -

    Build Date Oct 26 2002 13:16:30
    Configure Command './configure' '--with-gettext' '--with-xml' '--enable-sockets' '--with-mysql' '--with-config-file-path=/usr/local/cpanel/3rdparty/etc' '--prefix=/usr/local/cpanel/3rdparty' '--with-pgsql=/usr/local/pgsql'

    I got around that part but still have the &fatal error& - Missing or erroneous pg_hba.conf file, see postmaster log for details

    I cannot though find a postmaster log file.
    [/quote:ae727c18a8]

    See these two statements that you changed

    local all crypt
    host all 127.0.0.1 255.255.255.255 crypt

    Make sure there are no extra spaces after the words CRYPT

    So your cursor should be here when saving that file

    local all crypt|&--- HERE
    host all 127.0.0.1 255.255.255.255 crypt|&----- HERE

    Got it!
     
  11. dgbaker

    dgbaker Well-Known Member PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,574
    Likes Received:
    3
    Trophy Points:
    343
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    I got it working! I cp -R the var location to usr/local and it worked.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  12. ozzi4648

    ozzi4648 Guest

    [quote:2e84c5ba8e][i:2e84c5ba8e]Originally posted by dgbaker[/i:2e84c5ba8e]

    Okay I redid and rechecked the pg_hba.conf file, no extra spaces and it is word for word space by space as listed in your comments.

    Still- no go same fatal error. It seems like psql does not know where the file is.
    Mine is located in /var/lib/psql/data

    [/quote:2e84c5ba8e]

    Can you change --with-pgsql=/usr/local/pgsql' to '--with-pgsql=/usr'?
     
  13. ozzi4648

    ozzi4648 Guest

    [quote:eefb6dc2bc][i:eefb6dc2bc]Originally posted by dgbaker[/i:eefb6dc2bc]

    I got it working! I cp -R the var location to usr/local and it worked.[/quote:eefb6dc2bc]

    Great, and btw that where you were supposed to install it! My docs said wget the file to /usr/local DUH!
     
  14. dgbaker

    dgbaker Well-Known Member PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,574
    Likes Received:
    3
    Trophy Points:
    343
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    sorry, but I used the rpm install in whm. My bad -

    &Next time when I tell you to install in a certain directory, by god you better do it!&

    There I said it for you :))

    Thank you for the help and patience. Best support around is on this board.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  15. haze

    haze Well-Known Member

    Joined:
    Dec 21, 2001
    Messages:
    1,550
    Likes Received:
    3
    Trophy Points:
    318
    [quote:d1cfafd8cb][i:d1cfafd8cb]Originally posted by ozzi4648[/i:d1cfafd8cb]

    [quote:d1cfafd8cb][i:d1cfafd8cb]Originally posted by iminteractive[/i:d1cfafd8cb]

    Lol, I had the install fine, its just the customer ./configure.. forget it.. its installed now!

    Anyways, everything is running fine now, thank for all the info![/quote:d1cfafd8cb]

    Great, so you can get into phppgadmin from all sites? [/quote:d1cfafd8cb]

    Indeed. Thanks so much for your help! :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  16. dgbaker

    dgbaker Well-Known Member PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,574
    Likes Received:
    3
    Trophy Points:
    343
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    ozzi4648;

    I've been able to get a new URL for phpPgAdmin to work in side a a theme.

    Using javascript Openwindow without the location bar hides everything. When setting up a pgadmin user I make sure the password is the same as one on there account. So the URL ends up looking like this.

    &cpanel print=&DOMAIN&&/phppgadmin/index.php?set_username=&cpanel print=$user&&set_password=&cpanel print=$password&&login_submit=Login
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  17. ozzi4648

    ozzi4648 Guest

    Hey thanks, thats very nice to know. Maybe we can give ol Nick a shove and have him ad phpPgAdmin and postgresql to his distribution and into the CP.
     
  18. haze

    haze Well-Known Member

    Joined:
    Dec 21, 2001
    Messages:
    1,550
    Likes Received:
    3
    Trophy Points:
    318
    That kind of makes things a little complicated when the customer changes there password and the phppgadmin pass it still the same tho. Good idea however.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  19. dgbaker

    dgbaker Well-Known Member PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,574
    Likes Received:
    3
    Trophy Points:
    343
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    Yea I know that part is a pain. I'm try to work out a way that when the user does a password change it passes it to phpPgAdmin as well.

    I let you know if I figure it out.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  20. haze

    haze Well-Known Member

    Joined:
    Dec 21, 2001
    Messages:
    1,550
    Likes Received:
    3
    Trophy Points:
    318
    Looks like your domain expired. Do you have plans to renew the domain or put it up on a new site, could use the how-to right about now :)

    BTW, I'd be happy to host it for you if needed.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice