Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^2: DBI trace has limited output

by Anonymous Monk
on Oct 25, 2021 at 10:51 UTC ( #11138004=note: print w/replies, xml ) Need Help??


in reply to Re: DBI trace has limited output
in thread DBI trace has limited output

Thanks a lot for your effort.I found what happens.I had to wrap the following in a BEGIN block at the top of the CGI script:

BEGIN { $ENV{DBI_TRACE}='15=/var/www/xx/dbitrace.log';use DBI; }

The output now shows everything including the sql statements and the data retrieved.
What does BEGIN do and why has it made such a big difference? I think it has something to do with the environment that Apache/CGI runs,like that Apache initializes something before the perl script runs? What do you think?

Replies are listed 'Best First'.
Re^3: DBI trace has limited output
by bliako (Monsignor) on Oct 25, 2021 at 20:36 UTC

    This is equivalent to DBI_TRACE=15 perl myscript.pl. Your solution looks to me to be the nuclear option. I would investigate further. With Apache, since Re: DBI trace has limited output (this has already done it for you without Apache.

Re^3: DBI trace has limited output
by Anonymous Monk on Oct 25, 2021 at 11:24 UTC

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2022-05-28 20:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (101 votes). Check out past polls.

    Notices?