Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: DBI trace and Apache

by Corion (Patriarch)
on Sep 14, 2019 at 07:21 UTC ( [id://11106164]=note: print w/replies, xml ) Need Help??


in reply to DBI trace and Apache

Maybe it is your version of DBI on that machine?

You can output that by using

print "Installed DB driver versions, and DBI version:\n"; DBI->installed_versions;

This will output something like:

Perl : 5.028001 (x86_64-linux-gnu-thread-multi) OS : linux (4.9.0) DBI : 1.642 DBD::Sponge : 12.010003 DBD::SQLite : 1.64 DBD::Proxy : install_driver(Proxy) failed: Can't locate RPC/PlC +lient.pm in @INC (you may need to install the RPC::PlClient module) DBD::Mem : 0.001 DBD::Gofer : 0.015327 DBD::File : 0.44 DBD::ExampleP : 12.014311 DBD::DBM : 0.08

Alternatively, you can hook into the execution of SQL statements and output them yourself (if the version of DBI is recent enough):

sub dbh_install( $self, $dbh ) { my $previous_handler = $dbh->{HandleError}; $dbh->{Callbacks} = { prepare => sub { my ($dbh, $query, $attrs) = @_; print "Preparing q{$query}\n" }, execute => sub { print "Executing ", shift->{Statement}, "\n"; } }; }

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11106164]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (2)
As of 2024-04-26 01:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found