|
|
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 1:22AM
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.
|