[python-sybase] CS_MEM_ERROR only in CGI execution environment
John J Lee
jjl at pobox.com
Sat, 31 Jul 2004 11:27:24 +0100 (BST)
On Sat, 31 Jul 2004, Gregory Bond wrote:
> > I can import Sybase from a Solaris shell prompt fine.
> >
> > When I try importing Sybase from code run from a CGI script, though, it
> > fails at the first cs_ctx_alloc() in Sybase.py, and I get the following in
> > the debug file:
>
> That'll be LD_LIBRARY_PATH issues. When you do a connect, the sybase
> libs dynamically link other libraries, giving these wierd errors if it
> fails. There's no way (afaict) of futzing -R flags at compile time
> for this, you just gotta have the right LD_LIBRARY_PATH (or symlink
> the offenders into /usr/local/lib or whatever.)
>
> Seems to be a problem with 12.0/12.5 more than 11.0 libraries.
Thank you!
I've been bashing my head against this for some time now.
I *am* setting LD_LIBRARY_PATH (using a shell script wrapper around a
Python CGI script), but I guess it's non-Sybase libs that are not being
found.
With hindsight, it seems blindingly obvious that I should have rote-copied
the shell environment and then experimented to track this down... I guess
my mental block was assuming that some obscure Solaris security feature
was to blame.
John