[imp] Cannot redeclare class lang

Erwin Fritz efritz at glja.com
Wed Jun 2 08:46:10 PDT 2004


Jan Schneider wrote:

> Zitat von Erwin Fritz <efritz at GLJA.com>:
> 
>> I'm running IMP 3.2.3 on top of Horde 2.2.5 on Solaris 8. Right after 
>> logging in to IMP, I get this error:
>>
>> Fatal error: Cannot redeclare class lang in ./lib/../lib/Lang.php on 
>> line 14
>>
>> The last line of my Horde log (set to LOG_DEBUG level) is a 'Login 
>> success' message.
>>
>> This looks like a programming bug.
> 
> 
> No, you either have a really broken PHP or you have some auto_include files
> defining a class of this name.
> 
> Jan.

PHP is 4.3.5, so that's pretty current.

I checked every file in the PHP installation directory and the Horde and IMP directories, and there's only one file containing the definition of class Lang: <horde home>/lib/Lang.php. I did this by grepping for the string 'class Lang'.

I then checked every file in the PHP, Horde, and IMP directories, looking for references to Lang.php. There are three such files:

<horde home>/po/translation.php
<horde home>/lib/Registry.php
<horde home>/lib/Lang.php

The relevant lines from translation.php are:

$HORDE_BASE = dirname(__FILE__) . '/..';
if (!empty($language)) {
    require $HORDE_BASE . '/config/lang.php.dist';
    require_once $HORDE_BASE . '/lib/Lang.php';
    $tmp = explode('.', $language);


The relevant lines from Registry.php are:

        /* Initialize the localization routines and variables  */
        include_once $base . '/lib/Lang.php';
        Lang::setLang();
        Lang::setTextdomain('horde', $base . '/locale', Lang::getCharset());


I don't know PHP, but it seems to me that there isn't anything wrong with these lines.

So I'm still stumped.

Any ideas?
Erwin







More information about the imp mailing list