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: Sybperl problem
Date: Oct 7 1997 10:59PM

Jagadeesan Manivannan wrote:
> 
> Hi
> 
> I have a perl with sybperl script which runs fine
> when run in UNIX prompt. runs fine. But
> the same script when run run under http server
> complains with the following error message.
> The https server is running under solaris.
> 
> Can't load '/usr/local/perl/5.2.0.0/solaris/lib/site_perl/sun4-solaris/auto/Sybase/DBlib/DBlib.so'
> for module Sybase:
> :DBlib: ld.so.1: /usr/local/bin/perl: fatal: libsybdb.so: can't open file: errno=2 at
> /usr/local/perl/5.2.0.0/solaris
> /lib/DynaLoader.pm line 140.
> 
> Can someone tell me what could be the problem ?

Read the FAQ. The problem is that your copy of DBlib.so seems to
need LD_LIBRARY_PATH being set (maybe the Sybase libraries have been
moved, or the modules were built on another system).

In any case, you need to either set LD_LIBRARY_PATH in your http
configuration (don't ask me how to do it - it depends on your
http server) or use a wrapper around your script that essentially
does:

#!/bin/sh
LD_LIBRARY_PATH='/usr/local/sybase/lib'
export LD_LIBRARY_PATH
exec realScriptName

with appropriate values for 'realScriptName' and /usr/local/sybase,
off course.

Michael

PS - do yourself a favor, get CGI.pm and use that instead of cgi-lib.pl
-- 
Michael Peppler       -||-  Data Migrations Inc.
mpeppler@datamig.com  -||-  http://www.mbay.net/~mpeppler