in reply to Re: dbh connections: stumped!
in thread dbh connections: stumped!

OK, thanks very much for the help so far. I've implemented most of these suggestions, but the problem persists.

1. I've stopped using CGI and "fatalsToBrowser".
2. I've eliminate the "die" portion of the connect string.
3. I contacted my web hosting provider, but got a terse "we don't debug code" type of reply.
4. I re-uploaded the code after running dos2unix.

Some more info: the connection line is

my $dbh = DBI->connect('dbi:mysql:database=<i>dbname</i>;host=localhos +t','<i>uname</i>','<i>pword</i>');
If I mangle the first argument, I get a "Can't connect to database" error, just like I should. If I mangle either of the other two arguments, I get the same results as in my original message, a blank Firefox document or a "This page cannot be displayed" IE error. This time, however, the following lines appear in my error log (the Apache error log):
Use of uninitialized value in split at usr/local/lib/perl/5.8.4/Apache +.pm line 172.
Stil stumped, but again, thanks for the help so far. Kevin

Replies are listed 'Best First'.
Re^3: dbh connections: stumped!
by wfsp (Abbot) on Mar 12, 2006 at 07:47 UTC
    localhost? On a remote host? My ISP has given me an IP address to use there. I would check with the ISP for the correct connection details.

    Best of luck.

    wfsp

Re^3: dbh connections: stumped!
by graff (Chancellor) on Mar 13, 2006 at 02:29 UTC
    You haven't mentioned whether you have shell access on that server. If you did, you might be able to try out the mysql command on a command line, confirm that your connection parameters work that way at least, and generally poke around in your database account to make sure everything is kosher.

    I assume that your connection string does not actually include the html tags for "italic font" -- I think everyone here who is looking at your code is assuming that you put the  <i> ... </i> around "dbname", "uname" and "pword" just for the sake of posting, to clarify that you are (wisely) not showing us the real values that you actually use in those slots to make the connection.

    But just to be sure... if those "i" tags really are there in the script you're trying to run (and/or if that script isn't using the strings provided by the ISP for those slots), then that is surely the problem.