[Zope] Sybase and locale!

Hung Jung Lu hungjunglu@hotmail.com
Fri, 14 Jan 2000 01:59:14 PST


Hi,

I just saw another message in the Python eGroup list regarding
Sybase installation problem with the locale. I had the
same problem while dealing with Sybase on Zope. So I guess
I'd post my own message again here, together with the other
person's message. In short, when installing Sybase on Linux
machines, MAKE SURE THAT YOU HAVE THE RIGHT LOCALE INFO
IN YOUR locales.dat FILE. I guess in the Zope Sybase
README.txt file (both on-line and in the distribution)

http://www.zope.org/Products/DA/SybaseDA/README.txt

it would be a good idea to add a line of comment regarding
the locale. (As simple as asking the user to double check
the locale environment variable LC_ALL, and make sure that
his/her locales.dat file includes the right locale name
for his/her machine platform.)

(A side comment: Dave Cole just release a new Python
Sybase module, and his version is 0.4

http://www.egroups.com/group/python-list/75697.html?
http://www.itga.com.au/~djc/sybase.html

I don't know whether there is a duplication of effort
here. But it would be good if Digicool and Dave could
coordinate a bit.

As I am having some glitches using Sybase from Zope,
I may attempt to access Sybase directly from Python.)

thanks,

Hung Jung (Just a newbie trying to help)

--------------------------------------------------------------
"hung jung lu" <hungjungl-@hotmail.com> wrote:
original article:http://www.egroups.com/group/zope/?start=20839
>
>Thanks to Chris McDonough for the help.
>My SybaseDAv2 is running, now! :)
>
>Before getting it to work, besides the shared
>library problem (/etc/ld.so.conf and ldconfig)
>I also ran into another problem. I will mention it
>so if other people run into the same problem
>they can look it up here. My Zope was throwing
>the error message:
>
>"The context allocation routine failed when it
>tried to load localization files!! One or more
>following problems may caused the failure
>
>Your sybase home directory is /opt/sybase-11.9.2
>Check the environment variable SYBASE if it is not
>the one you want!
>Using locale name "en_US" defined in environment
>variable LC_ALL
>Local name "en_US" doesn't exist in your
>/opt/sybase-11.9.2/locales/locales.dat file"
>
>What happened was that in my locales.dat file,
>under the [linux] section, I did not have the
>"en_US" entry... I only had the
>
>     locale = ENGLISH, us_english, iso_1
>
>entry. So I had to duplicate this entry and
>change it to:
>
>     locale = en_US, us_english, iso_1
>
>After that, I restarted Sybase and Zope, and it
>worked.
>
>thanks again!
>
>Hung Jung
>
> >From: Chris McDonough <chrism@digicool.com>
> >
> >SybaseDAv2 takes all its information from the interfaces file.  As long
> >as you put a hostname in the server field and that hostname resolves to
> >the IP address that's listed in the interfaces file, it uses that
> >interfaces entry to access the database.  This also means that the port
> >it looks to on the server is the one that is specified within the
> >interfaces file.  Usually, you can just type the name you've defined in
> >the interfaces file into the server textbox within SybaseDAv2.
> >
> >AFAIK, the interfaces file only controls the client library lookups, and
> >you'll need to go change the server port somewhere else (where, I don't
> >know).
> >
> >Before you run Zope, in the start script you'll need to set the $SYBASE
> >environment variable to the  sybase home directory, and you'll need to
> >make sure that the /etc/ld.so.conf file lists $SYBASE/lib as a place to
> >find shared libraries.  If you add an entry to ld.so.conf, you'll need
> >to run ldconfig to reparse the ld.so.conf file.  This is on Linux.  On
> >solaris, you can define an environment variable ($LD_LIBRARY_PATH) that
> >points to the sybase lib dir.
> >
> >If all is well with the world after that, you should be able to connect
> >to your database.


--------------------------------------------------------------
c.kotsokali-@noc.ntua.gr (constantinos a. kotsokalis) wrote:
original article:http://www.egroups.com/group/python-list/?start=74779
>I do not know if this has been said in any of these two groups
>before, but here's a bit of advice: If you try to compile
>ctsybase python module to use with Sybase under Linux (or
>any other OS, for that matter) and get a core dump when you
>try to import it (doesn't matter if it's statically linked
>or a dynamic module), make sure your locale (LC_ALL env.
>variable) is available in sybase's locales file
>(locales/locales.dat). It took me some three hours yesterday
>night to locate the problem (thanks, redhat, for stripping
>the python executable and cut the way to valuable debugging
>information :-)). If your locale is not available, either
>change locale or add it to the locales file as an ``alias''.
>
>   Regards,
>     Costas
>
>PS: I wonder why isql worked...
>
>--
>Constantinos A. Kotsokalis || c.kotsokalis@noc.ntua.gr
>National Technical University of Athens
>Network Management Center
>Tel. No: +30 1 7721861
>--
>http://www.python.org/mailman/listinfo/python-list
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com