You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by jiesheng zhang <ji...@bioteam.net> on 2005/05/02 07:07:18 UTC

compile mod_perl with Apache::DBI support

I am using the SuSE 9.1 which has apache 2.0 and mod_perl 1.99_12.
I did not see any Apache::DBI debug information in the apache error log. 
I guessED the the mod_perl is not complied with the
EVERYTHING=1 option. I then tried to compile the mod_perl to support 
Apache::DBI
The perl configuration command is like

perl Makefile.PL MP_APXS=/usr/sbin/apxs2 MP_CCOPTS="-O2 -march=i586 
-mcpu=i686 -fmessage-length=0 -Wall -fPIC -Wall -fno-strict-aliasing 
-D_LARGEFILE_SOURCE" EVERYTHING=1

However, I got this error
------------------------------------------------------
Reading Makefile.PL args from @ARGV
   MP_APXS = /usr/sbin/apxs2
   MP_CCOPTS = -O2 -march=i586 -mcpu=i686 -fmessage-length=0 -Wall -fPIC 
-Wall -fno-strict-aliasing -D_LARGEFILE_SOURCE
Configuring Apache/2.0.49 mod_perl/1.99_13-dev Perl/v5.8.3
'EVERYTHING' is not a known MakeMaker parameter name.
-----------------------------------------------------------------------------
I also checked the mod_perl build instruction for mod_perl 2.0. It does 
not mention anything about the option "EVERYTHING".

Any suggestion?

Thanks


jason

Re: compile mod_perl with Apache::DBI support

Posted by Michael Peters <mp...@plusthree.com>.
jiesheng zhang wrote:

> By this configuration, without the "use Apache::DBI ();" and with
> "$Apache::DBI::DEBUG=1" in the startup.pl, I could not see the debug
> output in the error log.

looks like you hit it on the head. If you don't have
$Apache::DBI::DEBUG=1 in your startup, then you wont see anything in the
errorlog.

from the doc:
"To enable debugging the variable $Apache::DBI::DEBUG must be set. This
can either be done in startup.pl or in the user script."

-- 
Michael Peters
Developer
Plus Three, LP


Re: compile mod_perl with Apache::DBI support

Posted by jiesheng zhang <ji...@bioteam.net>.

Perrin Harkins wrote:

>On Tue, 2005-05-03 at 00:21 +0800, jiesheng zhang wrote:
>  
>
>>I saw debug information in the apache log file after I added the
>>
>>use Apache::DBI to the startup.pl. However, this is not mentioned in the Apache::DBI documentation. The documentation only mentioned that I should add
>>PerlModule Apache::DBI to the http.conf.
>>    
>>
>
>Either way works.  If you were doing it with PerlModule before, you
>should have seen the debug information.
>  
>
The PerlModule seemed not working in my system. My system is suse 9.1, 
apache-2.0.49. mod_perl 1.99 release12.
Here is my mod_perl.conf which is included to httpd.conf

<IfModule mod_perl.c>
    PerlModule  Apache::DBI
#    PerlTrace  all
    PerlRequire "/etc/apache2/mod_perl-startup.pl"
#    PerlOptions +OpenLogs +Log
    ScriptAlias /perl/ "/srv/www/cgi-bin/"
    <Location /perl/>
        # mod_perl mode
        SetHandler perl-script
        PerlResponseHandler ModPerl::Registry
        PerlOptions +ParseHeaders
        Options +ExecCGI
    </Location>

    ScriptAlias /cgi-perl/ "/srv/www/cgi-bin/"
    <Location /cgi-perl>
        # perl cgi mode
        SetHandler  perl-script
        PerlResponseHandler ModPerl::PerlRun
        PerlOptions +ParseHeaders
        Options +ExecCGI
    </Location>

    # The /cgi-bin/ ScriptAlias is already set up in httpd.conf

</IfModule>

By this configuration, without the "use Apache::DBI ();" and with 
"$Apache::DBI::DEBUG=1" in the startup.pl, I could not see the debug 
output in the error log.

>- Perrin
>  
>

Re: compile mod_perl with Apache::DBI support

Posted by Perrin Harkins <pe...@elem.com>.
On Tue, 2005-05-03 at 00:21 +0800, jiesheng zhang wrote:
> I saw debug information in the apache log file after I added the
> 
> use Apache::DBI to the startup.pl. However, this is not mentioned in the Apache::DBI documentation. The documentation only mentioned that I should add
> PerlModule Apache::DBI to the http.conf.

Either way works.  If you were doing it with PerlModule before, you
should have seen the debug information.

- Perrin


Re: compile mod_perl with Apache::DBI support

Posted by jiesheng zhang <ji...@bioteam.net>.

Perrin Harkins wrote:

>On Mon, 2005-05-02 at 20:10 +0800, jiesheng zhang wrote:
>  
>
>>I indeed set the $Apache::DBI::DEBUG=2 in the 
>>/etc/apache2/mod_perl-startup.pl. However I did not see any debug output 
>>in the apache error log file
>>    
>>
>
>Did you "use Apache::DBI" in your startup.pl or httpd.conf?
>
>  
>
I saw debug information in the apache log file after I added the

use Apache::DBI to the startup.pl. However, this is not mentioned in the Apache::DBI documentation. The documentation only mentioned that I should add
PerlModule Apache::DBI to the http.conf.



>I think you're not understanding that Apache::DBI is a pure Perl module
>which you load in the normal way, not a part of mod_perl.  You do not
>need to recompile mod_perl in order to use Apache::DBI.
>
>- Perrin
>
>  
>

Thanks

Re: compile mod_perl with Apache::DBI support

Posted by Perrin Harkins <pe...@elem.com>.
On Mon, 2005-05-02 at 20:10 +0800, jiesheng zhang wrote:
> I indeed set the $Apache::DBI::DEBUG=2 in the 
> /etc/apache2/mod_perl-startup.pl. However I did not see any debug output 
> in the apache error log file

Did you "use Apache::DBI" in your startup.pl or httpd.conf?

I think you're not understanding that Apache::DBI is a pure Perl module
which you load in the normal way, not a part of mod_perl.  You do not
need to recompile mod_perl in order to use Apache::DBI.

- Perrin



Re: compile mod_perl with Apache::DBI support

Posted by jiesheng zhang <ji...@bioteam.net>.
>> I am using the SuSE 9.1 which has apache 2.0 and mod_perl 1.99_12.
>> I did not see any Apache::DBI debug information in the apache error log. 
>
>
> jiesheng, please read the module's manpage:
> http://search.cpan.org/dist/Apache-DBI/DBI.pm
>
>   To enable debugging the variable $Apache::DBI::DEBUG must be set.
>   This can either be done in startup.pl or in the user script. Setting
>   the variable to 1, just reports about a new connect. Setting the
>   variable to 2 enables full debug output.

I indeed set the $Apache::DBI::DEBUG=2 in the 
/etc/apache2/mod_perl-startup.pl. However I did not see any debug output 
in the apache error log file

Re: compile mod_perl with Apache::DBI support

Posted by Stas Bekman <st...@stason.org>.
jiesheng zhang wrote:
> I am using the SuSE 9.1 which has apache 2.0 and mod_perl 1.99_12.
> I did not see any Apache::DBI debug information in the apache error log. 

jiesheng, please read the module's manpage:
http://search.cpan.org/dist/Apache-DBI/DBI.pm

   To enable debugging the variable $Apache::DBI::DEBUG must be set.
   This can either be done in startup.pl or in the user script. Setting
   the variable to 1, just reports about a new connect. Setting the
   variable to 2 enables full debug output.

> I guessED the the mod_perl is not complied with the
> EVERYTHING=1 option. I then tried to compile the mod_perl to support 
> Apache::DBI
> The perl configuration command is like
> 
> perl Makefile.PL MP_APXS=/usr/sbin/apxs2 MP_CCOPTS="-O2 -march=i586 
> -mcpu=i686 -fmessage-length=0 -Wall -fPIC -Wall -fno-strict-aliasing 
> -D_LARGEFILE_SOURCE" EVERYTHING=1
> 
> However, I got this error
> ------------------------------------------------------
> Reading Makefile.PL args from @ARGV
>   MP_APXS = /usr/sbin/apxs2
>   MP_CCOPTS = -O2 -march=i586 -mcpu=i686 -fmessage-length=0 -Wall -fPIC 
> -Wall -fno-strict-aliasing -D_LARGEFILE_SOURCE
> Configuring Apache/2.0.49 mod_perl/1.99_13-dev Perl/v5.8.3
> 'EVERYTHING' is not a known MakeMaker parameter name.
> ----------------------------------------------------------------------------- 
> 
> I also checked the mod_perl build instruction for mod_perl 2.0. It does 
> not mention anything about the option "EVERYTHING".

Because it doesn't exist and not needed in mp2. Why were you trying to do 
that?

-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

Re: compile mod_perl with Apache::DBI support

Posted by Jie Gao <J....@isu.usyd.edu.au>.


On Mon, 2 May 2005, jiesheng zhang wrote:

> Date: Mon, 02 May 2005 13:07:18 +0800
> From: jiesheng zhang <ji...@bioteam.net>
> To: modperl@perl.apache.org
> Subject: compile mod_perl with Apache::DBI support
>
> I am using the SuSE 9.1 which has apache 2.0 and mod_perl 1.99_12.
> I did not see any Apache::DBI debug information in the apache error log.
> I guessED the the mod_perl is not complied with the
> EVERYTHING=1 option. I then tried to compile the mod_perl to support
> Apache::DBI
> The perl configuration command is like
>
> perl Makefile.PL MP_APXS=/usr/sbin/apxs2 MP_CCOPTS="-O2 -march=i586
> -mcpu=i686 -fmessage-length=0 -Wall -fPIC -Wall -fno-strict-aliasing
> -D_LARGEFILE_SOURCE" EVERYTHING=1
>
> However, I got this error
> ------------------------------------------------------
> Reading Makefile.PL args from @ARGV
>    MP_APXS = /usr/sbin/apxs2
>    MP_CCOPTS = -O2 -march=i586 -mcpu=i686 -fmessage-length=0 -Wall -fPIC
> -Wall -fno-strict-aliasing -D_LARGEFILE_SOURCE
> Configuring Apache/2.0.49 mod_perl/1.99_13-dev Perl/v5.8.3
> 'EVERYTHING' is not a known MakeMaker parameter name.
> -----------------------------------------------------------------------------
> I also checked the mod_perl build instruction for mod_perl 2.0. It does
> not mention anything about the option "EVERYTHING".

Shouldn't you be using MP_DEBUG=1 and MP_TRACE=1?

Regards,


Jie