in reply to Re: Installing and Testing DBI
in thread Installing and Testing DBI
Thank you for the suggestion. I tried it as well as the one below but still the blank page.
I guess I'll have to try it via shell access. I think I can get shell access if I can find the last part of the cpanel URL. My host recently removed some of the cpanel links and disabled the direct cpan module installation--probably time to find a new host.
#!/usr/bin/perl use strict; use CGI qw(:all); use CGI::Carp qw( fatalsToBrowser ); use Mysql; use DBI; # Here's how to include the DBI module print ("Content-Type: text/html\n\n"); $DB_Host = "localhost"; $DB_Name = "username_webapp"; $DB_User = "username_webadmi"; $DB_Password = "password"; print "Trying to connect to MySQL DB<br>"; if (!($dbh = Mysql->Connect($DB_Host,$DB_Name,$DB_User,$DB_Password))) { print "Could Not Connect to Database! Reason: ".($Mysql::db_errstr) +; exit; } print "Successful MySQL DB Connection"; exit 0;
|
|---|