|
|
sybperl-l Archive
Up Prev Next
From: Jagadeesan Manivannan <manivannan_j at jpmorgan dot com>
Subject: Sybperl problem
Date: Oct 7 1997 10:21PM
Hi
I have a perl with sybperl script which runs fine
when run in UNIX prompt. runs fine. But
the same script when run run under http server
complains with the following error message.
The https server is running under solaris.
Can't load '/usr/local/perl/5.2.0.0/solaris/lib/site_perl/sun4-solaris/auto/Sybase/DBlib/DBlib.so'
for module Sybase:
:DBlib: ld.so.1: /usr/local/bin/perl: fatal: libsybdb.so: can't open file: errno=2 at
/usr/local/perl/5.2.0.0/solaris
/lib/DynaLoader.pm line 140.
Can someone tell me what could be the problem ?
Thanks
Mani
Note :
Here is the script that I am using.
#!/usr/local/bin/perl
Here is the script that I am using.
use Sybase::DBlib ;
use Sybase::Sybperl ;
push (@INC, "/cgi-bin");
require("mycgi-lib.pl");
&ReadParse (*input);
$logname = $input{UserName};
$passwd = $input{PasswordName};
$vers = $input{vers};
$wintype = $input{WindowType};
$DOCUMENT_ROOT = GetDocRoot() ;
print("Content-type: text/html\n");
$ret_stat = ReadConfVariables() ;
if ( $ret_stat == -1 )
{
print ("\n\n");
ErrReturn ("Can not open WebModel.cfg file. Please notify the system administrator");
}
$pkg_vers = $ENV{'VERSION'} ;
if ( !defined($pkg_vers) )
{
print ("\n\n");
ErrReturn ("Can not find VERSION in WebModel.cfg file. Please notify the system
administrator");
}
if ( $vers ne $pkg_vers )
{
print ("\n\n");
$errstr = "You are not accessing the latest version of SAGE. " ;
$errstr = $errstr . "Please clear your cache and reload SAGE or contact your system
adminstrator." ;
ErrReturn ($errstr);
}
$dbSrvName = $ENV{'SERVER'} ;
$syb_dir = $ENV{'SYBASE_DIR'} ;
if (!defined ($dbSrvName))
{
print ("\n\n");
ErrReturn ("Can not find SERVER in WebModel.cfg file. Please notify the system administrator");
}
if (!defined ($syb_dir))
{
print ("\n\n");
ErrReturn ("Can not find SYBASE_DIR in WebModel.cfg file. Please notify the system
administrator");
}
$ENV{'SYBASE'} = $syb_dir ;
$IsExtWeb = $ENV{'EXTERN_WEB'};
if ((!defined ($IsExtWeb) || $IsExtWeb eq "" ))
{
print "\n\n";
ErrReturn ("Can not find EXTERN_WEB in WebModel.cfg file. Please notify the system
administrator");
}
if ($IsExtWeb eq "NO") #internal web need ext_web's url
{ #for sales log
$extWebUrl = $ENV{'EXT_WEB_URL'};
if ((!defined ($extWebUrl) || $extWebUrl eq "" ))
{
print "\n\n";
ErrReturn ("Can not find EXT_WEB_URL in WebModel.cfg file. Please notify the system
administrator");
}
}
if (defined ($logname) && ($logname ne '') &&
defined ($passwd) )
{
$login_str = sprintf("%s+%s",$logname,$passwd) ;
$enc_login_str = `$DOCUMENT_ROOT/../../cgi-bin/sageEnc -e $login_str` ;
$enc_login_str =~ s/\n$//g ;
print ("Set-Cookie: myLogin=", $enc_login_str,
"; domain=.jpmorgan.com; path=/; \n");
print ("Set-Cookie: myDbSrv=", $dbSrvName, ";\n\n");
$d = &dblogin ($logname, $passwd, $dbSrvName);
if (!$d)
{
print ("\n\n");
$errmsg="Login failed";
}
}
else
{
print ("\n\n");
$errmsg="Login failed. Please enter your name and password.";
}
if (defined ($errmsg))
{
ErrReturn ($errmsg);
}
if ($wintype eq 'ANALYTICS')
{
&writeSrc("sage.html");
}
else
{
&writeSrc("c_sage.html");
}
sub ErrReturn ()
{
local($errStr) = @_;
print<<"print_tag";
$errStr
print_tag
exit;
}
|