Question : DBI failure on web

I've got some code that's working great on some boxes (Win2K webservers and an old NT webserver) and is failing completely on another box (Win2K).

Here's the code:
$ContentType   = "Content-type:  text/html\n\n";

#--- Query Oracle
use DBI;

#open connection to Oracle database

$dbh = DBI->connect('dbi:ODBC:oraDB','username', 'password');

#prepare and execute SQL statement
$query="SELECT USR_FNAME from USERS where PKUSR = 100040";
$sth = $dbh->prepare($query);
$sth->execute || die "Could not execute SQL statement ... maybe invalid?";

#output database results

while (@row=$sth->fetchrow_array)
 {
 print $ContentType;
 $FNAME = $row[0];
 print "First Name: $FNAME
\n";
 }

$sth->finish;

I can't figure out why the code isn't working on the one problem box. An identical DSN has been set up on each server. I've verified via Oracle ODBC 32 test that the connection to the Oracle tables is good. I can run the PERL code from the command prompt and it works fine (on ALL the servers, including the problem webserver), returning

First name: Timothy

as it should. However, if I run the PERL from my browser on the problem webserver....NOTHING. It eventually times out. Seems like it never gets to the Oracle tables. I'm stumped.

Any ideas?

--Timothy

Answer : DBI failure on web

These three:

TCP    0.0.0.0:21             0.0.0.0:0              LISTENING
TCP    0.0.0.0:80             0.0.0.0:0              LISTENING
TCP    0.0.0.0:443            0.0.0.0:0              LISTENING

tell you that IIS is listening for ftp, http, and https. That's good.
I Can't wait to see the results of the scripts. I'd like to help you find out what's going wrong.
It doesn't seem to be a real perl problem though, as your script runs fine under your own account.
Random Solutions  
 
programming4us programming4us