Bug #42493 [Bgs]: odbc_pconnect: persistent connections with different locales

From: Date: Thu, 20 May 2010 11:52:20 +0000
Subject: Bug #42493 [Bgs]: odbc_pconnect: persistent connections with different locales
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-150659@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=42493&edit=1 ID: 42493 User updated by: dave dot lane at gmx dot net Reported by: dave dot lane at gmx dot net Summary: odbc_pconnect: persistent connections with different locales Status: Bogus Type: Bug Package: ODBC related Operating System: Linux PHP Version: 5.2.4 New Comment: The bug is about odbc_pconnect i.e. take notice of the "p". As far as I know the persistence of the connection is handled by php. The problem is the following: setlocale(LC_ALL, de_DE); odbc_pconnect(...) SQL: select current_timestamp from ... result: date in german format setlocale(LC_ALL, en_EN); odbc_pconnect(...) SQL: select current_timestamp from ... result: date still in german format So obviously odbc_pconnect is taking notice of the locale when connecting, but not when using persistence connections. Thanks for the speedy reply to the problem by the way (nearly three years...) Previous Comments: ------------------------------------------------------------------------ [2010-05-20 12:37:40] mike@php.net Unforutnately this cannot be influenced by PHP, you need to take care of your locale when useing ODBC. ------------------------------------------------------------------------ [2007-08-31 12:34:09] dave dot lane at gmx dot net Description: ------------ We have an environment where we both use odbc_pconnect and different locales. DB2 recognises the locale and returns data formatted based on this locale. That means when we do a setlocale(LC_ALL, de_DE); before we connect we get float formatted so: 1,23541200000000E+004 and when we do a setlocale(LC_ALL, en_GB); we get float formatted so 1.23541200000000E+004. This works fine when we use odbc_connect. The problem is when we use odbc_pconnect connections are recycled without taking the locale into account. Sometimes we get english when we have set german and vice versa. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=42493&edit=1

« previous php.bugs (#150659) next »