[imp] Help me, please!

Mario Andrés Yepes C marioy@logos.upb.edu.co
Thu, 6 Dec 2001 14:03:23 -0500


You have to compile Php with gettext support


El Jue 06 Dic 2001 13:42, escribió:
> Quoting ionel ion <sobor77@rol.ro>:
> > I have a big problem with the configuration of imp on my computer.
> > My computer run RedHat 6.2 distribution of Linux. I had installed from a
> > tar.gz package the folowing: Apache 1.3.22, Openssl, mod_ssl, php 4, imap
> > and qmail 103. All of these runs correctly. After this I try to install
> > the imp3.0rc1+horde2.0rc1 services.
> > I read all of the docs/INSTALL files, I make the right step but when I
> > test the service, my browser says:
> > "Fatal error: Call to undefined function: _() in
> > /usr/local/apache/htdocs/horde/config/registry.php on line 27".
> > In the registry.php file, the line 27 is:
> > " 'name' => _("Horde"),"
>
> http://www.horde.org/faq/admin/trouble/index.php#t44
>
> -chuck


>From jan@horde.org Date: Thu,  6 Dec 2001 20:49:30 +0100
Return-Path: <jan@horde.org>
Mailing-List: contact imp-help@lists.horde.org; run by ezmlm
Delivered-To: mailing list imp@lists.horde.org
Received: (qmail 14936 invoked from network); 6 Dec 2001 19:57:57 -0000
Received: from mailout02.sul.t-online.com (HELO mailout02.sul.t-online.de) (194.25.134.17)
  by clark.horde.org with SMTP; 6 Dec 2001 19:57:57 -0000
Received: from fwd05.sul.t-online.de 
	by mailout02.sul.t-online.de with smtp 
	id 16C4eb-0002R9-04; Thu, 06 Dec 2001 20:57:57 +0100
Received: from linux.wg.de (320034214675-0001@[217.225.46.190]) by fmrl05.sul.t-online.com
	with esmtp id 16C4eH-0IwzyqC; Thu, 6 Dec 2001 20:57:37 +0100
Received: from localhost (localhost [127.0.0.1])
	by linux.wg.de (8.11.0/8.11.0/SuSE Linux 8.11.0-0.4) with ESMTP id fB6JnUk04655
	for <imp@lists.horde.org>; Thu, 6 Dec 2001 20:49:30 +0100
Received: from 192.168.60.1 ( [192.168.60.1])
	as user jan@linux by linux.wg.de with HTTP;
	Thu,  6 Dec 2001 20:49:30 +0100
Message-ID: <1007668170.3c0fcbca40279@linux.wg.de>
Date: Thu,  6 Dec 2001 20:49:30 +0100
From: Jan Schneider <jan@horde.org>
To: imp@lists.horde.org
References: <1007629623.3c0f35371b889@linux.wg.de> <851526730.1007639438@[192.168.0.71]>
In-Reply-To: <851526730.1007639438@[192.168.0.71]>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
User-Agent: Internet Messaging Program (IMP) 4.0-cvs
X-Sender: 320034214675-0001@t-dialin.net
Subject: Re: [imp] greek language setting is not working

Zitat von Jeff Tucker <jefft@wciatl.com>:

> --On Thursday, December 06, 2001 10:07 AM +0100 Jan Schneider 
> <jan@horde.org> wrote:
> 
> >
> > It seems that some on some distributions gettext doesn't work if you
> set
> > LC_ALL to the wanted locale. Try replacing LC_ALL in lib/Registry.php
> or
> > in  the debug instructions with different LC_* available on your
> system
> > and  tell us if it works.
> >
> 
> Jan,
> 
> I don't understand what you mean here. I'm using the default @setlocale
> in 
> Registry.php, of course.
> 
> I see that in a regular shell, I have the variable LC_ALL set to POSIX.
> 
> Gettext doesn't work for me from the shell or inside IMP.
> 
> What might I try setting LC_ALL to in the shell to test with. I've gotten
> 
> gettext to work on a RedHat system I have, so I'm sure I know how to type
> 
> the commands. On this Slackware system, I haven't gotten it working,
> though.

This is quote from another guy who had problems with gettext:

=======
I think there is a bug or 
something in the php or the gettext. I have changed some codes on the 
registry.php  where  LC_ALL is used on the setlocale. I removed that  line 
and added these functions : 

LC_COLLATE for string comparison, see strcoll() 

LC_MONETARY for localeconv() 

LC_NUMERIC for decimal separator (See also: localeconv()) 

LC_TIME for date and time formatting with strftime() 


It worked ok but when I used this one it gaves me the error : 

LC_CTYPE for character classification and conversion, for example 
strtoupper() 


Seems there is a problem with the LC_CTYPE .
======

Try replacing the @setlocal(LC_ALL with mutiple calls to the different LC_ 
locales. You can get a list of these entries by calling "locale" from your 
shell.

Jan.

::::::::::::::::::::::::::::::::::::::::
AMMMa AG - discover your knowledge
:::::::::::::::::::::::::::
Detmolder Str. 25-33 :: D-33604 Bielefeld
fon +49.521.96878-0 :: fax  +49.521.96878-20
http://www.ammma.de
::::::::::::::::::::::::::::::::::::::::::::::


>From jan@horde.org Date: Thu,  6 Dec 2001 20:53:04 +0100
Return-Path: <jan@horde.org>
Mailing-List: contact imp-help@lists.horde.org; run by ezmlm
Delivered-To: mailing list imp@lists.horde.org
Received: (qmail 14937 invoked from network); 6 Dec 2001 19:57:57 -0000
Received: from mailout01.sul.t-online.com (HELO mailout01.sul.t-online.de) (194.25.134.80)
  by clark.horde.org with SMTP; 6 Dec 2001 19:57:57 -0000
Received: from fwd05.sul.t-online.de 
	by mailout01.sul.t-online.de with smtp 
	id 16C4ea-0002YS-05; Thu, 06 Dec 2001 20:57:56 +0100
Received: from linux.wg.de (320034214675-0001@[217.225.46.190]) by fmrl05.sul.t-online.com
	with esmtp id 16C4eI-0IwzyrC; Thu, 6 Dec 2001 20:57:38 +0100
Received: from localhost (localhost [127.0.0.1])
	by linux.wg.de (8.11.0/8.11.0/SuSE Linux 8.11.0-0.4) with ESMTP id fB6Jr5k04669
	for <imp@lists.horde.org>; Thu, 6 Dec 2001 20:53:05 +0100
Received: from 192.168.60.1 ( [192.168.60.1])
	as user jan@linux by linux.wg.de with HTTP;
	Thu,  6 Dec 2001 20:53:04 +0100
Message-ID: <1007668384.3c0fcca0d785a@linux.wg.de>
Date: Thu,  6 Dec 2001 20:53:04 +0100
From: Jan Schneider <jan@horde.org>
To: imp@lists.horde.org
References: <20011206143634.E3B0DD3327@bouncer.digiserve.ie> <3C0FBF3D.F7346F7B@optonline.net>
In-Reply-To: <3C0FBF3D.F7346F7B@optonline.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
User-Agent: Internet Messaging Program (IMP) 4.0-cvs
X-Sender: 320034214675-0001@t-dialin.net
Subject: Re: [imp] htmlspecialchars (was Re: [imp] IMP HEAD CVS: error in newmail popup)

Encoding the & in an url as &amp; is necessary in xhmtl. And Horde is xhtml 
compliant.

But it only seem to cause problems with some browsers (namely Netscape and 
Mozilla) if used in a javascript call.

Jan.

Zitat von mays@optonline.net:

> Barry Flanagan wrote:
> 
> > Using HEAD CVS of IMP, updated yesterday.
> >
> > If you have new mail popups enabled, and are in a folder other than the
> one
> > the new mail arrives in, the URL that the popup directs you to is
> broken. The
> > URL sent is like:
> >
> > /mailbox.php?newmail_popup=no&amp;mailbox=INBOX
> >
> > Notice the "amp;" after the & - if you take out the "amp;" bit all is
> well.
> >
> > --
> >
> > -Barry Flanagan
> 
> I notice a similar problem when using imp authentication with horde.  On
> log
> out, a user is redirected to something similar to
> 
> 
> http://example.com/horde/imp/login.php?
reason=logout&amp;redirect_url=http%3A%2F%2Fexample.com%2Fhorde%2Flogin.php
> 
> Notice the same "amp;" after the &.  Taking out the "amp;" here as well
> does the
> correct thing.  What I believe the intent to be is that
> horde/imp/login.php
> redirects again to horde/login.php.  The extra 'amp;' prevents the
> recognition
> of the redirect_url.  This looks to be coming from the code in
> Registry::linkByPackage, which is being called from Registry::link.  At
> the very
> end of linkByPackage, the resulting link is run through htmlspecialchars
> before
> being returned.  This causes the '&' to be changed to '&amp;'.  I don't
> know
> what other implications there might be, but removing the call to
> htmlspecialchars here allows the redirect_url portion to be processed
> (correctly
> ?) by imp/login.php.
> 
> Without this change, when the next user logs in, they are taken
> immediately to
> their INBOX.  This is in contrast to the initial log in where the user is
> taken
> to the main horde page.  I don't know which is the desired behavior, but
> they
> should at least be consistent.
> 
> A diff below is against RELENG_2 of horde from a day or so ago.
> 
> Mark
> 
> --- horde.new/lib/Registry.php.orig     Fri Nov 30 20:13:10 2001
> +++ horde.new/lib/Registry.php  Thu Dec  6 13:28:09 2001
> @@ -338,7 +338,7 @@
>          // in a stricter registry).
>          $link = preg_replace('|\|.+\||U', '', $link);
> 
> -        return htmlspecialchars($link);
> +        return $link;
>      }
> 
>      /**
> 
> 
> -- 
> 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
> 
> 


Jan.

::::::::::::::::::::::::::::::::::::::::
AMMMa AG - discover your knowledge
:::::::::::::::::::::::::::
Detmolder Str. 25-33 :: D-33604 Bielefeld
fon +49.521.96878-0 :: fax  +49.521.96878-20
http://www.ammma.de
::::::::::::::::::::::::::::::::::::::::::::::


>From chuck@horde.org Date: Thu,  6 Dec 2001 15:11:27 -0500
Return-Path: <chuck@horde.org>
Mailing-List: contact imp-help@lists.horde.org; run by ezmlm
Delivered-To: mailing list imp@lists.horde.org
Received: (qmail 17114 invoked from network); 6 Dec 2001 20:12:10 -0000
Received: from h00104bc60b3c.ne.mediaone.net (HELO marina.horde.org) (24.91.196.127)
  by clark.horde.org with SMTP; 6 Dec 2001 20:12:10 -0000
Received: by marina.horde.org (Postfix, from userid 33)
	id A74C53972; Thu,  6 Dec 2001 15:11:27 -0500 (EST)
Received: from 192.168.0.102 ( [192.168.0.102])
	as user chuck@localhost by marina.horde.org with HTTP;
	Thu,  6 Dec 2001 15:11:27 -0500
Message-ID: <1007669487.3c0fd0ef7c917@marina.horde.org>
Date: Thu,  6 Dec 2001 15:11:27 -0500
From: Chuck Hagenbuch <chuck@horde.org>
To: imp@lists.horde.org
References: <20011206143634.E3B0DD3327@bouncer.digiserve.ie> <3C0FBF3D.F7346F7B@optonline.net> <1007668384.3c0fcca0d785a@linux.wg.de>
In-Reply-To: <1007668384.3c0fcca0d785a@linux.wg.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
User-Agent: Internet Messaging Program (IMP) 4.0-cvs
Subject: Re: [imp] htmlspecialchars (was Re: [imp] IMP HEAD CVS: error in newmail popup)

Quoting Jan Schneider <jan@horde.org>:

> But it only seem to cause problems with some browsers (namely Netscape and 
> Mozilla) if used in a javascript call.

Yeah, it shouldn't be done in javascript. We might have missed a few of those, 
though.

-chuck

--
Charles Hagenbuch, <chuck@horde.org>
"What was and what may be, lie, like children whose faces we cannot see, in the
arms of silence. All we ever have is here, now." - Ursula K. Le Guin


>From chuck@horde.org Date: Thu,  6 Dec 2001 15:33:01 -0500
Return-Path: <chuck@horde.org>
Mailing-List: contact imp-help@lists.horde.org; run by ezmlm
Delivered-To: mailing list imp@lists.horde.org
Received: (qmail 18468 invoked from network); 6 Dec 2001 20:33:40 -0000
Received: from h00104bc60b3c.ne.mediaone.net (HELO marina.horde.org) (24.91.196.127)
  by clark.horde.org with SMTP; 6 Dec 2001 20:33:40 -0000
Received: by marina.horde.org (Postfix, from userid 33)
	id BB7BB3972; Thu,  6 Dec 2001 15:33:01 -0500 (EST)
Received: from 192.168.0.102 ( [192.168.0.102])
	as user chuck@localhost by marina.horde.org with HTTP;
	Thu,  6 Dec 2001 15:33:01 -0500
Message-ID: <1007670781.3c0fd5fd945a5@marina.horde.org>
Date: Thu,  6 Dec 2001 15:33:01 -0500
From: Chuck Hagenbuch <chuck@horde.org>
To: imp@lists.horde.org
References: <1007629623.3c0f35371b889@linux.wg.de> <851526730.1007639438@[192.168.0.71]> <1007668170.3c0fcbca40279@linux.wg.de>
In-Reply-To: <1007668170.3c0fcbca40279@linux.wg.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
User-Agent: Internet Messaging Program (IMP) 4.0-cvs
Subject: Re: [imp] greek language setting is not working

Quoting Jan Schneider <jan@horde.org>:

> Try replacing the @setlocal(LC_ALL with mutiple calls to the different LC_ 
> locales. You can get a list of these entries by calling "locale" from your 
> shell.

Note that you can probably do this with one call by &'ing them together - 
LC_COLLATE & LC_MONETARY & LC_TIME, etc...

-chuck

--
Charles Hagenbuch, <chuck@horde.org>
"What was and what may be, lie, like children whose faces we cannot see, in the
arms of silence. All we ever have is here, now." - Ursula K. Le Guin


>From liamr@umich.edu Date: Thu,  6 Dec 2001 15:57:30 -0500
Return-Path: <liamr@umich.edu>
Mailing-List: contact imp-help@lists.horde.org; run by ezmlm
Delivered-To: mailing list imp@lists.horde.org
Received: (qmail 20251 invoked from network); 6 Dec 2001 20:57:32 -0000
Received: from donkeykong.gpcc.itd.umich.edu (smtp@141.211.2.163)
  by clark.horde.org with SMTP; 6 Dec 2001 20:57:32 -0000
Received: from esperanto.web.itd.umich.edu (smtp@esperanto.web.itd.umich.edu [141.213.231.69])
        by donkeykong.gpcc.itd.umich.edu (8.8.8/4.3-mailhub) with ESMTP id PAA21416
        for <imp@lists.horde.org>; Thu, 6 Dec 2001 15:57:31 -0500 (EST)
Received: (from nobody@localhost)
	by esperanto.web.itd.umich.edu (8.8.8/4.9.1-cyrus) id PAA12373
	for imp@lists.horde.org; Thu, 6 Dec 2001 15:57:30 -0500 (EST)
X-Authentication-Warning: esperanto.web.itd.umich.edu: nobody set sender to liamr@umich.edu using -f
Received: from 141.213.231.63 ( [141.213.231.63])
	as user liamr@l.imap.itd.umich.edu by mail-test.www.umich.edu with HTTP;
	Thu,  6 Dec 2001 15:57:30 -0500
Message-ID: <1007672250.3c0fdbba85c33@mail-test.www.umich.edu>
Date: Thu,  6 Dec 2001 15:57:30 -0500
From: Liam Hoekenga <liamr@umich.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
X-Originating-IP: 141.213.231.63
Subject: accessing HTTP_(SERVER|ENV)_VARS from config/*.php files

Hey guys -

I'm trying to defined alternate login and logout lines in my
imp/config/conf.php.  I'd like to do something like:

$conf['user']['alternate_login'] = 'https://' . $HTTP_SERVER_VARS['SERVER_NAME']
. '/mylogin.php';

but... it looks like the name space has been way sanitized and that IMP can't
actually used those variables from within the conf files.  If I add some logging
to login.php, I see that $HTTP_SERVER_VARS['SERVER_NAME'] doesn't contain
anything when invoked at that point.  I do use that variable elsewhere, tho.

Am I on crack?  I'm pretty sure I could do a (getenv($SERVER_NAME)), but it
seems like the value is already stached in a variable, and that it'd be easier
to reference the variable directly rather than use a function to fetch it.

any suggestions?
thanks!
Liam


>From chuck@horde.org Date: Thu,  6 Dec 2001 16:04:30 -0500
Return-Path: <chuck@horde.org>
Mailing-List: contact imp-help@lists.horde.org; run by ezmlm
Delivered-To: mailing list imp@lists.horde.org
Received: (qmail 21357 invoked from network); 6 Dec 2001 21:05:08 -0000
Received: from h00104bc60b3c.ne.mediaone.net (HELO marina.horde.org) (24.91.196.127)
  by clark.horde.org with SMTP; 6 Dec 2001 21:05:08 -0000
Received: by marina.horde.org (Postfix, from userid 33)
	id 659803972; Thu,  6 Dec 2001 16:04:30 -0500 (EST)
Received: from 192.168.0.102 ( [192.168.0.102])
	as user chuck@localhost by marina.horde.org with HTTP;
	Thu,  6 Dec 2001 16:04:30 -0500
Message-ID: <1007672670.3c0fdd5e3c6a0@marina.horde.org>
Date: Thu,  6 Dec 2001 16:04:30 -0500
From: Chuck Hagenbuch <chuck@horde.org>
To: imp@lists.horde.org
References: <1007672250.3c0fdbba85c33@mail-test.www.umich.edu>
In-Reply-To: <1007672250.3c0fdbba85c33@mail-test.www.umich.edu>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
User-Agent: Internet Messaging Program (IMP) 4.0-cvs
Subject: Re: [imp] accessing HTTP_(SERVER|ENV)_VARS from config/*.php files

Quoting Liam Hoekenga <liamr@umich.edu>:

> I'm trying to defined alternate login and logout lines in my
> imp/config/conf.php.  I'd like to do something like:
> 
> $conf['user']['alternate_login'] = 'https://' .
> $HTTP_SERVER_VARS['SERVER_NAME']
> . '/mylogin.php';

use $GLOBALS['HTTP_SERVER_VARS']['SERVER_NAME']

-chuck

--
Charles Hagenbuch, <chuck@horde.org>
"What was and what may be, lie, like children whose faces we cannot see, in the
arms of silence. All we ever have is here, now." - Ursula K. Le Guin