Re: DBI::ProfileDumper::Apache and mod_perl 2



On Tue, Sep 11, 2007 at 12:47:58AM +1000, Brett Randall wrote:
G'day all

I'm trying to get DBI::ProfileDumper::Apache working under mod_perl 2
and am having no luck at all. I've followed the easy instructions as per
the doc and put into my httpd.conf's <VirtualHost> section:

PerlSetEnv DBI_PROFILE_APACHE_LOG_DIR /var/log/apache2
PerlSetEnv DBI_PROFILE 2/DBI::ProfileDumper::Apache
PerlOptions +GlobalRequest

I've also tried replacing PerlSetEnv with SetEnv in case that might help
and it doesn't. The symptom is that no dbi.prof files are created, and
no errors are logged to error_log. Apache 2 starts normally but no joy
with getting any Profile data out. I haven't tried ProfileDumper with
mod_perl 2 up until now but have enjoyed success previously with
mod_perl 1.

I've performed an strace of httpd and see it load the
DBI::ProfileDumper::Apache module when apache starts,

Assuming you don't explictly load DBI::ProfileDumper::Apache elsewhere
then that means the DBI_PROFILE env var is being recognised and processed.

It should then enable profiling for all driver loaded after the
env var is set. So be sure you're not explicitly loading the
driver, let DBI do that in a connect statement (or be sure to load it
after DBI_PROFILE has been set).

but there is no attempt to open any dbi.prof files to write to.

The file gets written when the child process exits.

Does anyone have any suggestions how I can debug this further and figure
out why I cannot get it working?

Check the above. Then check $dbh->{Profile} is true.

(If you've still no joy I may be able to check a mod_perl2 setup in a
day or two.)

Tim.

I am running Apache 2.2.3, mod_perl
2.0.2, Perl 5.8.8 and DBI 1.59 on a Debian Etch box. I was running
factory Apache 2, MySQL, DBI and DBD modules that weren't working, then
downloaded my own MySQL, DBI and DBD source packages, removed the
prebuilt ones and built my own with the same end result (still factory
Apache 2 though - yet to attempt my first Apache 2 compile from
scratch).
.



Relevant Pages

  • DBI::ProfileDumper::Apache and mod_perl 2
    ... Apache 2 starts normally but no joy ... factory Apache 2, MySQL, DBI and DBD modules that weren't working, then ... downloaded my own MySQL, DBI and DBD source packages, removed the ...
    (perl.dbi.users)
  • DBI on HP-UX 11.11 with Perl 5.8.3 and Apache (mod_perl 1.99)
    ... I am unsuccessfully trying to use DBI under mod_perl on HP-UX ... I have tried compiling different ways and reading ... The Apache installation is the standard "HPWS" (HP Web Server) ...
    (comp.sys.hp.hpux)
  • RE: Apache, DBI, Oracle
    ... Isn't server error a permissions problem? ... Subject: Apache, DBI, Oracle ... Does anyone have a step by step procedure for configuring apache, ...
    (perl.dbi.users)
  • RE: Apache, DBI, Oracle
    ... In your Apache error_log, it will give you the nature of the server error which will help you to troubleshoot whether it's a permissions problem, browser problem, or some other issue. ... This is not a DBI issue per se, so if you'd like to continue off-line, feel free to contact me directly. ...
    (perl.dbi.users)
  • RE: use DBI in perl cgi script
    ... I didn't see anything unusual in my apache logs... ... statement use DBI at the top because I am doing some database stuff. ... the status bar at the bottom of the web browser. ...
    (perl.dbi.users)