http://qs321.pair.com?node_id=11149669


in reply to Re: What is the proper data structure for CAP::DBH?
in thread What is the proper data structure for CAP::DBH?

Thanks for the suggestions. Unfortunately, no form of those work. It just hangs. No error message even though I have set: use CGI::Carp qw(fatalsToBrowser);

I tried with both a semi-colon and colon between the database name and host name but no joy. Just to be sure, Data Dumper showed:

'DBI:mysql:highgatevps_kcmach;vdb2b.pair.com'

I'll reach out to Pair and see if their logs show the issue (nothing in the logs they provide for users).

—Brad
"The important work of moving the world forward does not wait to be done by perfect men." George Eliot

Replies are listed 'Best First'.
Re^3: What is the proper data structure for CAP::DBH?
by hippo (Bishop) on Jan 18, 2023 at 13:53 UTC
    'DBI:mysql:highgatevps_kcmach;vdb2b.pair.com'

    The keywords database and host are still missing.


    🦛

      I tried it every way, but just hangs.

      $VAR1 = 'DBI:mysql:database=highgatevps_kcmach;host=vdb2b.pair.com';

      On another note, why use sprintf? Elegance? I've always used it for formatting numbers, but not in the way hv did. Nice.

      —Brad
      "The important work of moving the world forward does not wait to be done by perfect men." George Eliot

        It would be better if you showed more complete code. Don't show passwords, but do flesh out what you have for:

        $self->dbh_config($data_source, $username, $auth, \%attr);

        That's from CGI::Application::Plugin::DBH's SYNOPSIS. You should show us your equivalent code.

        Unfortunately, "just hangs" does not help us at all. I'd be surprised if there's no feedback at all about this. The absence of "200 OK" in the log output could be telling; please show us what's there (error.log, access.log, others).

        Just a wild guess, but do check that you're not interpolating strings with special characters; e.g. pass$word.

        The sprintf() function is useful in many cases, not just number formatting. See its documentation for a huge number of examples.

        — Ken