Okay...
Rebooting the computer made no difference whatsoever.
So I built a minimal script as follows:
#!perl
print ("Content-type: text/html\n\n");
use strict;
use vars qw($query $dsn $driver $db_username $db_password $dbh);
require 5.006; $| = 1; ($0 =~ m,(.*)/[^/]+,) && unshift (@INC, "$1"); ($0 =~
m,(.*)\\[^\\]+,) && unshift (@INC, "$1");
use CGI qw(:standard); use CGI::Carp 'fatalsToBrowser';
$CGI::POST_MAX = (1024 * 0); $CGI::DISABLE_UPLOADS = 1;
$query = new CGI;
use DBI();
$driver = "mysql";
$dsn = "DBI:$driver:database=shapeshifter;host=localhost";
$db_username = "xxxxxxxx";
$db_password = "xxxxxxxx";
warn "Before DBI->connect(): [$$]";
$dbh = DBI->connect($dsn, $db_username, $db_password, {'RaiseError' => 1})
or die sprintf "Error: %s.\n", DBI->errstr;
warn "After DBI->connect() [$$]";
my $sth = $dbh->prepare("SELECT * FROM frontpage");
$sth->execute();
while (my $ref = $sth->fetchrow_hashref()) {
print qq~Found a row: id = $ref->{'serial_number'}, name =
$ref->{'position'}<BR>~;
}
$sth->finish();
$dbh->disconnect();
if ($ENV{'MOD_PERL'}) {
print "Mod_perl is installed on this server:
$ENV{'MOD_PERL'}<br><br>\n";
} else {
print "Mod_perl is not installed on this server<br><br>\n";
}
When running this I get a "200 OK" message in the browser as follows:
OK
The server encountered an internal error or misconfiguration and was unable
to complete your request.
Please contact the server administrator, [EMAIL PROTECTED] and
inform them of the time the error occurred, and anything you might have done
that may have caused the error.
More information about this error may be available in the server error log.
----------------------------------------------------------------------------
----
Apache/1.3.19 Server at localhost Port 80
The "error.log" file (Apache) contains the following:
[Tue May 22 02:35:03 2001] nul: Before DBI->connect(): [500] at
e:/pad/htdocs/internet/system/db_test.cgi line 20.
[Tue May 22 02:35:03 2001] [error] DBI->connect failed: Can't connect to
MySQL server on 'localhost' (10061) at
e:/pad/htdocs/internet/system/db_test.cgi line 21
Now I'm completely stumped. Can anyone spot anything obvious from this?
FYI, I have attached my "httpd.conf" in its entirety in case that helps.
Kindest regards,
Jonathan M. Hollin
Digital-Word.com
httpd.conf