Help needed for using Apache::DBI

2000-07-16 Thread PHANI MADHAVI

Hi All,
we have installed Apache::DBI module ( system os is linux, web server
apache, running mod_perl and mysql is rdbms) in our systems. But it is not
working.
When i try to compile a sample file to test db connectivity using
Apache::DBI, it does not work.
Same thing works if I use DBI. 
The error is " can't locate object method "module" in the DBI.pm file"
We checked the DBI.pm file  and there is one statement which goes like this:
if ($INC{"Apache.pm"} and Apache->module("Apache::Status"));
And we searched for Apache.pm. We could find the file but not the "module".
Please let me know how should we proceed.

Regards,
Madhavi



-Original Message-
From: Vincent Bruijnes [mailto:[EMAIL PROTECTED]]
Sent: Sunday, July 16, 2000 12:30 AM
To: Sam Carleton
Cc: [EMAIL PROTECTED]
Subject: Re: getting mod_perl configured on FreeBSD


Well i had the same problem on freebsd too.

first goto mod_perl directory:
perl Makefile.PL PREP_HTTPD=1 USE_APACI=1
then make make test and make install
Goto your apache directory ./configure --prefix=/www --enable-shared=max 
--activate-modules=src/modules/perl/libperl.a --disable-shared=perl
then make
and make install.
and voila your apache is configured as statically mod_perl and you have DSO 
enabled
so you never need to recompile apache if you want to add optional modules.

Good Luck and let me know if I can help you any more.
Vincent Bruijnes
At 21:21 14-7-00 -0400, you wrote:
>I have successfully gotten Apache/mod_perl to compile under Linux many a
>times.  This is my first attempt at compiling it on FreeBSD and I am
>having problems.  The problem is that when to do the "make test", apache
>never starts up.  I had once run into this on Linux and that was because
>the  .makepl_args.mod_perl was pointing to a non-existing layout file
>and I did not catch the error from the "perl Makefile.PL".  But I have
>looked and look at the output of the "perl Makefile.PL" and see nothing
>wrong.  I am going to post the output of "perl Makefile.PL", along with
>my .makepl_args.mod_perl and my layout file in hopes that one of you can
>find my error.  Thanks
>
>output from "perl Makefile.PL"
>Will run tests as User: 'nobody' Group: 'wheel'
>Configuring for Apache, Version 1.3.12
>  + using installation path layout: maineville
>(/usr/src/apache.config.layout)
>  + activated perl module (modules/perl/libperl.a)
>Creating Makefile
>Creating Configuration.apaci in src
>  + enabling mod_so for DSO support
>   + id: mod_perl/1.24
>   + id: Perl/5.00503 (freebsd) [perl]
>Creating Makefile in src
>  + configured for FreeBSD 4.0 platform
>  + setting C pre-processor to cc -E
>  + checking for system header files
>  + adding selected modules
> o rewrite_module uses ConfigStart/End
>   enabling DBM support for mod_rewrite
> o dbm_auth_module uses ConfigStart/End
> o perl_module uses ConfigStart/End
>   + mod_perl build type: DSO
>   + setting up mod_perl build environment
>   + adjusting Apache build environment
>
>** Error: Cannot build mod_include with Perl support (USE_PERL_SSI) **
>** when mod_perl is compiled as DSO because of cross-module calls.  **
>** Ignoring PERL_SSI flag now.  **
>
>  + checking sizeof various data types
>  + doing sanity check on compiler and options
>Creating Makefile in src/support
>Creating Makefile in src/os/unix
>Creating Makefile in src/ap
>Creating Makefile in src/main
>Creating Makefile in src/modules/standard
>Creating Makefile in src/modules/proxy
>Creating Makefile in src/modules/perl
>Reading Makefile.PL args from ../.makepl_args.mod_perl
>Will configure via APACI
>cp apaci/Makefile.libdir
>/usr/src/apache/src/modules/perl/Makefile.libdir
>cp apaci/Makefile.tmpl /usr/src/apache/src/modules/perl/Makefile.tmpl
>cp apaci/README /usr/src/apache/src/modules/perl/README
>cp apaci/configure /usr/src/apache/src/modules/perl/configure
>cp apaci/libperl.module /usr/src/apache/src/modules/perl/libperl.module
>cp apaci/mod_perl.config.sh
>/usr/src/apache/src/modules/perl/mod_perl.config.sh
>cp apaci/load_modules.pl.PL
>/usr/src/apache/src/modules/perl/load_modules.pl.PL
>cp apaci/find_source.PL /usr/src/apache/src/modules/perl/find_source.PL
>cp apaci/apxs_cflags.PL /usr/src/apache/src/modules/perl/apxs_cflags.PL
>cp apaci/mod_perl.exp /usr/src/apache/src/modules/perl/mod_perl.exp
>PerlDispatchHandler.enabled
>PerlChildInitHandlerenabled
>PerlChildExitHandlerenabled
>PerlPostReadRequestHandler..enabled
>PerlTransHandlerenabled
>PerlHeaderParserHandler.enabled
>PerlAccessHandler...enabled
>PerlAuthenHandler...enabled
>PerlAuthzHandlerenabled
>PerlTypeHandler.enabled
>PerlFixupHandlerenabled
>PerlHandler.enabled
>PerlLogHandler..enabled
>PerlInitHandler.enabled
>PerlCleanupHandler..enabled
>PerlRestartHandler..enabled
>PerlS

RE: Help needed for using Apache::DBI

2000-07-17 Thread PHANI MADHAVI

Hi,
Yes...
installed apache, mod_perl, mysql, dbi and dbd modules using their source
code.
and mod_perl has been installed with the option EVERTYTHING=1.
But of no use..
IF AT ALL ANYBODY KNOWS HOW TO MAKE APACHE::DBI WORK,PLEASE HELP

Regards,
Madhavi

-Original Message-
From: Nigel Hamilton [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 17, 2000 1:48 PM
To: PHANI MADHAVI
Cc: [EMAIL PROTECTED]
Subject: Re: Help needed for using Apache::DBI


Hi,
I've had the same bug for the past 3 weeks. 

As far as I can tell mod_perl has been installed fine
(EVERYTHING=1 etc..) so I'm at loss to explain why ...

A couple of other people have mentioned this bug recently too ...
has anyone solved it?

NIge


On Mon, 17 Jul 2000, PHANI MADHAVI wrote:

> Hi All,
> we have installed Apache::DBI module ( system os is linux, web server
> apache, running mod_perl and mysql is rdbms) in our systems. But it is not
> working.
> When i try to compile a sample file to test db connectivity using
> Apache::DBI, it does not work.
> Same thing works if I use DBI. 
> The error is " can't locate object method "module" in the DBI.pm file"
> We checked the DBI.pm file  and there is one statement which goes like
this:
> if ($INC{"Apache.pm"} and Apache->module("Apache::Status"));
> And we searched for Apache.pm. We could find the file but not the
"module".
> Please let me know how should we proceed.
> 
> Regards,
> Madhavi
> 
> 
> 
> -Original Message-
> From: Vincent Bruijnes [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, July 16, 2000 12:30 AM
> To: Sam Carleton
> Cc: [EMAIL PROTECTED]
> Subject: Re: getting mod_perl configured on FreeBSD
> 
> 
> Well i had the same problem on freebsd too.
> 
> first goto mod_perl directory:
> perl Makefile.PL PREP_HTTPD=1 USE_APACI=1
> then make make test and make install
> Goto your apache directory ./configure --prefix=/www --enable-shared=max 
> --activate-modules=src/modules/perl/libperl.a --disable-shared=perl
> then make
> and make install.
> and voila your apache is configured as statically mod_perl and you have
DSO 
> enabled
> so you never need to recompile apache if you want to add optional modules.
> 
> Good Luck and let me know if I can help you any more.
> Vincent Bruijnes
> At 21:21 14-7-00 -0400, you wrote:
> >I have successfully gotten Apache/mod_perl to compile under Linux many a
> >times.  This is my first attempt at compiling it on FreeBSD and I am
> >having problems.  The problem is that when to do the "make test", apache
> >never starts up.  I had once run into this on Linux and that was because
> >the  .makepl_args.mod_perl was pointing to a non-existing layout file
> >and I did not catch the error from the "perl Makefile.PL".  But I have
> >looked and look at the output of the "perl Makefile.PL" and see nothing
> >wrong.  I am going to post the output of "perl Makefile.PL", along with
> >my .makepl_args.mod_perl and my layout file in hopes that one of you can
> >find my error.  Thanks
> >
> >output from "perl Makefile.PL"
> >Will run tests as User: 'nobody' Group: 'wheel'
> >Configuring for Apache, Version 1.3.12
> >  + using installation path layout: maineville
> >(/usr/src/apache.config.layout)
> >  + activated perl module (modules/perl/libperl.a)
> >Creating Makefile
> >Creating Configuration.apaci in src
> >  + enabling mod_so for DSO support
> >   + id: mod_perl/1.24
> >   + id: Perl/5.00503 (freebsd) [perl]
> >Creating Makefile in src
> >  + configured for FreeBSD 4.0 platform
> >  + setting C pre-processor to cc -E
> >  + checking for system header files
> >  + adding selected modules
> > o rewrite_module uses ConfigStart/End
> >   enabling DBM support for mod_rewrite
> > o dbm_auth_module uses ConfigStart/End
> > o perl_module uses ConfigStart/End
> >   + mod_perl build type: DSO
> >   + setting up mod_perl build environment
> >   + adjusting Apache build environment
> >
> >** Error: Cannot build mod_include with Perl support (USE_PERL_SSI) **
> >** when mod_perl is compiled as DSO because of cross-module calls.  **
> >** Ignoring PERL_SSI flag now.  **
> >
> >  + checking sizeof various data types
> >  + doing sanity check on compiler and options
> >Creating Makefile in src/support
> >Creating Makefile in src/os/unix
> >Creating Makefile in src/ap
> >Creating Makefile in src/main
> >Creatin

RE: Help needed for using Apache::DBI

2000-07-17 Thread PHANI MADHAVI

Hi,
The script is running as a mod_perl script ( httpd.conf of  Apache webserver
has been modified so  that the scripts run under mod_perl rather than under
CGI).


Madhavi


-Original Message-
From: Edmund Mergl [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 17, 2000 11:08 PM
To: PHANI MADHAVI
Cc: [EMAIL PROTECTED]
Subject: Re: Help needed for using Apache::DBI


PHANI MADHAVI wrote:
> 
> Hi All,
> we have installed Apache::DBI module ( system os is linux, web server
> apache, running mod_perl and mysql is rdbms) in our systems. But it is not
> working.
> When i try to compile a sample file to test db connectivity using
> Apache::DBI, it does not work.
> Same thing works if I use DBI.
> The error is " can't locate object method "module" in the DBI.pm file"
> We checked the DBI.pm file  and there is one statement which goes like
this:
> if ($INC{"Apache.pm"} and Apache->module("Apache::Status"));
> And we searched for Apache.pm. We could find the file but not the
"module".
> Please let me know how should we proceed.
> 
> Regards,
> Madhavi
> 



in the next release I'll mention it in the README twice and in
bold letters:

  It's not only supposed to be used with the Apache server 
  together with an embedded perl interpreter like mod_perl,
  it can ONLY be used when running as mod_perl script.
  It can NOT be run in any script from the command-line.


Edmund


-- 
Edmund Mergl
mailto:[EMAIL PROTECTED]
http://www.edmund-mergl.de
fon: +49 700 EDEMERGL



RE: Help needed for using Apache::DBI

2000-07-17 Thread PHANI MADHAVI

Hi,
All the guidelines given in the guide have been followed.
Specifically, there is a section which goes by the title ' my apache does
not work '

{

Make sure you have it installed. 

Make sure you configured mod_perl with EVERYTHING=1. 

Use the example script eg/startup.pl (in the mod_perl distribution). Remove
the comment from the line. 

 # use Apache::DebugDBI;
 


and adapt the connect string. Do not change anything in your scripts for use
with Apache::DBI. 
}

we have gone through all the guidelines
But it is not working. It is still trying to search the 'module' in
Apache.pm which obviously is not defined.

Madhavi


-Original Message-
From: darren chamberlain [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 17, 2000 5:52 PM
To: [EMAIL PROTECTED]
Subject: Re: Help needed for using Apache::DBI


PHANI MADHAVI ([EMAIL PROTECTED]) said something to this effect:
> IF AT ALL ANYBODY KNOWS HOW TO MAKE APACHE::DBI WORK,PLEASE HELP

The guide is quite clear on how to use and set up Apache::DBI:

http://perl.apache.org/guide/databases.html#Apache_DBI_Initiate_a_persist
http://search.cpan.org/doc/MERGL/ApacheDBI-0.87/DBI.pm