[imp] problem setting up RC3
Aaron Solochek
aarons@aberrant.org
Wed, 19 Dec 2001 22:45:36 -0500
I can't figure out where its getting set to 0. It was being set in an
apache config file to /var/tmp/imp, which doesn't exist, so I changed it:
php_flag session.save_path /tmp
It's also being set here:
sausage:/etc/php4#grep -r save_path *
apache/php.ini:session.save_path = /tmp
cgi/php.ini:session.save_path = /tmp
However, it's still 0 after I restarted apache.
Any other places I might check?
-Aaron
Brent J. Nordquist wrote:
> On Wed, 19 Dec 2001, Aaron Solochek <aarons@aberrant.org> wrote:
>
>
>>the site is https://www.aberrant.org/imp
>>
>
> OK, that's somewhat helpful. I went to:
>
> http://www.aberrant.org/horde/test.php
>
> The first thing to note is that when you reload the page, that little
> session counter with the "1" isn't incrementing. That appears to be
> because PHP's session handling isn't configured correctly:
>
> http://www.aberrant.org/horde/test.php?mode=phpinfo
>
> Look under the "session" section at session.save_path and see that it's
> set to "0" instead of "/tmp". You'll definitely need to fix that, if
> nothing else. Figure out where that's getting set (Apache configs or
> php.ini file).
>
>
>>http will work for /horde, but there is no /imp link on the non secure
>>server.
>>
>
> Hm. Not sure quite what you mean, but make sure that imp is contained
> within the horde directory, either:
>
> http://www.aberrant.org/horde/ -> horde/
> http://www.aberrant.org/horde/imp/ -> horde/imp/
>
> or:
>
> http://www.aberrant.org/ -> horde/
> http://www.aberrant.org/imp/ -> horde/imp/
>
> Your configuration files will differ for those two cases, of course; just
> be consistent. You don't want this, e.g.:
>
> http://www.aberrant.org/horde/ -> horde/
> http://www.aberrant.org/imp/ -> horde/imp/
>
>
>From gla@naxs.com Date: 2001-08-13 23:39:59
Return-Path: <gla@naxs.com>
Mailing-List: contact imp-help@lists.horde.org; run by ezmlm
Delivered-To: mailing list imp@lists.horde.org
Received: (qmail 40550 invoked from network); 20 Dec 2001 03:48:47 -0000
Received: from mailrtr04.ntelos.net (216.12.0.104)
by clark.horde.org with SMTP; 20 Dec 2001 03:48:47 -0000
Received: from host187.naxs.com (pm3wythe3-218.wythe.naxs.com [216.98.71.218])
by mailrtr04.ntelos.net (8.12.1/8.12.1) with ESMTP id fBK3mJgG009982
for <imp@lists.horde.org>; Wed, 19 Dec 2001 22:48:19 -0500
Message-Id: <4.3.2.7.2.20011219220108.00c8a630@pop3.norton.antivirus>
X-Sender: gla/mail.naxs.com@pop3.norton.antivirus
X-Mailer: QUALCOMM Windows Eudora Version 4.3.2
Date: Wed, 19 Dec 2001 22:40:07 -0500
To: imp@lists.horde.org
From: Gary Akers <gla@naxs.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
Subject: [update -->RH7.2] IMP 2.2.7/RH 7.1/PostgreSQL
[upgraded IMP 2.2.7/PostgreSQL Redhat 7.1 test
box to fully patched RedHat 7.2] . . .any caveats
before I go live next week? . . .are pg_pconnect
calls ok now with php 4.06?
v
for the archives: the work-a-round for the 7.1
problem below was to "put the p back" in the
pg_"p"connect statements in db_pgsql.inc and
db.pgsql. (apparently another ver of php had
the opposite problem). That was problematic
because the "p" was taken out with good reason,
but the pg_connect function seemed to be
completely broken in the php-4.0.pl1-9 for RH7.1.
v
I was also seeing a few Segmentation faults
in my apache error logs.
v
After a bunch of dep failures (including a
php-pgsql ver mismatch) while trying to upgrade
php , it seemed easier to do a full upgrade to
RH7.2. Being new to PostgreSQL, I didn't dump
my data first, and rh-pgdump.sh didn't work for me,
so it being just test data I deleted and recreated the
horde database. The new postgreSQL didn't
have the -i switch on by default [like I *think*
the last one did] and an edit to postgresql.conf
fixed that. Now my only postgreSQL options
are -D /var/lib/pgsql/data and "-i" but noted that
only "-D /var/lib/pgsql/data" shows up in
postmaster.opts for this ver.
v
. . .so far no Seg faults, but I've left the pg_pconnect
calls in for now. What do you think about the
security/reliability of leaving the pg_pconnect
calls in for php 4.06? A jump to 3.x would
be better for an over summer move for my
users. I'm finally upgrading from 2.0.11 because
I.E. 6.0 is belligerent with 2.0.11 and it is
becoming so "popular" its 8x Inbox reads
are choking me.
---end---
>Date: Fri, 30 Nov 2001 21:27:32 -0500
>To: imp@lists.horde.org
>From: Gary Akers <gla@naxs.com>
>Subject: IMP 2.2.7/RH 7.1/PostgreSQL
>
>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---
At 12:58 PM 12/1/01 -0600, you wrote:
>On Sat, 1 Dec 2001, Eric Jon Rostetter <eric.rostetter@physics.utexas.edu>...:
> > > > Warning: 5 is not a valid PostgreSQL link resource in
> > > > /var/www/html/horde/imp/lib/db.pgsql on line 113
> > So my point is, you might try to remove the persistent pgsql
> > connections and see if they go away. Some old messages on the list
> > can help you do this, but basically it is removing the "p" character
> > from some calls (I think it means changing pconnect to connect, but my
> > memory may not be 100%).
>
>That's it exactly. Check the lists; remove the "p".
After checking the pg_[p]connect lines in
/var/www/html/horde/imp/lib/db.pgsql that came from imp-2.2.7-1rh7 and
/var/www/html/horde/imp/lib/db.pgsql from horde-1.2.7-1rh7
I found that they were *already* using pg_connect.
v
Changing them back to pg_pconnect made the more immediate
problem go away.
v
After learning what to search for in the archives, I found
Subject: Re: [imp] Debian security update broke imp
Date: 2001-08-13 23:39:59
which indicates that a "bug in php" prevents pg_pconnect
from working. I'll have to investigate further to see if the
bug which prevents postgresql connections from being
closed is still there (the bug that probably led the developers
to take the "p" out) in my combination of installed rpms
and if that is a security problem as well as a performance/stability
issue. What do you think? Is this apparent requirement
for persistent connections a bug or a RedHat/PHP/Apache/php-pgsql
configuration issue?
v
RedHat 7.1 fully patched
apache-1.3.19-5 **runs as user apache
freetype-2.0.1-4
(N/A) mod_php phpinfo says it's already there
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
c-client 4.1
---end---
having started from scratch on a no-php, no-sql,
no-anything-that-would-help-make-imp-work caldera
1.3 box a while back, the rpms are easier even with
all this trouble.
--------------------------------------------------------------------------------