Hi, Is there a way to determine which libraries the DBI/DBD used when it was installed? This information is not in perl -V. There are several different SYBASE home directories on this server each with sub-directories for ASE or OCS versions. (I didn't install it -- I assume that this can be configured somehow in the makefile or otherwise when installing.) I am now getting a more specific error message when I set SYBASE to OCS. The dba says that this config file, 'objectid/dat', is used by ASE not OCS. The context allocation routine failed. The following problem caused the failure: Invalid context version. The context allocation routine failed when it tried to load localization files!! One or more following problems may caused the failure Your sybase home directory is /home/sybase/OCS-12_5. Check the environment variable SYBASE if it is not the one you want! Cannot access file /home/sybase/OCS-12_5/config/objectid.dat So maybe I should ask my admin to reinstall DBI/DBD with the Sybase I want rather than letting it default? Thanks, Pete
----- Original Message ---- From: Michael Peppler <[EMAIL PROTECTED]> To: Peter Levine <[EMAIL PROTECTED]> Cc: Tim Bunce <[EMAIL PROTECTED]>; [email protected] Sent: Wednesday, February 13, 2008 11:07:42 AM Subject: Re: DBD::Sybase context allocation routine failed What this means is that the SYBASE env. variable points to the wrong directory when running the CGI script. This directory most likely has older Sybase OpenClient libraries, hence the invalid context error. Michael Peter Levine wrote: > hi, > > I should add that i am running this as a cgi-bin script. And that i get the > error whether or not I include a print header() statement. > > Also, I do not get the error if I run the script from the command line with > the print header() statement. > > Pete > > > ----- Original Message ---- > From: Tim Bunce <[EMAIL PROTECTED]> > To: Alexander Foken <[EMAIL PROTECTED]> > Cc: Peter Levine <[EMAIL PROTECTED]>; [email protected] > Sent: Wednesday, February 13, 2008 8:59:27 AM > Subject: Re: DBD::Sybase context allocation routine failed > > True, but _very_ unlikely to be relevant to this problem. > > Tim. > > On Wed, Feb 13, 2008 at 04:04:23PM +0100, Alexander Foken wrote: >> You need the module, but you should not load it explicitly. DBI will take >> care of loading and initialising the module. >> >> Alexander >> >> On 13.02.2008 07:09, Peter Levine wrote: >>> Hi, >>> >>> Hmmm. I thought I needed it. So are you saying that i can do all my SQL >>> statments (just basic inserts, updates and selects) without he DBD module? >>> I guess then I'm unclear on when I would need it. >>> >>> Pete >>> >>> ----- Original Message ---- >>> From: Jonathan Leffler <[EMAIL PROTECTED]> >>> To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> >>> Cc: [email protected] >>> Sent: Tuesday, February 12, 2008 6:25:35 PM >>> Subject: Re: DBD::Sybase context allocation routine failed >>> >>> >>> >>> On Feb 12, 2008 3:26 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: >>> >>> attempting a DB connection using a brand new installation of perl >>> 5.8.8 on an old sun box: 'sun4u sparc SUNW,Ultra-4'. >>> >>> i have connectivity. >>> this command line script returns a reference to a hash: >>> perl -MDBI -e 'print DBI- >>> >>> >>>> connect("DBI:Sybase:server=xxxx","user","password")' >>>> >>> but when i attempt to run this stub script: >>> >>> #!/usr/local/bin/perl5.8.8 >>> use strict; >>> use CGI qw(:standard); >>> use DBI; >>> >>> use DBD::Sybase; >>> >>> I get this error: >>> >>> The context allocation routine failed. The following problem caused >>> the failure: Invalid context version. Content-Type: text/html; >>> charset=ISO-8859-1 >>> >>> I don't get the error it if I comment out the DBD::Sybase statement >>> >>> Any help is much appreciated. >>> Why do you want to 'use DBD::Sybase' given that the working example shows >>> that it is not necessary to do so? >>> >>> If you were importing some specific symbols from DBD::Sybase, it would make >>> sense - but you aren't self-evidently doing that, so it doesn't make much >>> sense. >>> >>> >>> >>> >>> >>> >>> >>> >> >> -- >> Alexander Foken >> mailto:[EMAIL PROTECTED] http://www.foken.de/alexander/ -- Michael Peppler - Peppler Consulting SaRL [EMAIL PROTECTED] - http://www.peppler.org Sybase DBA/Developer - TeamSybase: http://www.teamsybase.com Sybase on Linux FAQ - http://www.peppler.org/FAQ/linux.html
