This is part of The Pile, a partial archive of some open source mailing lists and newsgroups.
To: modperl@apache.org Subject: Re: Help needed for using Apache::DBI From: Nigel Hamilton <nigel@e1mail.com> Date: Mon, 17 Jul 2000 08:17:55 +0000 (GMT) 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. > > > Vincent Bruijnes [mailto:vincent@bruijnes.com] wrote: > > 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 > >PerlChildInitHandler........enabled > >PerlChildExitHandler........enabled > >PerlPostReadRequestHandler..enabled > >PerlTransHandler............enabled > >PerlHeaderParserHandler.....enabled > >PerlAccessHandler...........enabled > >PerlAuthenHandler...........enabled > >PerlAuthzHandler............enabled > >PerlTypeHandler.............enabled > >PerlFixupHandler............enabled > >PerlHandler.................enabled > >PerlLogHandler..............enabled > >PerlInitHandler.............enabled > >PerlCleanupHandler..........enabled > >PerlRestartHandler..........enabled > >PerlStackedHandlers.........enabled > >PerlMethodHandlers..........enabled > >PerlDirectiveHandlers.......enabled > >PerlTableApi................enabled > >PerlLogApi..................enabled > >PerlUriApi..................enabled > >PerlUtilApi.................enabled > >PerlFileApi.................enabled > >PerlConnectionApi...........enabled > >PerlServerApi...............enabled > >PerlSections................enabled > >PerlSSI.....................enabled > >(cd /usr/src/apache && CC="cc" ./configure > >--activate-module=src/modules/perl/libperl.a --disable-rule=EXPAT > >--with-layout=/usr/src/apache.config.layout:maineville > >--server-uid=wwwrun --server-gid=daemon --enable-module=most > >--enable-shared=max --prefix=/data01/maineville) > >Checking CGI.pm VERSION..........ok > >Checking for LWP::UserAgent......ok > >Checking for HTML::HeadParser....ok > >'-ADD_MODULE' is not a known MakeMaker parameter name. > >Writing Makefile for Apache > >Writing Makefile for Apache::Connection > >Writing Makefile for Apache::Constants > >Writing Makefile for Apache::File > >Writing Makefile for Apache::Leak > >Writing Makefile for Apache::Log > >Writing Makefile for Apache::ModuleConfig > >Writing Makefile for Apache::PerlRunXS > >Writing Makefile for Apache::Server > >Writing Makefile for Apache::Symbol > >Writing Makefile for Apache::Table > >Writing Makefile for Apache::URI > >Writing Makefile for Apache::Util > >Writing Makefile for mod_perl > > > >------------.makepl_args.mod_perl------------ > ># File: .makepl_args.mod_erl > ># enable all phase callbacks, API modules and misc features > >EVERYTHING=1 > > > ># tell runtime diagnostics to active if MOD_PERL_TRACE environment > ># variable is set at runtime > >PERL_TRACE=1 > > > ># tell Makefile.pl where the Apache source tree is > >APACHE_SRC=/usr/src/apache/src > > > ># tell Makefile.PL where the Apache is to be isntalled > >APACHE_PREFIX=/data01/maineville > > > ># disable Makefile.pl from compiling Apache > ># PREP_HTTPD=1 > > > ># tell Makefile.PL to use the first source found, which will be the > ># path specified above by APACHE_SRC > >DO_HTTPD=1 > > > ># tell Makefile.PL to configure Apache using the apaci interface > >USE_APACI=1 > > > ># tell makefile.PL to configure ssl support, too > ># SSL_BASE=/usr/local/ssl > > > ># add mod_info, mod_status, mod_usertrack, and mod_unique_id > ># ADD_MODULE=info,status,usertrack,unique_id > > > ># additional arguments to give Apache's configure script > ># aruments can be delimited by comma and/or specified with multipal > ># APACI_ARGS lines > >#APACI_ARGS=--includedir=/usr/src/php > >#APACI_ARGS=--activate-module=src/modules/php3/libphp3.a > >APACI_ARGS=--with-layout=/usr/src/apache.config.layout:maineville > >APACI_ARGS=--server-uid=wwwrun > >APACI_ARGS=--server-gid=daemon > >APACI_ARGS=--enable-module=most > >APACI_ARGS=--enable-shared=max > > > >------------apache.config.layout------------ > >## > >## config.layout -- APACI Pre-defined Installation Path Layouts > >## > >## Hints: > >## - layouts can be loaded with APACI's --with-layout=ID option > >## - when no --with-layout option is given, the default layout is > >`Apache' > >## - a trailing plus character (`+') on paths is replaced with a > >## `/<target>' suffix where <target> is the the argument from > >## option --target (defaults to `httpd'). > >## > > > ><Layout maineville> > > prefix: /data01/maineville > > exec_prefix: $prefix > > bindir: $prefix/bin > > sbindir: $prefix/sbin > > libexecdir: $prefix/lib/apache > > mandir: /usr/local/man > > sysconfdir: $prefix/conf > > datadir: $prefix > > iconsdir: $datadir/icons > > htdocsdir: $datadir/htdocs > > cgidir: $datadir/cgi-bin > > includedir: $prefix/include/apache > > localstatedir: $prefix > > runtimedir: $localstatedir/run > > logfiledir: $localstatedir/log > > proxycachedir: $localstatedir/cache > ></Layout> > 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? === Subject: RE: Help needed for using Apache::DBI From: PHANI MADHAVI <PHANIM@nestec.net> Date: Mon, 17 Jul 2000 13:51:53 +0530 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 === Subject: Re: Help needed for using Apache::DBI From: darren chamberlain <darren@boston.com> Date: Mon, 17 Jul 2000 08:21:47 -0400 PHANI MADHAVI (PHANIM@nestec.net) 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 (darren) === Subject: Re: Help needed for using Apache::DBI From: Edmund Mergl <E.Mergl@bawue.de> Date: Mon, 17 Jul 2000 19:37:52 +0200 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 === Subject: RE: Help needed for using Apache::DBI From: PHANI MADHAVI <PHANIM@nestec.net> Date: Tue, 18 Jul 2000 09:28:24 +0530 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). === Subject: RE: Help needed for using Apache::DBI From: PHANI MADHAVI <PHANIM@nestec.net> Date: Tue, 18 Jul 2000 10:28:05 +0530 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 === Subject: Problems with Apache::DBILogger 0.93 From: "Thomas Uttenthaler" <tom.uttenthaler@aon.at> Date: Tue, 18 Jul 2000 10:27:40 +0200 This is a multi-part message in MIME format. ------=_NextPart_000_0094_01BFF0A2.CD31BBA0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello mod_perl-professionals, I have tried to install the module Apache::DBILogger 0.93. Installation worked fine, after installing DBI and Date::Format, but it = does not write anything in the MySQL-DB. I found the following error-msg in the httpd.error_log: DBI->connect failed: Keine Zugriffsberechtigung f=FCr Benutzer: = 'club@localhost' .... [MOn Jul 17 22:53:35 2000] [error] Apache::DBILogger could not connect = to DBI:mysql:httpdlog .... I modified the grant table "db" ... DBD::mysql::st execute failed: Unbekanntes Tabellenfeld 'usertrack' in = field .... [Mon Jul 17 22:56:40 2000] [error] Apache::DBILogger had problemds = executing query ... This was becaus of an missing field in the SQL-Structur-Dump in the = Readme-File of the Tarball, I added the field .. Since then, no further error-messages appear in the logfile, tough = nothing is written into the DB. Can anybody help me or give me a hint? === Subject: RE: Help needed for using Apache::DBI From: Jeff Beard <jeff@cyberxape.com> Date: Tue, 18 Jul 2000 06:55:14 -0600 Perhaps sending your startup.pl might help. Then only time I had problems with Apache::DBI, I loaded Apache.pm in a BEGIN{} block then everything else after and outside the block in my startup.pl. That was to deal with an error when Apache::DBI was loaded. === Subject: Problems with Apache::DBILogger 0.93 From: "Thomas Uttenthaler" <tom.uttenthaler@aon.at> Date: Tue, 18 Jul 2000 16:27:41 +0200 Hello mod_perl-professionals, I have tried to install the module Apache::DBILogger 0.93. Installation worked fine, after installing DBI and Date::Format, but it = does not write anything in the MySQL-DB. I found the following error-msg in the httpd.error_log: DBI->connect failed: Keine Zugriffsberechtigung f=FCr Benutzer: = 'club@localhost' .... [MOn Jul 17 22:53:35 2000] [error] Apache::DBILogger could not connect = to DBI:mysql:httpdlog .... I modified the grant table "db" ... DBD::mysql::st execute failed: Unbekanntes Tabellenfeld 'usertrack' in = field .... [Mon Jul 17 22:56:40 2000] [error] Apache::DBILogger had problemds = executing query ... This was becaus of an missing field in the SQL-Structur-Dump in the = Readme-File of the Tarball, I added the field .. =20 Since then, no further error-messages appear in the logfile, tough = nothing is written into the DB. Can anybody help me or give me a hint? SuSE-Linux 6.3, Apache 1.3.9, mod_perl 1.2.2 httpd.conf: PerlModule Apache::DBI DBI Apache::DBILogger PerlLogHandler Apache::DBILogger PerlSetVar DBILogger_data_source DBI:mysql:httpdlog PerlSetVar DBILogger_username club PerlSetVar DBILogger_password ***** === Subject: RE: Help needed for using Apache::DBI From: Perrin Harkins <perrin@primenet.com> Date: Tue, 18 Jul 2000 11:18:02 -0700 (PDT) On Tue, 18 Jul 2000, PHANI MADHAVI wrote: > 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. You can't tell much about the Apache.pm module just by looking at the perl source because it's partly in C. You should check the standard list of things that usually cause problems for people: - Is your mod_perl built with the exact same perl binary that's on your system? - Have you tried building mod_perl statically? - Does your "use Apache::DBI" come before anything else that might use DBI? - Can you verify that mod_perl is working, using the techniques in the guide at http://perl.apache.org/guide/install.html#How_can_I_tell_whether_mod_perl_ ? If all of that checks out, you should send your startup.pl and the relevant section of your httpd.conf, as described in the SUPPORT doc. ===