if i run this from the command line, it prints what I expect:#!perl -w use strict; use DBI; my $dbh = DBI->connect('dbi:mysql:database=msouth_reg_db;host=redacted +.example.com', 'user', 'pass'); my $rc = $dbh->disconnect; warn "dbh->disconnect returned [$rc]\n"; if (my $ping_val = $dbh->ping) { warn 'here is the thread id ['. $dbh->{mysql_thread_id} ."]\n"; warn "ping returned [$ping_val]\n"; warn "here are Apache-matching keys \%INC:". join "\n", grep {/Apa +che/} keys %INC; } else { warn "ping returned [$ping_val]"; }
If it runs via a "PerlRequire" in my apache conf:dbh->disconnect returned [1] ping returned [] at /home/msouth/disconnect.pl line 14.
the output upon starting apache is as follows:ErrorLog /home/msouth/local/apache/logs/error.log LockFile /home/msouth/local/apache/logs/httpd.lock PidFile /home/msouth/local/apache/logs/httpd.pid # Mod-perl <IfModule mod_perl.c> PerlRequire /home/msouth/disconnect.pl </IfModule> Port 8106
(new edit with additional information)dbh->disconnect returned [1] here is the thread id [774516] ping returned [1] here are Apache-matching keys %INC: at /home/msouth/disconnect.pl line + 11.
In reply to disconnect, then ping returns true under apache, false from command line, no Apache::DBI around. Why would this be? by msouth
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |