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

Reply via email to