Dear All,
I hope someone can help with this, its driving me insane:
I have a piece of code:
#!/usr/bin/perl
# PERL MODULES WE WILL BE USING
use DBI;
# HTTP HEADER
print "Content-type: text/html \n\n";
# CONFIG VARIABLES
$platform = "mysql";
$database = "database";
$host = "host";
$port = "port";
$tablename = "table";
$user = "user";
$pw = "password";
#DATA SOURCE NAME
$dsn = "dbi:mysql:$database:$host:3306";
# PERL DBI CONNECT (RENAMED HANDLE)
$dbstore = DBI->connect($dsn, $user, $pw) or die "Unable to connect: $DBI::errstr\n";
When run all I get is a blank screen, no errors or anything. So I printed a few lines to see where it was falling over. I can print a statement above "$dbstore = DBI->connect($dsn, $user, $pw) or die "Unable to connect: $DBI::errstr\n";"
but not below, meaning it must be falling over in this area. Any ideas would be welcome as to getting this script working.
Many thanks in advance
I hope someone can help with this, its driving me insane:
I have a piece of code:
#!/usr/bin/perl
# PERL MODULES WE WILL BE USING
use DBI;
# HTTP HEADER
print "Content-type: text/html \n\n";
# CONFIG VARIABLES
$platform = "mysql";
$database = "database";
$host = "host";
$port = "port";
$tablename = "table";
$user = "user";
$pw = "password";
#DATA SOURCE NAME
$dsn = "dbi:mysql:$database:$host:3306";
# PERL DBI CONNECT (RENAMED HANDLE)
$dbstore = DBI->connect($dsn, $user, $pw) or die "Unable to connect: $DBI::errstr\n";
When run all I get is a blank screen, no errors or anything. So I printed a few lines to see where it was falling over. I can print a statement above "$dbstore = DBI->connect($dsn, $user, $pw) or die "Unable to connect: $DBI::errstr\n";"
but not below, meaning it must be falling over in this area. Any ideas would be welcome as to getting this script working.
Many thanks in advance