Re: [mp2] Apache::DBI

2003-07-15 Thread Stas Bekman
Beau E. Cox wrote:
Hi -

I am running Apache 2.0.47/mod_perl 1.99-dev-10-cvs
on SuSE Linux 8.2. I am trying to install and use
Apache::DBI.
[...]
2) The documentation says to configure mod_perl with:

  perl Makefile.PL PERL_CHILD_INIT=1 PERL_AUTHEN=1 PERL_AUTHZ=1 
   PERL_CLEANUP=1 PERL_STACKED_HANDLERS=1

   These are mod_perl 1 parameters. I could not find any
   corresponding mod_perl 2 parameters.
That documentation is talking about mod_perl 1.0, mod_perl 2.0 doesn't need 
any of these compile options. which URL you are talking about? Perhaps it 
should be fixed to say that you need these options only if you use mp1.

__
Stas BekmanJAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide --- http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


Re: [mp2] Apache::DBI

2003-07-14 Thread Haroon Rafique
On Yesterday at 10:01pm, BEC=Beau E. Cox [EMAIL PROTECTED] wrote:

BEC 
BECShould I use 'connect' in my startup.pl?
BEC 
BEC Have any of you sucessfully installed and used ADBI under
BEC mod_perl 2? Any advice on what I'm missing?
BEC 

Hi Beau,

I'm using apache 2.0.46, mod_perl 1.9909, perl v5.8.0, Apache::DBI 0.91 on 
a Gentoo kernel 2.4.20-ck6 without any problems in production. I have had 
no problems with using connect_on_init either. I have:

use Apache::compat ();

as my first use statement in my mod_perl startup.pl file.

Further down the script, I have:

use Apache::DBI;
DBI-install_driver(mysql);
Apache::DBI-connect_on_init(..fill in here..);

If I set $Apache::DBI::DEBUG = 2 in my startup file I do see connects on 
init as the new apaches come up. Of course, I commented out that line when 
in production.

Dunno about how to track your make test problems. Now that you know that 
someone has it working, you can retrace your steps and see if you missed 
something.

I do however use this patch which is in cvs for Apache::DBI which skips 
use of uninitialized variable warnings upon server startup.

--- DBI.pm  17 Feb 2003 13:04:19 -  1.6
+++ DBI.pm  4 Apr 2003 10:58:53 -   1.7
@@ -81,7 +81,7 @@
 # won't be useful after ChildInit, since multiple processes trying to
 # work over the same database connection simultaneously will receive
 # unpredictable query results.
-if ($Apache::ServerStarting == 1) {
+if ($Apache::ServerStarting and $Apache::ServerStarting == 1) {
 print STDERR $prefix skipping connection during server startup, 
read the docu !!\n if $Apache::DBI::DEBUG  1;
 return $drh-connect(@args);
 }

Good luck,
--
Haroon Rafique
[EMAIL PROTECTED]


Re: [mp2] Apache::DBI

2003-07-14 Thread Beau E. Cox
- Original Message - 
From: Haroon Rafique [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, July 14, 2003 3:23 AM
Subject: Re: [mp2] Apache::DBI


 On Yesterday at 10:01pm, BEC=Beau E. Cox [EMAIL PROTECTED] wrote:

 BEC
 BECShould I use 'connect' in my startup.pl?
 BEC
 BEC Have any of you sucessfully installed and used ADBI under
 BEC mod_perl 2? Any advice on what I'm missing?
 BEC

 Hi Beau,

 I'm using apache 2.0.46, mod_perl 1.9909, perl v5.8.0, Apache::DBI 0.91 on
 a Gentoo kernel 2.4.20-ck6 without any problems in production. I have had
 no problems with using connect_on_init either. I have:

 [snip]

 Haroon Rafique
 [EMAIL PROTECTED]


Haroon -

What a great reply; wonderfully mapped out, all
set to go!

I will proceed to install and use ADBI.

Aloha = Beau;
== please visit ==
http://beaucox.com = main site
http://howtos.beaucox.com = howtos
http://PPM.beaucox.com = perl PPMs
http://CPAN.beaucox.com = CPAN
== thank you ==