I connect with code like this, using DBD-Oracle-1.03 under Oracle 8.1.0 on
Solaris:
my $dbh = DBI->connect( $datasource, $dbuser, $dbpassword,
{
RaiseError => 1,
AutoCommit => 1
}) || die "Couldn't connect to $datasource:";
This fine from the shell and with Apache 1.3.9 and mod_perl 1.21.
On a totally different setup, where I have Oracle 8.1.5 on Solaris and connect
using DBD::Oracle on a Linux webserver with the latest apache/mod_perl and
Apache::DBI, I connect like this (in startup.pl):
BEGIN {
$ENV{ORACLE_HOME} = "/usr/oracle/8";
$ENV{TWO_TASK} = "cc";
$ENV{ORACLE_SID} = "CC";
$ENV{EPC_DISABLED} = "TRUE";
$ENV{ORAPIPES} = "V2";
}
Apache::DBI->connect_on_init ( "$datasource", "$dbuser", "$dbpassword",
{
PrintError => 1, # warn() on errors
RaiseError => 1, # do not die on error
AutoCommit => 1, # commit all executes imediately
LongReadLen => 2147483647,
LongTruncOk => 1
}) || die "Couldn't connect to $datasource", $DBI::errstr;
And everything has been working fine for several months. I still want to do
more tuning on it, though.
One thing I have noticed: Doing perl stuff on Solaris really does suck. I get
segfaults on really wierd things. E.g, if I add Date::Calc to startup.pl,
apache will segfault on start. I think I may have to get the sources to
everything (perl, apache, mod_perl, etc, etc) and compile from scratch...
On 30-Jun-2000 sridhar balaram wrote:
> got problem with the DBD-Oracle-1.03 module under
> Solaris 8 with
> Oracle 8.1.5. Things work fine when I set the
> environment variable
> TWO_TASK=T:solaris:orcl but when I do this I have
> problem running
> Oracle Server Manager (svrmgrl), so I will have to
> unset the TWO_TASK
> variable again before launching svrmgrl. Is there a
> workaround to this
> problem? I have Perl 5.6.0 and mod_perl 1.2.4
> installed with
> apache 1.3.12. (I also have installed the DBI module).
>
> When I run a perl program which queries the Oracle 8i
> database I get
> the results, but after it lists the records I get
> Segmentation Fault -
> Core Dumped.
>
> I don't have any of these problems in my Linux Box
> with Oracle 8
>
> __________________________________________________
> Do You Yahoo!?
> Get Yahoo! Mail - Free email you can access from anywhere!
> http://mail.yahoo.com/
Regards,
Wim Kerkhoff, Software Engineer
NetMaster Networking Solutions
[EMAIL PROTECTED]