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 Peppler <mpeppler at MBAY dot NET>
Subject: RE: CTlib initialization error
Date: Jun 9 1998 8:03PM

Ronald Page writes:
 > What's the AFS ACL on the $SYABSE directory?
 > 
 > Since I first posted, we moved perl and sybase to local files to take
 > AFS out of the equation.  The sybase home directory has world rwx
 > permission.  Three other things:
 > 
 > (1) When I run the thing locally (not thru the web server) it compiles
 > (which you would expect because it did run under Apache as well).
 > 
 > (2) When commenting out the "use" statement, the program compiles and I
 > can print the environment variable, which is correct (and set before the
 > use statement)
 > 
 > (3) I just switched to the use statement from CTlib to DBlib and it
 > compiles fine (I did this because other DBlib apps are running
 > fine). 

I'm willing to bet that the issue is with setting $ENV{SYBASE}.

It *must* be set before 'use Sybase::CTlib;'. If you need to set it
*in* the script itself then you need to do so in a BEGIN block:

BEGIN {
	$ENV{SYBASE} = '/path/to/sybase';
}

use Sybase::CTlib;

[rest of script...]

Michael

 > 
 > >  Date: Tue, 9 Jun 1998 09:59:40 PDT
 > >  From: Ronald Page 
 > >  Subject: CTlib initialization error
 > >  To: SybPerl Discussion List 
 > >  Message-id: <82E57D16D1D7D111A6B300A0C99B541002B4B7@mainex2.asu.edu>
 > >  X-Mailer: Internet Mail Service (5.5.1960.3)
 > >  Reply-To: SYBPERL-L@listproc.net
 > >  Sender: owner-SYBPERL-L@listproc.net
 > >  
 > >  I'm using Perl 5.004_004, Sybperl 2.08 under Solaris 5.5 and Netscape
 > >  Server.
 > >  
 > >  I ported an application that works fine from a similiar box under
 > Apache
 > >  server.  The biggest difference is that the new location uses AFS
 > >  instead of local file space.
 > >  
 > >  The error I'm getting is from the the use Sybase::CTlib statement.
 > >  Below is the message (which is ultimately generated from "CTlib.c").
 > >  Obviously we've verified that the SYBASE environment variable is set
 > >  correctly.  TIA.
 > >  
 > >  --
 > >  Ronald Page
 > >  Information Technology
 > >  Arizona State University
 > >  
 > >  Error:
 > >  The context allocation routine failed when it
 > >  tried to load localization files!! One or
 > >  more following problems may caused the
 > >  failure Cannot access the sybase home
 > >  directory, please check environment
 > >  variable SYBASE or ~sybase
 > >  Sybase::CTlib initialize: cs_ctx_alloc()
 > >  failed at
 > >  /usr/local/lib/perl5/sun4-solaris/5.00404/DynaLoader.pm
 > >  line 185. BEGIN failed--compilation
 > >  aborted at
 > >  /usr/local/www/develop/epo/cgi-bin/login.cgi
 > >  line 18. 
 > >  
 > >  
 > 
 > 

-- 
Michael Peppler         -||-  Data Migrations Inc.
mpeppler@datamig.com    -||-  http://www.mbay.net/~mpeppler
Int. Sybase User Group  -||-  http://www.isug.com