CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner: Re: [MDTech.us_MAN] Need help writing a script that interacts with a MySQL DB: Edit Log



FishMonger
Veteran / Moderator

Oct 23, 2012, 2:01 PM


Views: 6583
Re: [MDTech.us_MAN] Need help writing a script that interacts with a MySQL DB

The trace output goes to stderr by default, not stdout. You need to redirect it to the browser or to a file.
To redirect it to the browser you need to do this:

Code
use CGI::Carp qw(fatalsToBrowser warningsToBrowser);

Then after outputting the html header, add this:

Code
warningsToBrowser(1);


When redirected to the browser via warningsToBrowser, they show up as html comments, so you'd need to "view source" to see that output.

To redirect the trace output to a file, you add the optional "file" parameter to the DBI->trace call.
http://search.cpan.org/~timb/DBI-1.622/DBI.pm#Trace_Output


(This post was edited by FishMonger on Oct 23, 2012, 2:03 PM)


Edit Log:
Post edited by FishMonger (Veteran) on Oct 23, 2012, 2:03 PM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives