PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Michael Burstin <mikeb at concerto dot com>
Subject: Re: $SYBASE not recognized
Date: Jul 23 2002 3:00PM

Don't know if it would be the same under Linux (I think it would be),
but under Solaris, my SYBASE_OCS and SYBASE_ASE variables do not have
a leading '/' char.  This could be causeing OCS and ASE to be pointing
to /OCS-12_5 rather than to $SYBASE/OCS-12_5.

In addition, your LD_LIBRARY path doesn't look right.  Shouldn't it be
$ENV{SYBASE}/$ENV{SYBASE_OCS}/lib rather than just
$ENV{SYBASE}/OCS/lib?




On Tue, Jul 23, 2002 at 09:52:32AM -0500, abrown@mmm.com wrote:
> I'm not sure if this is better suited for the perl mailing list or the
> Sybperl mailing list, but here goes:
> 
> I have Sybperl 2.14 installed on Linux.  I am writing a cgi script to
> gather stats from various Sybase servers.  Since I cannot guarantee what
> environment variables the web server will have set (nearly none, I assume)
> I am trying to explicitly set $SYBASE in the .cgi script, something like
> this:
> 
> #!/usr/bin/perl
> 
> $ENV{"SYBASE"}="/opt/sybase";
> $ENV{"SYBASE_OCS"}="/OCS-12_5";
> $ENV{"SYBASE_ASE"}="/ASE-12_5";  # Don't think this is necessary, but tried
> it anyhow...
> $ENV{"LD_LIBRARY_PATH"}="$ENV{SYBASE}/OCS/lib";
> $SYBASE=$ENV{"SYBASE"};       # Don't think this is necessary, either...
> $SYBASE_OCS=$ENV{"SYBASE_OCS"};       # same here
> 
> use Sybase::CTlib;
> 
> ... etc etc etc ...
> 
> However, I still get the following error, as if $SYBASE is not set ($SYBASE
> should be set to /opt/sybase):
> 
> --- begin error ---
> 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 /home/sybase. Check the environment variable
> SYBASE if it is not the one you want!
> Cannot access file /home/sybase/config/objectid.dat
> Sybase::CTlib initialize: cs_ctx_alloc() failed at
> /usr/lib/perl5/5.6.1/i386-linux/DynaLoader.pm line 225.
> Compilation failed in require at ./testme.cgi line 10.
> BEGIN failed--compilation aborted at ./testme.cgi line 10.
> --- end error ---
> 
> If I set $SYBASE in bash before executing the script, it runs fine, but
> that doesn't help me from a web server perspective.  Any ideas?
> 
> Thanks,
> 
> Arlan
> 

-- 
Michael Burstin
NPI Engineer
Concerto Software
978-952-0842
mikeb@concerto.com