Under Windows, the error log is in the folder where is your server
installed.
If you have Apache, check C:\program files\Apache
group\apache\logs\error.log

Teddy,
Teddy's Center: http://teddy.fcc.ro/
Email: [EMAIL PROTECTED]

----- Original Message -----
From: "Jattie van der Linde" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, February 03, 2003 1:41 PM
Subject: Perl on IIS Error logs and DBI:ODBC questions


I am running a cgi scrips written in perl using DBI:ODBC and I'm reading
data from a MSAccess database and trying to output that as a HTML document
on our intranet.

The script runs fine from the commandline but as soon as I run this from a
web interface the output dissapears and I see no error messages or nothing
is printed from my die routine. The documentation and the FAQ in the DBI
help says to look at the log files that would show the obvious problem with
permisiions from the anonymous user etc, but I can not find this log file.

I found some log files under C:\WINNT\system32\LogFiles\W3SVC1

that showed some events but no meaningfull error messages

#Date: 2003-02-03 11:05:54
#Fields: time c-ip cs-method cs-uri-stem cs-uri-query sc-status
sc-win32-status cs-version cs-host cs(User-Agent)
11:05:54 127.0.0.1 GET /Employees.cgi - 200 0 HTTP/1.1 localhost
Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.0)

what happens with the output of : or die "$DBI::errstr\n";

Would this print out on the HTML page or does this section generate the
error log? is there some other error log that will show my error message
outputting the HTML page?

Thanks

Jattie van der Linde


Below my code reading the database file:

<code>
#!/usr/bin/perl
use DBI;
use CGI;

my $DSN = 'driver=Microsoft Access Driver
(*.mdb);dbq=D:\\Data\\TimeSheet.mdb';

my $query = new CGI;
print $query->header;
my $dbh = DBI->connect("dbi:ODBC:$DSN", '','') or die "$DBI::errstr\n";
print $query->start_html();

print ("<h1>Employees</h1>");

my $sth = $dbh->prepare( "
            SELECT Employees.Name, Employees.`email address`, Employees.Ext,
Employees.`Mobile No`, Employees.`Direct Line`
FROM `\\\\Msl-master\\TimeSheet\\TimeSheet.mdb`.Employees Employees
ORDER BY Employees.Name
          " );
$sth->execute;
while ( my ($Emp_Name, $Emp_email, $Emp_Ext, $Emp_Mob, $Emp_Direct) =
$sth->fetchrow_array ) {
print ("$Emp_Name, $Emp_email, $Emp_Ext, $Emp_Mob, $Emp_Direct<BR>\n");

}

$dbh->disconnect;

print $query->end_html;
exit;
</code>


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to