You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Octavian Rasnita <or...@fcc.ro> on 2005/04/17 19:06:26 UTC

Apache-DBI

Hi,

Please tell me how to use the Apache::DBI module if I use mod_perl 1.999.22
RC5.

Should I use the following?

use Apache2::DBI ();

Where can I get Apache2::DBI in this case?

(I am using Active Perl under Windows).

I have tried to search for Apache2-DBI with ppm, but with no results.

Or should I still use the following?

use Apache::DBI ();

Thank you much.

Teddy



Re: Apache-DBI

Posted by "Philip M. Gollucci" <pg...@p6m7g8.com>.
Randy Kobes wrote:
> Yes, nmake would be needed for Win32 ActivePerl in building
> a package from the CPAN sources. However, the Apache-DBI ppm
> package is at the same version as the package on CPAN, so
> either way, you'll have to try some patches.
> 
I should point out my patches didn't patch AuthDBI.pm
I'll have one for that shortly.

-- 
END
------------------------------------------------------
Philip M. Gollucci (pgollucci@p6m7g8.com) 301.254.5198
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Developer / Liquidity Services, Inc.
	http://www.liquidityservicesinc.com

Re: Apache-DBI

Posted by Randy Kobes <ra...@theoryx5.uwinnipeg.ca>.
On Tue, 19 Apr 2005, Octavian Rasnita wrote:

> From: "Randy Kobes" <ra...@theoryx5.uwinnipeg.ca>
> > That's potentially true in general, but Apache-DBI is a pure
> > Perl module, so it doesn't need a C compiler to build.
> > If you want to play around with it, we have a ppm package
> > of Apache-DBI at http://theoryx5.uwinnipeg.ca/ppms/ - you
> > can install it, and then try patching the .pm files
> > (either with a "patch" utility for Windows, or just
> > manually).
>
> Ok, I already have downloaded that version of Apache::DBI
> from TheoryX. I will try to patch it manually because I
> don't have a "patch" utility for Windows. I guess I will
> need just to replace some modules calls like that mod_perl
> rc5 announcement says.

That's true; if you need a patch utility, try the Perl Power
tools: http://ppt.perl.org/.

> Or... if you say that it is a pure perl module, I can just
> build it using nmake.

Yes, nmake would be needed for Win32 ActivePerl in building
a package from the CPAN sources. However, the Apache-DBI ppm
package is at the same version as the package on CPAN, so
either way, you'll have to try some patches.

-- 
best regards,
randy

Re: Apache-DBI

Posted by Octavian Rasnita <or...@fcc.ro>.
From: "Randy Kobes" <ra...@theoryx5.uwinnipeg.ca>
> That's potentially true in general, but Apache-DBI is a pure
> Perl module, so it doesn't need a C compiler to build.
> If you want to play around with it, we have a ppm package
> of Apache-DBI at http://theoryx5.uwinnipeg.ca/ppms/ - you
> can install it, and then try patching the .pm files
> (either with a "patch" utility for Windows, or just
> manually).

Ok, I already have downloaded that version of Apache::DBI from TheoryX. I
will try to patch it manually because I don't have a "patch" utility for
Windows. I guess I will need just to replace some modules calls like that
mod_perl rc5 announcement says.
Or... if you say that it is a pure perl module, I can just build it using
nmake.

Teddy


Re: Apache-DBI

Posted by Randy Kobes <ra...@theoryx5.uwinnipeg.ca>.
On Mon, 18 Apr 2005, Octavian Rasnita wrote:

> > What stopping you from applying them ?
> >
> > If the eol(end of line ^M) is wrong I can regenerate in on a
> > windows computer for you.
> >
> > > I hope mod_perl 1.999.22 rc5 will also work with the old Apache::DBI.
> > Nope not going to happen.
>
> I am not compiling Apache, perl and mod_perl under Windows
> but I use the prebuild packages. I have installed mod_perl
> using ppm, but Apache::DBI was not installed with it.
>
> I can compile Apache::DBI separately if it is necessary,
> but I have only Visual Studio .Net 2003 and I don't think
> it will work correctly because Apache and Perl were
> compiled with Visual Studio 6.

That's potentially true in general, but Apache-DBI is a pure
Perl module, so it doesn't need a C compiler to build.
If you want to play around with it, we have a ppm package
of Apache-DBI at http://theoryx5.uwinnipeg.ca/ppms/ - you
can install it, and then try patching the .pm files
(either with a "patch" utility for Windows, or just
manually).

> I need mod_perl under Windows just for testing, so it
> doesn't need to work very fast. Can I use just the DBI
> module with mod_perl without using Apache::DBI? Under
> Windows it would be OK for a while.

Yes, DBI and mod_perl under Windows works fine.

-- 
best regards,
randy

Re: Apache-DBI

Posted by Carl Johnstone <mo...@fadetoblack.demon.co.uk>.
> From what I understand, Apache::DBI provides certain performance benefits 
> over DBI in much the same manner that mod_perl does over standalone Perl, 
> but isn't required to use DBI in a mod_perl environment.

Essentially it makes your database connections persistent.

So when you establish a connection at the start of a particular mod_perl 
script it intercepts the request and returns a pre-connected DB handle. 
Similarly it intercepts the disconnect request at the end of the script and 
leaves the connection to the DB open ready for next time it's needed.

For DB's that are slow when establishing connections it can make a 
considerable speed difference.

Carl


Re: Apache-DBI

Posted by "Ian D. Stewart" <id...@compuvative.com>.
Octavian Rasnita wrote:

> I need mod_perl under Windows just for testing, so it doesn't need to work
>
>very fast. Can I use just the DBI module with mod_perl without using
>Apache::DBI?
>Under Windows it would be OK for a while.
>  
>
Hi Teddy,

While I haven't run mod_perl + DBI (sans Apache::DBI) on Windows, I have 
run it under Linux without any issues.

 From what I understand, Apache::DBI provides certain performance 
benefits over DBI in much the same manner that mod_perl does over 
standalone Perl, but isn't required to use DBI in a mod_perl environment.


HTH,
Ian


Re: Apache-DBI

Posted by Octavian Rasnita <or...@fcc.ro>.
> What stopping you from applying them ?
>
> If the eol(end of line ^M) is wrong I can regenerate in on a
> windows computer for you.
>
> > I hope mod_perl 1.999.22 rc5 will also work with the old Apache::DBI.
> Nope not going to happen.

I am not compiling Apache, perl and mod_perl under Windows but I use the
prebuild packages.
I have installed mod_perl using ppm, but Apache::DBI was not installed with
it.

I can compile Apache::DBI separately if it is necessary, but I have only
Visual Studio .Net 2003 and I don't think it will work correctly because
Apache and Perl were compiled with Visual Studio 6.

I need mod_perl under Windows just for testing, so it doesn't need to work
very fast. Can I use just the DBI module with mod_perl without using
Apache::DBI?
Under Windows it would be OK for a while.

Thank you.

Teddy


Re: Apache-DBI

Posted by "Philip M. Golllucci" <pg...@p6m7g8.com>.
Octavian Rasnita wrote:
> Thank you for pointing me to these messages, but unfortunately I cannot
> apply them under Windows.
What stopping you from applying them ?

If the eol(end of line ^M) is wrong I can regenerate in on a
windows computer for you.

> I hope mod_perl 1.999.22 rc5 will also work with the old Apache::DBI.
Nope not going to happen.

Re: Apache-DBI

Posted by Octavian Rasnita <or...@fcc.ro>.
Thank you for pointing me to these messages, but unfortunately I cannot
apply them under Windows.
I hope mod_perl 1.999.22 rc5 will also work with the old Apache::DBI.

Teddy

----- Original Message ----- 
From: "Philip M. Gollucci" <pg...@p6m7g8.com>
To: "Randy Kobes" <ra...@theoryx5.uwinnipeg.ca>
Cc: "Octavian Rasnita" <or...@fcc.ro>; <mo...@perl.apache.org>
Sent: Monday, April 18, 2005 5:18 AM
Subject: Re: Apache-DBI


> > before or after the renaming that went on - if you search
> > the mailing list archives, there's some patches available
> > for this, but I don't know how tested they are.
>
> http://marc.theaimsgroup.com/?l=apache-modperl&m=111309969130358&w=2
> AND
> http://marc.theaimsgroup.com/?l=apache-modperl&m=111311748601079&w=2
>
> I _believe_ randy is refering to these 2.  In regards to being tested,
> they work for me.  Thats about all I can say.
>
> HTH
>
> -- 
> END
> ------------------------------------------------------
> Philip M. Gollucci (pgollucci@p6m7g8.com) 301.254.5198
> Consultant / http://p6m7g8.net/Resume/resume.shtml
> Senior Developer / Liquidity Services, Inc.
> http://www.liquidityservicesinc.com


Re: Apache-DBI

Posted by "Philip M. Gollucci" <pg...@p6m7g8.com>.
> before or after the renaming that went on - if you search
> the mailing list archives, there's some patches available
> for this, but I don't know how tested they are.

http://marc.theaimsgroup.com/?l=apache-modperl&m=111309969130358&w=2
AND
http://marc.theaimsgroup.com/?l=apache-modperl&m=111311748601079&w=2

I _believe_ randy is refering to these 2.  In regards to being tested,
they work for me.  Thats about all I can say.

HTH

-- 
END
------------------------------------------------------
Philip M. Gollucci (pgollucci@p6m7g8.com) 301.254.5198
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Developer / Liquidity Services, Inc.
	http://www.liquidityservicesinc.com

Re: Apache-DBI

Posted by Randy Kobes <ra...@theoryx5.uwinnipeg.ca>.
On Sun, 17 Apr 2005, Octavian Rasnita wrote:

> Hi,
>
> Please tell me how to use the Apache::DBI module if I use
> mod_perl 1.999.22 RC5.
>
> Should I use the following?
> use Apache2::DBI ();
>
> Where can I get Apache2::DBI in this case?
>
> (I am using Active Perl under Windows).
>
> I have tried to search for Apache2-DBI with ppm, but with no results.
>
> Or should I still use the following?
>
> use Apache::DBI ();
>
> Thank you much.
>
> Teddy

There is only at present an Apache::DBI - this is a 3rd
party module (not in the mp2 core), so it's not affected by
the recent renaming that went on in mp2. The current
Apache::DBI hasn't yet been fully ported to mp2, either
before or after the renaming that went on - if you search
the mailing list archives, there's some patches available
for this, but I don't know how tested they are.

-- 
best regards,
randy kobes