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: Sybase::CTlib.pm
Date: May 7 1998 2:13PM

Heinz Ringlhofer writes:
 > Try the following (put your environment variables in a begin block):
 > #!/usr/bin/perl.syb
 > BEGIN {
 >   $ENV{SYBASE} = "/opt/sybase";
 >   $ENV{DSQUERY}= "SQL_deepthought";
 >   $ENV{LD_LIBRARY_PATH}= "/opt/sybase/lib";
 > }

Looks like I'll never repeat this often enough...

***** You can't set LD_LIBRARY_PATH in the script itself *****

If your script NEEDS LD_LIBRARY_PATH to be set to a special value (to
make sure that the Sybase libraries are found at run-time) you MUST
set LD_LIBRARY_PATH *before* the script starts. With Apache this means 
using a

SetEnv	LD_LIBRARY_PATH /opt/sybase/lib

statement in one of the configuration files so that Apache sets the
variable before running the CGI scripts.

Michael

 > 
 > I dont have an Apache-server, but we use a similar technique with Netscape.
 > 
 > On May 7, 11:30am, Henning Drumann wrote:
 > > Subject: Sybase::CTlib.pm
 > > Hi,
 > >
 > > I am using CTlib under Linux. Now I wanted to use it in CGI-Scripts with
 > > an Apache-Server, based on Linux, too.
 > >
 > > Result: Internal Server Error
 > >
 > > I have set the environment and permissions right, I think ...
 > >
 > > This is a small test-script:
 > >
 > > #!/usr/bin/perl.syb
 > > $ENV{SYBASE} = "/opt/sybase";
 > > $ENV{DSQUERY}= "SQL_deepthought";
 > > $ENV{LD_LIBRARY_PATH}= "/opt/sybase/lib";
 > >
 > > print "Content-type: text/html\n\n\n";
 > > print "test\n";
 > >
 > > use Sybase::CTlib;
 > >
 > > print "";
 > > print "\n";
 > >
 > > If I comment out the use-line, the Script is ok.
 > >
 > > Any ideas?
 > >
 > > --
 > >
 > >  MfG
 > >  hd
 > >
 > >  -----------------------------------------------
 > >       Henning Drumann, Diplom-Informatiker
 > >   roka EDV und Datenkommunikationsberatung GmbH
 > >         Elbestrasse 25, D-47800 Krefeld
 > >
 > >                 E-Mail: hd@roka.net
 > >   Ruf: +49 2151-4975-35   Fax: +49 2151-4975-32
 > >  -----------------------------------------------
 > >
 > >-- End of excerpt from Henning Drumann
 > 
 > 

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