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: "Baby, Binu" <Binu dot Baby at qwest dot com>
Subject: RE: Sybase freetds Solaris 10 CGI
Date: Jan 3 2009 12:00AM

I have the below entries in tomcat web.xml file.

 

    

        cgi

 
org.apache.catalina.servlets.CGIServlet

        

          clientInputTimeout

          100

        

        

          debug

          6

        

        

          cgiPathPrefix

          WEB-INF/cgi

        

 

                

          passShellEnvironment

          true

        

 

        5

    

 

Below is the @INC and modules that gets loaded.

 

@INC = /usr/local/lib /usr/perl5/5.8.4/lib/sun4-solaris-64int
/usr/perl5/5.8.4/lib /usr/perl5/site_perl/5.8.4/sun4-solaris-64int
/usr/perl5/site_perl/5.8.4 /usr/perl5/site_perl
/usr/perl5/vendor_perl/5.8.4/sun4-solaris-64int
/usr/perl5/vendor_perl/5.8.4 /usr/perl5/vendor_perl . 

 

AutoLoader.pm => /usr/perl5/5.8.4/lib/AutoLoader.pm --------------
--------------
Carp.pm => /usr/perl5/5.8.4/lib/Carp.pm --------------
--------------
Config.pm => /usr/perl5/5.8.4/lib/sun4-solaris-64int/Config.pm
--------------
--------------
DBI.pm => /usr/perl5/site_perl/5.8.4/sun4-solaris-64int/DBI.pm
--------------
--------------
DynaLoader.pm => /usr/perl5/5.8.4/lib/sun4-solaris-64int/DynaLoader.pm
--------------
--------------
Exporter.pm => /usr/perl5/5.8.4/lib/Exporter.pm --------------
--------------
Exporter/Heavy.pm => /usr/perl5/5.8.4/lib/Exporter/Heavy.pm
--------------
--------------
List/Util.pm => /usr/perl5/5.8.4/lib/List/Util.pm --------------
--------------
Scalar/Util.pm => /usr/perl5/5.8.4/lib/Scalar/Util.pm --------------
--------------
lib.pm => /usr/perl5/5.8.4/lib/sun4-solaris-64int/lib.pm --------------
--------------
strict.pm => /usr/perl5/5.8.4/lib/strict.pm --------------
--------------
vars.pm => /usr/perl5/5.8.4/lib/vars.pm --------------
--------------
warnings.pm => /usr/perl5/5.8.4/lib/warnings.pm --------------
--------------
warnings/register.pm => /usr/perl5/5.8.4/lib/warnings/register.pm

 

Use DBD:Sybase is where it fails

 

Binu

 

 

From: Rearick, Kenneth [mailto:Rearick.Kenneth@mayo.edu] 
Sent: Friday, January 02, 2009 4:29 PM
To: Baby, Binu; sybperl-l@peppler.org
Subject: RE: Sybase freetds Solaris 10 CGI

 

Make sure the you are coping the environment variables in the apache. In
the htppd.conf you need something like this.

 



 

    # PassEnv Directive

    # Description: Passes environment variables from the shell

    # Syntax: PassEnv env-variable [env-variable] ...

    # Context: server config, virtual host, directory, .htaccess

    # Override: FileInfo

    # Status: Base

    # Module: mod_env

    #

    # Specifies one or more environment variables to pass to CGI scripts
and SSI pages from the environment of the shell which invoked the httpd
process.

    #

    # Example

    # PassEnv LD_LIBRARY_PATH

    #

    #

    # SetEnv Directive

    # Description: Sets environment variables

    # Syntax: SetEnv env-variable value

    # Context: server config, virtual host, directory, .htaccess

    # Override: FileInfo

    # Status: Base

    # Module: mod_env

    #

    # Sets an environment variable, which is then passed on to CGI
scripts and SSI pages.

    #

    # Example

    # SetEnv SPECIAL_PATH /foo/bin

    #

    #

    # UnsetEnv Directive

    # Description: Removes variables from the environment

    # Syntax: UnsetEnv env-variable [env-variable] ...

    # Context: server config, virtual host, directory, .htaccess

    # Override: FileInfo

    # Status: Base

    # Module: mod_env

    #

    # Removes one or more environment variables from those passed on to
CGI scripts and SSI pages.

    #

    # Example

    # UnsetEnv LD_LIBRARY_PATH

    #

 

    PassEnv LD_LIBRARY_PATH

    PassEnv SYBASE

    PassEnv SYBASE_OCS

    PassEnv DSQUERY

    PassEnv PERL5LIB

 

Kenneth N Rearick 
Xylo Technologies 
Information Services 
Sybase Database Group 
Phone: (507) 538-1214 
Pager:  (507) 270-0735 
OC 1-03-5 
Rearick.Kenneth@Mayo.edu 

 

________________________________

From: owner-sybperl-l@peppler.org [mailto:owner-sybperl-l@peppler.org]
On Behalf Of Baby, Binu
Sent: Friday, January 02, 2009 4:55 PM
To: sybperl-l@peppler.org
Subject: DBD:Sybase freetds Solaris 10 CGI

 

I am using Freetds,  DBD:Sybase on solaris 10 connect to Syabase
databse.

The program is able to connect and access data when I run it from
command prompt

 

But the same script fails if I run it as CGI from apache/tomcat.

 

The script fails at line

Use DBD::Sybase

 

Any suggestions?

 

Regards

Binu



This communication is the property of Qwest and may contain confidential
or privileged information. Unauthorized use of this communication is
strictly prohibited and may be unlawful. If you have received this
communication in error, please immediately notify the sender by reply
e-mail and destroy all copies of the communication and any attachments.