Poste den entsprechenden Code, sonst ist dir nicht zu helfen.
Wie gesagt, in der DOS-Shell funktioniert das Script. Aber möglich ist alles...
Gruß
Marcus
#!/usr/bin/perl
use DBI;
use strict;
print "Content-type: text/html\n\n";
print "<HTML><HEAD></HEAD><BODY>\n";
print "Test: ";
my($db_typ, $db_name, $hostname, $port, $dbh, $sth, $rc, $i, $ref);
$db_typ = 'mysql';
$db_name = 'webdata';
chomp ($hostname = '127.0.0.1');
$port = 3306;
$dbh = DBI->connect("DBI:$db_typ:$db_name:$hostname:$port", "root", "passwort");
print "Fehler: $DBI::errstr";
if ($DBI::errstr ne "") {die}
$sth = $dbh->prepare(<<SLCT);
SELECT * FROM mitarbeiter
SLCT
$sth->execute;
my $namen = $sth->{'NAME'};
my $anzFelder = $sth->{'NUM_OF_FIELDS'};
for ($i = 0; $i < $anzFelder; $i++)
{
printf("%s%s", $$namen[$i], $i ? "," : "");
}
print "\n";
while ($ref = $sth->fetchrow_arrayref)
{
for ($i = 0; $i < $anzFelder; $i++)
{
printf("%s%s", $$ref[$i], $i ? "," : "");
}
print "\n";
}
$sth->finish;
$rc = $dbh->disconnect;
print "</BODY></HTML>";