Error -23101: Unable to load locale categories
Posted in 1999
Developers running Informix 7.2.4/7.30 with Apache CGI scripts encountered error -23101 about invalid locale initialization. The issue stemmed from CLIENT_LOCALE and DB_LOCALE environment variables not being properly passed to Apache child processes.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Installation, Setup & Upgrades, Internationalization & Character Sets
I'm developing CGI/C scripts using Apache 1.3, Informix 7.2.4 and Linux 5.3. The scripts run well from the command line(!), but when i connect from Apache CGI : Error -23101 occurs: "An invalid locale name has been supplied for the locale initialization. The environment variable to specify the locale category has a wrong value. Check the value of the corresponding environment variable, CLIENT_LOCALE or DB_LOCALE. Also check if INFORMIXDIR points to a valid directory where Informix products are installed. If a client application receives this error when it requests a database server connection, check that the client and database locales are compatible. They are compatible if a valid locale exists on the server computer with the name lg_tr.codeset@mod, where lg_tr (language and territory) and mod (locale modifier) are from the CLIENT_LOCALE and codeset is from the database locale (from the DB_LOCALE, if it is set, or as stored in the database)." I've set the environment variables PATH, LD_LIBRARY_PATH, INFORMIXDIR, and INFORMIXSERVER correct (also in Apache httpd.conf) but i find no information which values to use for the environment variables CLIENT_LOCALE and DB_LOCALE in the Technical Informations of Informix. I hope this is the right way to solve the problem. I'd be glad about any kind of help. Thanks in advance. -Hubert
In article <36ABAE57.2BD72D98@forst.uni-muenchen.de>, "Hubert R'der" <roeder@forst.uni-muenchen.de> wrote: > I'm developing CGI/C scripts using Apache 1.3, Informix 7.2.4 and Linux > 5.3. The > scripts run well from the command line(!), but when i connect from > Apache CGI : > Error -23101 occurs: > > "An invalid locale name has been supplied for the locale initialization. > The environment variable to specify the locale category has a wrong > value. > Check the value of the corresponding environment variable, CLIENT_LOCALE > or DB_LOCALE. Also check if INFORMIXDIR points to a valid directory > where > Informix products are installed. When I see this I wonder where they mean to set the variables? For the Informix client applicaiton or the DB server itself. A client of mine using an informix SQL driver we provide is seeing the same symptoms. The OS is HP UNIX, but the symptoms are the same. I've seen a number of posts on the usenet about this (search for "informix locale") and some suggest setting the variables in the server's startup script. Again I wonder, the web server interfacing with the DB or the DB itself? > If a client application receives this error when it requests a database > server connection, check that the client and database locales are > compatible. They are compatible if a valid locale exists on the server > computer with the name lg_tr.codeset@mod, where lg_tr (language and > territory) and mod (locale modifier) are from the CLIENT_LOCALE and > codeset is from the database locale (from the DB_LOCALE, if it is set, > or as stored in the database)." > > I've set the environment variables PATH, LD_LIBRARY_PATH, INFORMIXDIR, > and INFORMIXSERVER > correct (also in Apache httpd.conf) but i find no information which > values to use for the environment variables CLIENT_LOCALE and DB_LOCALE > in the Technical Informations of Informix. Informix has informed us that if those variables are not set, then the default will be accepted. Lord knows what the default is. If it is "C" and the server is taking that literally then I can see where there might be a problem. I can't see it happeinig with our servers, just at my client's site. Alas, it is difficult to convince them of that w/o going there and seeing for myself ... > I hope this is the right way to solve the problem. > I'd be glad about any kind of help. > Thanks in advance. I'd say it is the right way. This really sounds like a graeter Informix oversight though - it is happening on a number of platforms which typically means it is a product issue. Perhaps some new restriction regarding the new Y2K issue? Maybe some locale's that use 2 digit years ('date' output might show) are simply ignored and deisgnated as bad? > -Hubert > If you find anything out I'd appreciate it if you pinged me. I'll do the same. Later, Mike -----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
Hubert Röder wrote: > > I'm developing CGI/C scripts using Apache 1.3, Informix 7.2.4 and Linux > 5.3. The > scripts run well from the command line(!), but when i connect from > Apache CGI : > Error -23101 occurs: > > "An invalid locale name has been supplied for the locale initialization. Environment. Environment. Environment. These problems are always environment! > The environment variable to specify the locale category has a wrong > value. > [...] > > I've set the environment variables PATH, LD_LIBRARY_PATH, INFORMIXDIR, > and INFORMIXSERVER > correct (also in Apache httpd.conf) but i find no information which > values to use for the environment variables CLIENT_LOCALE and DB_LOCALE > in the Technical Informations of Informix. Have you ensured that Apache passes them to your programs with either SetEnv or PassEnv? If not, that's the trouble. Apache doesn't let child process have any environment it doesn't know about, and it doesn't know about Informix. When you say 'in httpd.conf', you don't give much in the way of details... Have you used the script which is delivered in the cgi-bin directory to check the environment of your child processes? On average, I'd say you had not got INFORMIXDIR set correctly, or you removed or failed to install the gls sub-directory of $INFORMIXDIR. -- Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net) Guardian of DBD::Informix v0.60 -- see http://www.perl.com/CPAN #include <disclaimer.h>
I too ran into this problem while compiling for Informix 7.30. I'm new to the Informix 7.x environment. I looked around and cannot find any information on what values CLIENT_LOCALE, DB_LOCALE or SERVER_LOCALE should be set to. Any ideas....I'm still looking in the following online manuals: "Informix-GLS Programmers Manual", "Informix Client Products - Installation Guide" and the "Informix-ESQL/C - Programmer's Manual" I've set these to "U.S. English" but to no avail...any hints? Thanks in advance, -Dino Hubert Röder wrote: > I'm developing CGI/C scripts using Apache 1.3, Informix 7.2.4 and Linux > 5.3. The > scripts run well from the command line(!), but when i connect from > Apache CGI : > Error -23101 occurs: > > "An invalid locale name has been supplied for the locale initialization. > The environment variable to specify the locale category has a wrong > value. > Check the value of the corresponding environment variable, CLIENT_LOCALE > or DB_LOCALE. Also check if INFORMIXDIR points to a valid directory > where > Informix products are installed. > > If a client application receives this error when it requests a database > server connection, check that the client and database locales are > compatible. They are compatible if a valid locale exists on the server > computer with the name lg_tr.codeset@mod, where lg_tr (language and > territory) and mod (locale modifier) are from the CLIENT_LOCALE and > codeset is from the database locale (from the DB_LOCALE, if it is set, > or as stored in the database)." > > I've set the environment variables PATH, LD_LIBRARY_PATH, INFORMIXDIR, > and INFORMIXSERVER > correct (also in Apache httpd.conf) but i find no information which > values to use for the environment variables CLIENT_LOCALE and DB_LOCALE > in the Technical Informations of Informix. > > I hope this is the right way to solve the problem. > I'd be glad about any kind of help. > Thanks in advance. > > -Hubert
Dino Gomez wrote: > > I too ran into this problem while compiling for Informix 7.30. I'm new to > the Informix 7.x environment. I looked around and cannot find any > information on what values CLIENT_LOCALE, DB_LOCALE or SERVER_LOCALE should > be set to. Any ideas....I'm still looking in the following online manuals: > "Informix-GLS Programmers Manual", "Informix Client Products - Installation > Guide" and the "Informix-ESQL/C - Programmer's Manual" I've set these to > "U.S. English" but to no avail...any hints? If what you want is the default en_us locale just unset all three environment variables and all will work fine. Art S. Kagel
Just set it to en_us.1252@dict This should work for an english version. With best regards, Marcus Dino Gomez schrieb in Nachricht <36C31C24.7021D4D6@ms.com>... I too ran into this problem while compiling for Informix 7.30. I'm new to the Informix 7.x environment. I looked around and cannot find any information on what values CLIENT_LOCALE, DB_LOCALE or SERVER_LOCALE should be set to. Any ideas....I'm still looking in the following online manuals: "Informix-GLS Programmers Manual", "Informix Client Products - Installation Guide" and the "Informix-ESQL/C - Programmer's Manual" I've set these to "U.S. English" but to no avail...any hints? Thanks in advance, -Dino Hubert R'der wrote: > I'm developing CGI/C scripts using Apache 1.3, Informix 7.2.4 and Linux > 5.3. The > scripts run well from the command line(!), but when i connect from > Apache CGI : > Error -23101 occurs: > > "An invalid locale name has been supplied for the locale initialization. > The environment variable to specify the locale category has a wrong > value. > Check the value of the corresponding environment variable, CLIENT_LOCALE > or DB_LOCALE. Also check if INFORMIXDIR points to a valid directory > where > Informix products are installed. > > If a client application receives this error when it requests a database > server connection, check that the client and database locales are > compatible. They are compatible if a valid locale exists on the server > computer with the name lg_tr.codeset@mod, where lg_tr (language and > territory) and mod (locale modifier) are from the CLIENT_LOCALE and > codeset is from the database locale (from the DB_LOCALE, if it is set, > or as stored in the database)." > > I've set the environment variables PATH, LD_LIBRARY_PATH, INFORMIXDIR, > and INFORMIXSERVER > correct (also in Apache httpd.conf) but i find no information which > values to use for the environment variables CLIENT_LOCALE and DB_LOCALE > in the Technical Informations of Informix. > > I hope this is the right way to solve the problem. > I'd be glad about any kind of help. > Thanks in advance. > > -Hubert