[imp] IMP 2.2.7/RH 7.1/PostgreSQL

Eduardo Del Valle edelvall@amersol.edu.pe
Fri, 30 Nov 2001 23:55:51 +0500 (GMT-5)


Extracted from the On-line Documentation:
Title: Horde/IMP Database Installation Guide

"... The username we use for the most part is 'hordemgr', or, in the case of 
PostgreSQL, it's the name of the  user who runs your web server (nobody on most 
systems, www-data on stock Debian Systems)."

Try that and let me know, because I'm also having some problems with the 
database interaction. I have a similar installation as your.

Hopefully this helps.

Eduardo Del Valle

Quoting Gary Akers <gla@naxs.com>:

> variety of error messages and can't save preferences
> seen this before?  anyone successful with this
> combination of rpm versions using the 2.2.7
> 7.x RPMs downloaded from horde.
> 
> RedHat 7.1  fully patched  --all these are from RH
> apache-1.3.19-5         **runs as user apache
> freetype-2.0.1-4
> (N/A) mod_php --phpinfo says it's already there 4.1
> php-4.0.pl1-9
> php-imap-4.0.4pl1-9
> postgresql-7.0.3-8      **horde database is user "hordemgr"
> php-pgsql-4.0.4pl1
> 
> horde/test.php3 checks out ok, but IMP *apparently*
> doesn't have access to the horde SQL database.  detailed
> errors below.  currently speculating that the database
> should be owned by user "apache" instead of "hordemgr"
> investigating how to change the owner of the database.
> 
> [the assumption of no database access is probably incorrect
> the contacts are apparently saved between sessions]
> 
> The last time I did this was with tarballs on Caldera 1.3.1
> and 2.3.1 boxes. This time I am using the horde postgresql
> set of RPMs with the following from the redhat distribution:
> 
>        **at top after attempting to add a contact**
> Warning: 4 is not a valid PostgreSQL link resource in
> /var/www/html/horde/imp/lib/db.pgsql on line 82
> 
>         **at top on a compose window**
> Warning: 5 is not a valid PostgreSQL link resource in
> /var/www/html/horde/imp/lib/db.pgsql on line 113
> v
> ? self, even I'm not sure where I saw this
> Warning: 7 is not a valid PostgreSQL link resource in
> /var/www/html/horde/imp/lib/db.pgsql on line 139
> 
>       **when opening the preferences this is in "signature" box
> <br>
> <b>Warning</b>:  4 is not a valid PostgreSQL link resource in
> <b>/var/www/html/horde/imp/lib/db.pgsql</b> on line <b>139</b><br>
> 
>       *this is in "full name" box*
> <br><b>Warning</b>:  6 is not a valid PostgreSQL link resource in
> <b>/var/www/html/horde/imp/lib/db.pgsql</b> on line <b>113</b><br>
> 
>        *when saving full name in preferences*
>        *at first no apparent error "preferences were updated"
>        *when opening preferences again same as
>        *above, but when trying to save again
> Warning: 5 is not a valid PostgreSQL link resource in 
> /var/www/html/horde/imp/lib/db.pgsql on line 222
> Warning: Cannot add header information - headers already sent by (output
> 
> started at /var/www/html/horde/imp/lib/db.pgsql:222) in 
> /var/www/html/horde/imp/templates/doctype.inc on line 8
> An error occured; your signature was not updated.
> 
>         *The contents of /var/www/horde-phplib/local.inc
>         *has been edited to reflect the password change
>         *and the port number specified in postmaster.opt
> 
> relevant snipit of local.inc:
> # gla 11-28-01 set empty tcp port string and set password to match
> postgresql
> user hordemgr
> /* To use an SQL database, uncomment and edit the following: */
> class HordeDB extends DB_Sql {
>    var $Host = 'localhost';
>    var $Database = 'horde';
>    var $User = 'hordemgr';
>    var $Password = 'newpasswd';
>    var $Port = '5432';
> 
>      *The contents of my /var/lib/pgsql/data/postmaster.opts
>      *indicates port 5432(from localhost).  Here it is
>      *(the -i means accept TCP/IP ie., PGALLOWTCPIP=yes,
>      *but incoming will be rejected by ipchains):
> 
> /usr/bin/postmaster
> -p 5432
> -D /var/lib/pgsql/data
> -B 64
> -b /usr/bin/postgres
> -i
> -N 32
> 
> but I'm unable to verify what port it is listening on
> other than the horde/test.ph3 "test horde" indicates
> sessions are working when local.inc is set to use port
> 5432 and doesn't when it is left ' '
> later verified /tmp/.s.PGSQL.5432, but still haven't
> started a telnet daemon long enough to check.
> 
> *****apache runs as user apache   data is owned by "hordemgr"
> I don't know if user apache can connect to the horde database
> seems unlikely, but it isn't clear why horde checks out ok,
> and IMP can't access
> 
> [root@yin horde]#   strings /var/lib/pgsql/data/pg_shadow
> hordemgr
> newpasswd
> hordemgr
> hordemgr#C
> postgres
> 
> The contents of /var/www/html/horde/imp/config/defaults.php3 below:
> but I have noted that when I also set it's db_server_port entry
> to use port "5432" imp won't load at all and fails immediately
> after login with a page full of errors.  It starts up fine with
> db_server_port='' but that isn't obvious why.
> v
> [root@yin config]# cat defaults.php3
> <?php
> /* file: defaults.php3 */
> /* setup.php3 by Jason "ZeroDiVide" Orcutt < zerodiv@atcjet.net > */
> /* For debugging purposes */
> $default->error_level                    = 15;
> /* The longest that things like file uploads and slow functions */
> /* should be allowed to run. 0 means run until termination */
> /* (forever if infinite loop). */
> /* NOTE: you can't set this to 0 if safe_mode is on. */
> $default->max_execution_time             = 0;
> /* gla 11-29-01  the imp box */
> /* Server Specific Configuration */
> $default->localhost                      = '130.130.130.9';
> /* Web Server Configuration */
> $default->root_url                       = '/horde/imp';
> $default->include_dir                    = './templates';
> $default->graphics_url                   = '/horde/imp/graphics';
> /* Default IMAP Server Configuration */
> $default->server                         = '130.130.130.22';
> $default->from_server                    = 'nowhere.edu';
> $default->port                           = '143';
> /* Default IMAP Folder Configuration */
> $default->folders                        = 'mail/';
> $default->use_imap_subscribe             = false;
> $default->show_dotfiles                  = false;
> $default->save_sent_mail                 = true;
> $default->sent_mail                      = 'sent-mail';
> $default->postponed                      = 'drafts';
> /* Ldap searching */
> $default->use_ldap_search                = false;
> /* Server list : user is presented with a list */
> /* of available imap servers */
> $default->use_server_list                = false;
> /* User changeable items */
> $default->user_change_server             = false;
> $default->user_change_folder             = false;
> $default->user_change_from               = false;
> $default->user_change_fullname           = true;
> $default->user_use_addressbook           = true;
> /* Check For New Mail Configuration */
> $default->newmail_popup                  = true;
> $default->refresh_delay                  = '300';
> /* External Binaries Configuration */
> $default->path_to_sendmail               = '/usr/sbin/sendmail';      
> /*
> Sendmail */
> $default->path_to_ispell                 = '/usr/bin/ispell';         /*
> ISpell
> */
> $default->path_to_mswordview             = '/usr/bin/wvHtml';     /*
> M$WordView
> */
> $default->path_to_tar                    = '/bin/tar';            /* Tar
> */
> /* Cyrus Configuration */
> $default->personal_folders               = '';    /* i.e. INBOX. */
> /* Default Language Configuration */
> $default->language                       = 'en';
> /* Message Configuration */
> $default->append_header                  = false;
> $default->append_trailer                 = false;
> /* Text Viewing */
> $default->text_parts_inline              = true;
> /* Database Configuration */
> $default->use_db                         = true;
> $default->database_driver                = 'pgsql';
> $default->db_user_name                   = 'hordemgr';
> $default->db_password                    = 'newpasswd';
> $default->db_security_nag                = true;
> $default->db_name                        = 'horde';
> $default->db_server_name                 = 'localhost';
> $default->db_pref_table                  = 'imp_pref';
> $default->db_address_table               = 'imp_addr';
> $default->db_connect_string              = '';
> /* gla 11-28-01  explicitly set server port? */
> $default->db_server_port                 = '';
> $default->db_server_options              = '';
> $default->db_server_tty                  = '';
> ?>
> ---end---
> 
> 
> 
> 
> -- 
> IMP mailing list: http://horde.org/imp/
> Archive: http://marc.theaimsgroup.com/?l=imp&r=1&w=2
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: imp-unsubscribe@lists.horde.org
>