Koozali.org: home of the SME Server

PostgreSQL and phpPgadmin howto (Working but stuck)

Offline mark_s_tt

  • **
  • 37
  • +0/-0
PostgreSQL and phpPgadmin howto (Working but stuck)
« on: February 15, 2007, 07:00:22 PM »
I've installed PostgreSQL using the rpm from the smedev and also installed phpPgadmin in an ibay and all seems to be working well like so:

Code: [Select]

wget http://mirror.contribs.org/smeserver/releases/7/smedev/i386/RPMS/smeserver-postgresql-0.0.1-22.el4.sme.noarch.rpm

yum --enablerepo=base --enablerepo=updates localinstall smeserver-postgresql-0.0.1-22.el4.sme.noarch.rpm
yum --enablerepo=base --enablerepo=updates install php-pgsql

signal-event post-upgrade
signal-event reboot

Add a template fragment so php can see postgresql
mkdir /etc/e-smith/templates-custom/etc/
mkdir /etc/e-smith/templates-custom/etc/php.ini/
vi /etc/e-smith/templates-custom/etc/php.ini/70PgsqlExtension

add the line:
extension=pgsql.so

/sbin/e-smith/expand-template /etc/php.ini
/etc/rc.d/rc7.d/S86httpd-e-smith restart

Create an ibay called "phppgadmin"

Upload phppgadmin to this ibay

Point your web browser at http://yourserver/phppgadmin


I can create users and databases using "su - postgres" and I get the phpPgadmin login screen but can't login. Even after i create a new user I still can't login to phpPgadmin.

Any ideas?

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: PostgreSQL and phpPgadmin howto (Working but stuck)
« Reply #1 on: February 15, 2007, 10:02:37 PM »
Quote from: "mark_s_tt"
I can create users and databases using "su - postgres" and I get the phpPgadmin login screen but can't login. Even after i create a new user I still can't login to phpPgadmin.

Any ideas?
Have a look at the log files of your webbrowser:
  • /var/log/httpd/access_log
  • /var/log/httpd/error_log
Perhaps the /var/log/messages file could also shed some light on this case.

It could well be that there is some script error some where, this can be found in the log files. You could laso consider enabling the PHP displayerrors setting to true, so the browser will display errors when they occur. See this thread for enabling displayerrors (my post of Feb 10).
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

vanceibz

PostgreSQL and phpPgadmin howto (Working but stuck)
« Reply #2 on: May 19, 2007, 02:38:55 PM »
I have installed postgresql as shown, uploaded all files to the phppgadmin  i-bay and can see the login window for phppgadmin, what would the username and password be? to start creating the database...

I have also run the following command:

# su - postgres

# createdb test

# createuser -A -D jesuistest

# exit


The when i do the following it fails to authenticate

# psql test-h localhost -U jesuistest

Hope someone can help, I am trying to install openbravo in the office

vance

vanceibz

PostgreSQL and phpPgadmin howto (Working but stuck)
« Reply #3 on: May 20, 2007, 04:04:17 PM »
I think i have advanced a little with this postgresql , but still can connect, this is the error im getting:

createuser: could not connect to database template1: could not connect to server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket "/tmp/.s.PGSQL.0"?

I have made sure its running and accepting tcp connections