For anyone who knows Perl really well, these should be some relatively quick and easy fixes.
I have 2 Perl scripts that have been working perfectly for me for the past year and a half. Now I have switched web hosts to a new server, and need them to work on the new setup.
The scripts are as follows:
Script #1. A very simple script that sets up my MySQL database table (for a database I've already created) and prepares it to accept customer order data variables. Right now it seems to produce an error when a database function is called. I have no idea why this is not working on the new server; it was working perfectly on the old one.
The code that seems to error out is the "db_error" call in:
my $dbh = DBI->connect("DBI:mysql:$database:$hostname", $user, $password) ||
db_error("unable to connect to $database", $DBI::errstr);
And when I removed the db_error call, it simply errored out a little later on on a do command in the line:
my $sth = $dbh->do($query);
Because these worked perfectly with the other server and seem to be common functions, I have no idea why they are not working on the new server.
Script #2. A script that takes my order data, charges the customer credit card, and puts the order data into the MySQL database table that script #1 set up. Again, this one seems to be having trouble when database functions are called, thus producing a 500 Internal Server Error.
Basically I just need these perl scripts to function perfectly on my new web host and then my site will be back to normal again.