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: "Heinz Ringlhofer" <Heinz dot Ringlhofer at ZAMG dot AC dot AT>
Subject: Re: Sybase::CTlib.pm
Date: May 7 1998 2:38PM

I apologize, Michael Peppler is correct (as always)...

What we really do here is just setting the SYBASE variable via the BEGIN
block, LD_LIBRARY_PATH is set via Netscape config files ..

Actual BEGIN block:

BEGIN {
    $ENV{'SYBASE'} = '/opt/sybase' unless $ENV{'SYBASE'};
}


On May 7,  7:13am, Michael Peppler wrote:
> Subject: Re: Sybase::CTlib.pm
> 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
>
>-- End of excerpt from Michael Peppler