[imp] Errors making PHP --with-imap --with-cyrus

Gary Weinreb gweinreb@rocksolidsystems.com
Thu, 05 Sep 2002 03:07:15 -0400


Thanks, Ilya.

I have gotten things working, and I am using CVS, though from a week or so 
ago.  I'll bring it up to date over the next few days and incorporate 
this.  Thanks much for your followthrough.


Regards,
Gary

At 01:39 AM 9/5/2002 -0400, Ilya wrote:
>the driver now in CVS Head, if you dont use CVS it probably wont be a good
>idea to use it.
>this is what you have to have in you horde/conf/conf.php:
>
>----------------------------------------------------------------------------
>conf['auth']['driver'] = 'composite';
>$conf['auth']['params'] = array();
>$conf['auth']['params']['drivers'] = array();
>$conf['auth']['params']['app'] = 'imp';
>$conf['auth']['params']['drivers']['imp'] = array();
>$conf['auth']['params']['drivers']['imp']['driver'] = 'application';
>$conf['auth']['params']['drivers']['imp']['params'] = array();
>$conf['auth']['params']['drivers']['imp']['params']['app'] = 'imp';
>$conf['auth']['params']['drivers']['cyrsql'] = array();
>$conf['auth']['params']['drivers']['cyrsql']['driver'] = 'cyrsql';
>$conf['auth']['params']['drivers']['cyrsql']['params'] = array();
>$conf['auth']['params']['drivers']['cyrsql']['params']['phptype'] = 'mysql';
>$conf['auth']['params']['drivers']['cyrsql']['params']['hostspec'] = '';
>//sql hostname
>$conf['auth']['params']['drivers']['cyrsql']['params']['protocol'] = 'tcp';
>$conf['auth']['params']['drivers']['cyrsql']['params']['username'] = '';
>//sql username
>$conf['auth']['params']['drivers']['cyrsql']['params']['password'] = '';
>//sql password
>$conf['auth']['params']['drivers']['cyrsql']['params']['database'] = '';
>//sql database
>$conf['auth']['params']['drivers']['cyrsql']['params']['cyradmin'] = '';
>//imap admin username
>$conf['auth']['params']['drivers']['cyrsql']['params']['cyrpass'] = '';
>//imap admin password
>$conf['auth']['params']['drivers']['cyrsql']['params']['imaps'] =
>'{localhost:993/imap/ssl/novalidate-cert}';//imap server
>$conf['auth']['params']['drivers']['cyrsql']['params']['folders'] = ('any' ,
>'subfolders', 'to be created'); //when you add new user
>$conf['auth']['params']['admin_driver'] = 'cyrsql';
>$conf['auth']['params']['loginscreen_switch'] = '_horde_select_loginscreen';
>$conf['auth']['params']['drivers']['cyrsql']['loginscreen_switch'] =
>'_horde_select_loginscreen';
>
>function _horde_select_loginscreen() {
>     return 'imp';
>}
>
>------------------------------------------------------------
>----- Original Message -----
>From: "Gary Weinreb" <gweinreb@rocksolidsystems.com>
>To: "Ilya" <mail@krel.org>; <imp@lists.horde.org>
>Sent: Wednesday, September 04, 2002 2:52 PM
>Subject: Re: [imp] Errors making PHP --with-imap --with-cyrus
>
>
> > Thanks Jeremy and Ilya.
> >
> > That made things easier...<g>
> > I occasionally make things more difficult than they need to be...
> >
> > Ilya, I somehow failed to subscribe to the horde list, amongst the several
> > I did subscribe to, a matter I've rectified.
> > The archives are sectioned, and I've searched, but I haven't seen your
> > cyrsql driver yet.  Would you please forward it to me or direct me to a
> > time slice to look in?
> >
> > BTW, I seem to have botched something...  Login from Horde/IMP causes
>imapd
> > to attempt a CRAM-MD5 authentication, instead of saslauthd, which does get
> > called if attempt login from an external client or imtest with -m login
> > (plain text mechanism).  I don't ever see saslauthd returned as an AUTH
> > mechanism by imapd.  I'm confused...
> >
> > imapd.log:
> >
> > Sep  4 10:38:58 lazarus imapd[15390]: badlogin:
> > localhost.localdomain[127.0.0.1] CRAM-MD5 [SASL(-13): user not found: no
> > secret in database]
> > Sep  4 10:39:04 lazarus last message repeated 2 times
> > Sep  4 10:39:07 lazarus HORDE[14538]: [imp] FAILED LOGIN 10.128.1.4 to
> > localhost:143[imap] as test1 [on line 161 of
> > "/var/www/html/horde/imp/lib/IMP.php"]
> >
> > /etc/imapd.conf:
> >
> > configdirectory: /var/imap
> > defaultpartition: default
> > partition-default: /home/imap
> > admins: root test1
> > sasl_pwcheck_method: saslauthd
> > servername: servername
> > unixhierarchysep: yes
> > allowanonymouslogin: no
> > allowplaintext: no
> >
> > saslauthd is running as:  -a pam
> >
> > My pam_mysql does work.
> >
> > Any advice, working configurations, etc. are more than welcome...
> >
> > Thanks,
> > Gary
> >
> >
> > At 05:59 PM 9/3/2002 -0400, Ilya wrote:
> > >I was able to compile php with --with-cyrus on my freebsd box, however
>any
> > >calls to cyrus functions cause apache to dump core.
> > >there is no reason to use --with-cyrus though, imap() functions give you
>the
> > >same functionality.
> > >besides i dont think cyrus() in php was ever updated ro run with sasl2(),
>and
> > >you have to run sasl2 with 2.1.5
> > >
> > >my setup is similar to yours, and I made a cyrsql driver for managing
>users
> > >from horde, works good on my side. take a look at horde list if you would
> > >like
> > >to set it up.
> > >
> > >Quoting Jeremy Freeman <jfreeman@sporg.com>:
> > >
> > > > You don't need to use --with-cyrus
> > > >
> > > > The UW-IMAP c-client will work fine with the Cyrus IMAP server.
> > > >
> > > > --
> > > > Jeremy
> > > >
> > > > Gary Weinreb wrote:
> > > > > Hey folks,
> > > > >
> > > > > I'm having trouble making PHP 4.2.2 --with-imap, and --with-cyrus.
> > > > > Make fails with errors relating to multiple definitions between
>cyrus &
> > > > > c-client, see pertinent results below:
> > > > >
> > > > > /usr/local/lib/libc-client.a(osdep.o): In function `fatal':
> > > > > /usr/src/redhat/SOURCES/imap-2002.RC2/c-client/ftl_unix.c:27:
>multiple
> > > > > definition of `fatal'
> > > > >
> > > >
> > >
>/usr/src/php/php-4.2.2/ext/cyrus/.libs/libcyrus.al(cyrus.lo):/usr/src/php/ph
>p-
> > >4.2.2/ext/cyrus/cyrus.c:110:
> > > > > first defined here
> > > > > /usr/bin/ld: Warning: size of symbol `fatal' changed from 35 to 44
>in
> > > > > osdep.o
> > > > > /usr/local/lib/libcyrus.a(xmalloc.o): In function `fs_get':
> > > > > /usr/src/redhat/SOURCES/cyrus-imapd-2.1.5/lib/xmalloc.c:106:
>multiple
> > > > > definition of `fs_get'
> > > > >
> > > >
> > >
>/usr/local/lib/libc-client.a(osdep.o):/usr/src/redhat/SOURCES/imap-2002.RC2/
>c-
> > >client/fs_unix.c:27:
> > > > > first defined here
> > > > > /usr/bin/ld: Warning: size of symbol `fs_get' changed from 102 to 38
>in
> > > > > xmalloc.o
> > > > > /usr/local/lib/libcyrus.a(xmalloc.o): In function `fs_give':
> > > > > /usr/src/redhat/SOURCES/cyrus-imapd-2.1.5/lib/xmalloc.c:116:
>multiple
> > > > > definition of `fs_give'
> > > > >
> > > >
> > >
>/usr/local/lib/libc-client.a(osdep.o):/usr/src/redhat/SOURCES/imap-2002.RC2/
>c-
> > >client/fs_unix.c:57:
> > > > > first defined here
> > > > > /usr/bin/ld: Warning: size of symbol `fs_give' changed from 70 to 28
>in
> > > > > xmalloc.o
> > > > > collect2: ld returned 1 exit status
> > > > > make[1]: *** [libphp4.la] Error 1
> > > > > make[1]: Leaving directory `/usr/src/php/php-4.2.2'
> > > > > make: *** [all-recursive] Error 1
> > > > >
> > > > > My config.nice:
> > > > >
> > > > > #! /bin/sh
> > > > > #
> > > > > # Created by configure
> > > > > './configure' \
> > > > > '--with-mysql' \
> > > > > '--with-mcal=/usr/local/mcal' \
> > > > > '--with-xslt' \
> > > > > '--with-xml' \
> > > > > '--with-dom' \
> > > > > '--with-zlib-dir=/usr/include' \
> > > > > '--with-gettext' \
> > > > > '--enable-ftp' \
> > > > > '--with-mcrypt' \
> > > > > '--with-imap' \
> > > > > '--with-cyrus' \
> > > > > '--with-apxs'
> > > > >
> > > > > My setup is:
> > > > >
> > > > > Redhat 7.2
> > > > > Apache 1.3.23
> > > > > PHP 4.2.2
> > > > > imap-2002-RC4
> > > > > cyrus imapd 2.1.5
> > > > > cyrus sasl 2.1.6
> > > > > Postfix 1.1.11
> > > > >
> > > > > This is for a Horde/IMP CVS installation, though of course, I'm not
> > > > > quite there yet...
> > > > > It was working with UW-imap, Horde 2.1, IMP 3.1, etc. but I thought
>I'd
> > > > > get current...
> > > > >
> > > > > Anyone have any ideas or advice?
> > > > >
> > > > > Also does anyone have any advice regarding the most practical
> > > > > configuration for cyrus behind IMP?
> > > > > I've got the saslauthd to pam_mysql authentication part working
>against
> > > > > the horde_users table, but I'm not certain about the mailbox
>structures
> > > > > and other options...
> > > > >
> > > > > Thanks,
> > > > > Gary
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > IMP mailing list
> > > > Frequently Asked Questions: http://horde.org/faq/
> > > > To unsubscribe, mail: imp-unsubscribe@lists.horde.org
> > >
> > >--
> > >IMP mailing list
> > >Frequently Asked Questions: http://horde.org/faq/
> > >To unsubscribe, mail: imp-unsubscribe@lists.horde.org
> >
> >
> >