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 <Tim.Bunce@xxxxxxxxx>
To: Alexander Foken <alexander@xxxxxxxx>
Cc: Peter Levine <levinepw@xxxxxxxxx>; dbi-users@xxxxxxxx
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 <jonathan.leffler@xxxxxxxxx>
To: "levinepw@xxxxxxxxx" <levinepw@xxxxxxxxx>
Cc: dbi-users@xxxxxxxx
Sent: Tuesday, February 12, 2008 6:25:35 PM
Subject: Re: DBD::Sybase context allocation routine failed



On Feb 12, 2008 3:26 PM, levinepw@xxxxxxxxx <levinepw@xxxxxxxxx> 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:alexander@xxxxxxxx http://www.foken.de/alexander/


--
Michael Peppler - Peppler Consulting SaRL
mpeppler@xxxxxxxxxxx - http://www.peppler.org
Sybase DBA/Developer - TeamSybase: http://www.teamsybase.com
Sybase on Linux FAQ - http://www.peppler.org/FAQ/linux.html
.



Relevant Pages

  • Re: DBD::Sybase context allocation routine failed
    ... The dba says that this config file, 'objectid/dat', is used by ASE not OCS. ... So maybe I should ask my admin to reinstall DBI/DBD with the Sybase I want rather than letting it default? ... Subject: DBD::Sybase context allocation routine failed ... I should add that i am running this as a cgi-bin script. ...
    (perl.dbi.users)
  • Re: Startup script
    ... > I need a script to provide automatic start/stop of Sybase 12.5.3 during ... > startup/shutdown of my Red Hat EL 4 server. ...
    (comp.databases.sybase)
  • Re: Sybase::CTLib ct_connect problem
    ... Sybase::DBlib instead of CTlib, everything works fine. ... get this error when i try to use Sybperl in a perl script. ... s> I am trying to use SyBase::CTLib with perl 5.6 and sybase ASE 12.5. ... s> external dependency file in the directory $SYBASE/ ...
    (comp.lang.perl.misc)
  • Re: Installing Open client 12.5 32 bit on IBM AIX
    ... The context allocation routine failed when it tried to load localization ... environment variable SYBASE if it is not the one you want! ...
    (comp.databases.sybase)
  • Re: Sybase rc2.d script wont start at boot.
    ... > simply called sybase. ... > will not start at boot, but works perfectly after boot from the ... > it works at the command line it doesn't make sense a typo would be ... I'll just put the part of the script in here that I can't get to work: ...
    (comp.os.linux.misc)