Hi Folks,

Everything is working great but I can't make a connection to my Oracle database (which 
is on another server) using mod_perl.

-Perl 5.005_03 is working great.
-mod_perl 1.24_01 is working great with apache 1.3.14
-DBI 1.14 connections are working great with DBD Oracle 1.06

I can connect to test.cgi and produce the output with 
Options +ExecCGI 
SetHandler cgi-script.

But when I use:
Options +ExecCGI 
SetHandler perl-script 
PerlHandler Apache::Registry 
I get no error message in the error_log, and a simple "The page cannot be displayed" 
in the browser.

I know that test.cgi is being found since I have a 'warn' message in it which gets 
sent to the error_log.

HELP, Please,  I've been working on this for days and have run out of ideas!

Thanks!  

Bob

P.S.  test.cgi follows:

#!/usr/local/bin/perl  
use strict;
use DBI;
warn "hello!";
use CGI qw(:standard);
my $query = new CGI;
my $dbh = DBI->connect( 'dbi:Oracle:GEORGE',
                        'userid',
                        'passwork',
                        {
                          RaiseError => 1,
                          AutoCommit => 0
                        }
                      ) || die "Database connection not made: $DBI::errstr";

my $sql = qq{ select survey_set_id, pub_id, start_date, end_date from survey_set};
my $sth = $dbh->prepare( $sql );
$sth->execute();

my( $id, $pub_id, $start, $end );
$sth->bind_columns( undef, \$id, \$pub_id, \$start, \$end );

print $query->header;
while( $sth->fetch() ) {
  print "$pub_id, $start, $end\n\n";
}

$sth->finish();

$dbh->disconnect();

Reply via email to