[horde] syntax error, unexpected T_STRING NLS.php on line 122

Chuck Hagenbuch chuck at horde.org
Wed Dec 19 16:59:08 UTC 2007


Please keep discussions on the list.

Quoting patrick.lahni at precisionautobody.cc:

>>> I have been using Horde/Imp for a very long time.  My OS is FBSD
>>> 6.2-RELEASE and I just recently updated horde-base to version 3.1.5_1.
>>> I
>>> am using the ports package.  However, upon doing so, I keep receiving
>>> the
>>> following error:
>>>
>>> [Wed Dec 19 10:25:00 2007] [error] [client xxx.xxx.xxx.xxx] PHP Parse
>>> error: syntax error, unexpected T_STRING in
>>> /usr/local/www/horde/lib/Horde/NLS.php on line 122
>>
>> And what is on that line (and just above/below it) in your version?
>
> Above:
>
> /* First try language with the current charset. */
>         $lang_charset = $lang . '.' . NLS::getCharset();
>         if ($lang_charset != setlocale(LC_ALL, $lang_charset)) {
>             /* Next try language with its default charset. */
>             global $nls;
>             $charset = !empty($nls['charsets'][$lang]) ?
> $nls['charsets'][$lang] : 'ISO-8859-1';
>             $lang_charset = $lang . '.' . $charset;
>             NLS::_cachedCharset(0, $charset);
>             if ($lang_charset != setlocale(LC_ALL, $lang_charset)) {
>                 /* At last try language solely. */
>                 $lang_charset = $lang;
>                 setlocale(LC_ALL, $lang_charset);
>             }
>         }
>
> Line 122 is actually a comment:
> /* avoid FreeBSD issapce(3) bug */
>
> Below:
>         if(NLS::getCharset() == "UTF-8"){
>             setlocale(LC_CTYPE,"C");
>         }
>         @putenv('LANG=' . $lang_charset);
>         @putenv('LANGUAGE=' . $lang_charset);
>     }

You need to talk to the port maintainer. This is code inserted by the port.

-chuck


More information about the horde mailing list