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: Wrapper for scripts
Date: Oct 16 1997 7:13PM

Sandesh Tattitali wrote:
> 
> Yes , I did install the perl binaries on the same machine where I built them .However the Perl binaries are not in the standard directory viz. /usr/local/bin , /usr/local/lib etc., but are on a user directory viz. /devdb_dump/perl/.......
> Sybase libraries are located in /sybase1102/lib.The Web server cgi-bin directory is /devdb_dump/httpd/cgi-bin. Without the wrapper scripts the following error (form the Web server error log) is obtained :
> 
> 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 /devdb_dump/perl/lib/sun4m/5.00401/DynaLoader.pm line 172.
> BEGIN failed--compilation aborted at /devdb_dump/httpd/cgi-bin/employee.pl line 9.
> [Tue Oct 14 13:03:36 1997] access to /devdb_dump/httpd/cgi-bin/employee.pl failed for sandesh, reason: Premature end of script headers

This is definitely the $ENV{SYBASE} problem.

For CTlib you *must* set $ENV{SYBASE} in a BEGIN block, as in

#!/devdb_dump/perl/bin/perl

BEGIN {
	$ENV{SYBASE} = '/sybase1102';
}

use Sybase::CTlib;

etc...

Michael
-- 
Michael Peppler       -||-  Data Migrations Inc.
mpeppler@datamig.com  -||-  http://www.mbay.net/~mpeppler