[python-sybase] CS_MEM_ERROR only in CGI execution environment
John J Lee
jjl at pobox.com
Wed, 11 Aug 2004 16:13:50 +0100 (GMT Daylight Time)
On Sat, 31 Jul 2004, John J Lee wrote:
> 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!
OK, I take it back ;-)
> 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.
[...]
LD_LIBRARY_PATH is identical in both shell and CGI script environment.
Same goes for SYBASE and SYBASE_OCS.
None of the other environment variables seem even vaguely relevant. I
didn't have time in my most recent visit to slavishly copy the whole
environment, but I'm doubting again that that's my problem...
Still, you may well be right that this is a linking problem.
Any other ideas??
John