IMP 2.2.7 unable to connect to remote postgres server
Brian Helman
bhelman@salemstate.edu
Thu, 07 Feb 2002 12:33:45 -0500
I tried unsuccessfully for over a week to get IMP 3.0 to work with our IMAP
server (Execmail). It would connect and access the inbox fine, but I was
unable to get it to recognize other folders.
Our 2.2.4 installation works fine. Lately, we've been experiencing some
odd behavior on the server (RH7.0). Since I couldn't get IMP3.0 to work,
I've decided for now to upgrade to RH7.2 and put IMP2.2.7 on it.
I have install 2.2.7 on an RH7.2 installation on a spare computer. I have
been unable to get the new 2.2.7 install (server name George) to access the
database on the 2.2.4 install (server name Bill). If I issue "psql -h
bill.salemstate.edu -U newpguser -d horde" from George's command-line, it
works fine, so I am fairly confident that hba_conf is configured fine (oh
yeah, the database is Postgresql). I have edited
.../imp/config/defaults.php3 :
$default->use_db = true;
$default->database_driver = 'pgsql';
$default->db_user_name = 'newpguser';
$default->db_password = 'jefferson';
$default->db_security_nag = true;
$default->db_name = 'horde';
$default->db_server_name = 'bill.salemstate.edu';
$default->db_pref_table = 'imp_pref';
$default->db_address_table = 'imp_addr';
$default->db_connect_string = '';
$default->db_server_port = '';
$default->db_server_options = '';
$default->db_server_tty = '';
but I still get
Warning: Unable to connect to PostgreSQL server: connectDBStart() --
connect() failed: Connection refused Is the postmaster running (with -i) at
'localhost' and accepting connections on TCP/IP port 5432? in
/var/www/horde-phplib/db_pgsql.inc on line 40
Warning: Supplied argument is not a valid PostgreSQL link resource in
/var/www/horde-phplib/db_pgsql.inc on line 52
Warning: Supplied argument is not a valid PostgreSQL link resource in
/var/www/horde-phplib/db_pgsql.inc on line 55
Warning: Supplied argument is not a valid PostgreSQL link resource in
/var/www/horde-phplib/db_pgsql.inc on line 67
when I try to fire up george.salemstate.edu/horde/imp .
Any suggestions?
BTW, before I made George a 2.2.7 server, it was running 2.2.4 accessing
the postgresql database off of Bill.
thanks,
brian
>From marco@cs.muw.edu Date: Thu, 7 Feb 2002 11:36:24 -0600
Return-Path: <marco@cs.muw.edu>
Mailing-List: contact imp-help@lists.horde.org; run by ezmlm
Delivered-To: mailing list imp@lists.horde.org
Received: (qmail 33651 invoked from network); 7 Feb 2002 17:40:10 -0000
Received: from support.muw.edu (209.147.208.16)
by clark.horde.org with SMTP; 7 Feb 2002 17:40:10 -0000
Received: (from apache@localhost)
by support.muw.edu (8.11.6/8.11.6) id g17HaPl22366
for imp@lists.horde.org; Thu, 7 Feb 2002 11:36:25 -0600
X-Authentication-Warning: support.muw.edu: apache set sender to marco@cs.muw.edu using -f
Received: from 209.147.208.18 ( [209.147.208.18])
as user marco@cs.muw.edu by support.muw.edu with HTTP;
Thu, 7 Feb 2002 11:36:24 -0600
Message-ID: <1013103384.3c62bb18dcfa3@support.muw.edu>
Date: Thu, 7 Feb 2002 11:36:24 -0600
From: Marco Obaid <marco@cs.muw.edu>
To: imp@lists.horde.org
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
User-Agent: Internet Messaging Program (IMP) 3.0
Subject: Undoing Realms--RESOLVED
Thank you for all the responses. Here is the solution and it is TESTED on two
systems and it works beautifully. I am not an SQL guru, someone may want to
write a script to do the steps I followed. Thanks Jon for the tip.
ISSUE: Changing 'realms' in imp/conf/servers.php without affecting users
settings. I am assuming that you are using MySql and Apache
Solution:
For the sake of simplicity, I will be using my domain 'muw.edu' which was
inserted in servers.php as 'realm' which will be changed to ''.
PLEASE BACKUP YOUR SQL DATABASE BEFOR YOU GO ANY FURTHER
1. Stop the webserver to prevent users from changing things.
2. at the prompt, type mysql ---> for simplicity, user:root and no password
3. connect horde
4. type at mysql> the following:
UPDATE horde_prefs SET pref_uid = substring(pref_uid, 1, locate('@',pref_uid) -
1) where locate('@', pref_uid) > 0;
This will change anything with user@realm ---> user
***Note*** If you want undo the realms for one server and not others, you need
to tweak this command; otherwise, you may run into problems. I had one user in
the database who had enteries in two different realms and it was a challenge.
5. Do the same procedure for kronolith_events and turba_objects tables
For example, the statement for turba object will be:
UPDATE turba_objects SET pref_uid = substring(owner_id, 1, locate
('@',owner_id) - 1) where locate('@', owner_id) > 0;
and for kronolith_events, it will be:
UPDATE kronolith_events SET pref_uid = substring(calendar_id, 1, locate
('@',calendar_id) - 1) where locate('@', calendar_id) > 0;
6. Restart your SQL server and HTTP server.
7. Test it ...
That's all
____________________________________________________________
_/ _/ _/ _/ _/ _/ | Marco Obaid
_/_/ _/_/ _/ _/ _/ _/ | Network Administrator
_/ _/ _/ _/ _/ _/ _/ _/ | McDevitt Hall
_/ _/ _/ _/ _/_/ _/_/ | W-Box 1621
_/ _/ _/_/_/ _/ _/ | Columbus MS 39701
____________________________________________________________
M I S S I S S I P P I U N I V E R S I T Y F O R W O M E N
---------------------------------------------------------------
This mail sent is through MUW Webmail: http://webmail.MUW.Edu/
For the latest MUW Events, visit http://www.muw.edu/calendar