|
|
sybperl-l Archive
Up Prev Next
From: michael dot x dot peppler at jpmchase dot com
Subject: RE: Sybase freetds Solaris 10 CGI
Date: Jan 5 2009 9:04AM
This means that the LD_LIBRARY_PATH variable is not set correctly in the
Tomcat environment.
Michael
"Baby, Binu"
Sent by: owner-sybperl-l@peppler.org
01/03/2009 02:22 AM
To
cc
Subject
RE: Sybase freetds Solaris 10 CGI
When I comment off the use DBD:Sybase and just have use DBI in my cgi
script
I get the following error.
-------
install_driver(Sybase) failed: Can't load
'/usr/perl5/site_perl/5.8.4/sun4-solaris-64int/auto/DBD/Sybase/Sybase.so'
for modu
le DBD::Sybase: ld.so.1: perl: fatal: libct.so.3: open failed: No such
file or directory at /usr/perl5/5.8.4/lib/sun4-solari
s-64int/DynaLoader.pm line 230.
at (eval 4) line 3
Compilation failed in require at (eval 4) line 3.
Perhaps a required shared library or dll isn't installed where expected
at /export/home/netcool/connectOS.pl line 37
--------
The file does exist and below is the ldd O/P
ldd
/usr/perl5/site_perl/5.8.4/sun4-solaris-64int/auto/DBD/Sybase/Sybase.so
libct.so.3 => /usr/local/lib/libct.so.3
libintl.so.1 => /lib/libintl.so.1
libtds.so.4 => /usr/local/lib/libtds.so.4
libdl.so.1 => /lib/libdl.so.1
libm.so.2 => /lib/libm.so.2
libc.so.1 => /lib/libc.so.1
libnsl.so.1 => /lib/libnsl.so.1
libsocket.so.1 => /lib/libsocket.so.1
libiconv.so.2 => /usr/local/lib/libiconv.so.2
libgcc_s.so.1 => /usr/local/lib/libgcc_s.so.1
libmp.so.2 => /lib/libmp.so.2
libmd.so.1 => /lib/libmd.so.1
libscf.so.1 => /lib/libscf.so.1
libdoor.so.1 => /lib/libdoor.so.1
libuutil.so.1 => /lib/libuutil.so.1
libgen.so.1 => /lib/libgen.so.1
/platform/SUNW,Sun-Fire-V240/lib/libc_psr.so.1
/platform/SUNW,Sun-Fire-V240/lib/libmd_psr.so.1
The program always works fine when I run it form command prompt
Regards
Binu
From: owner-sybperl-l@peppler.org [mailto:owner-sybperl-l@peppler.org] On
Behalf Of Baby, Binu
Sent: Friday, January 02, 2009 5:01 PM
To: sybperl-l@peppler.org
Subject: RE: Sybase freetds Solaris 10 CGI
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.
-----------------------------------------
This communication is for informational purposes only. It is not
intended as an offer or solicitation for the purchase or sale of
any financial instrument or as an official confirmation of any
transaction. All market prices, data and other information are not
warranted as to completeness or accuracy and are subject to change
without notice. Any comments or statements made herein do not
necessarily reflect those of JPMorgan Chase & Co., its subsidiaries
and affiliates.
This transmission may contain information that is privileged,
confidential, legally privileged, and/or exempt from disclosure
under applicable law. If you are not the intended recipient, you
are hereby notified that any disclosure, copying, distribution, or
use of the information contained herein (including any reliance
thereon) is STRICTLY PROHIBITED. Although this transmission and any
attachments are believed to be free of any virus or other defect
that might affect any computer system into which it is received and
opened, it is the responsibility of the recipient to ensure that it
is virus free and no responsibility is accepted by JPMorgan Chase &
Co., its subsidiaries and affiliates, as applicable, for any loss
or damage arising in any way from its use. If you received this
transmission in error, please immediately contact the sender and
destroy the material in its entirety, whether in electronic or hard
copy format. Thank you.
Please refer to http://www.jpmorgan.com/pages/disclosures for
disclosures relating to UK legal entities.
|