From: szoftos at freemail dot hu Operating system: FreeBSD 7.0 PHP version: 5.2.9RC2 PHP Bug Type: Gettext related Bug description: setlocale() ignores setting
Description: ------------ Hello, on BSD systems, setlocale itself is not usable for gettext without putenv(). If I don't use putenv() with setlocale() (which is not enabled by default in safe_mode for $LANG), my own translations are not useable with gettext. Since i use safe_mode, I'd not prefer enabling the setting of $LANG variablewith putenv(). What I've seen during php ktracing, is that setlocale() only reads the original language settings from /usr/share/locale/*, but my own translations are not looked up. Is there any way to fix that functionality? Maybe it's more BSD related than I think. Reproduce code: --------------- You can simply try the gettext module's own tests to test it in BSD. They all will fail, because those tests aren't usint putenv(). Expected result: ---------------- I expect not to use the putenv() with safe_mode=on :) -- Edit bug report at http://bugs.php.net/?id=47451&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=47451&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=47451&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=47451&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=47451&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=47451&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=47451&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=47451&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=47451&r=needscript Try newer version: http://bugs.php.net/fix.php?id=47451&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=47451&r=support Expected behavior: http://bugs.php.net/fix.php?id=47451&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=47451&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=47451&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=47451&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=47451&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=47451&r=dst IIS Stability: http://bugs.php.net/fix.php?id=47451&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=47451&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=47451&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=47451&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=47451&r=mysqlcfg