Guruz Log [secgroup__at__guruz.hu]

Current path :: home :: Freebsd :: Squirrelmail

2010-12-23

-- FreeBSD and SquirrelMail and gettext - safe_mode settings in Apache virtualhost --

The PHP INI settings in Apache virthost "php_admin_value safe_mode Off" works  
as expected, but not in PHP "(bool)" conversion:

"php_admin_value safe_mode Off" means TRUE  in "bool"
"php_admin_value safe_mode 0"   means FALSE in "bool"

FreeBSD needs to set up LANG environment to gettext working properly,
but if "php_admin_value safe_mode" set to "Off", SquirrelMail doesn't set LANG environment up.


The code sample from functions/i18n.php on line 426:

        if ( !((bool)ini_get('safe_mode')) &&
             getenv( 'LC_ALL' ) != $longlocale ) {
            putenv( "LC_ALL=$longlocale" );
            putenv( "LANG=$longlocale" );  
            putenv( "LANGUAGE=$longlocale" );
            putenv( "LC_NUMERIC=C" );
            if ($sm_notAlias=='tr_TR') putenv( "LC_CTYPE=C" );
        }
         
         
My config: FreeBSD_8.1,apache-2.2.17,php5-5.3.4,squirrelmail-1.4.21


Workaround: Set "php_admin_value safe_mode" to "0" instead of "Off" in Apache virtualhost config.


posted at: 18:04 | path: /freebsd/squirrelmail | permalink to this entry


powered by blosxom