You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Boysenberry Payne <bo...@humaniteque.com> on 2006/06/30 19:57:09 UTC

Is Apache::DB still the way to interactively debug via MP2

Are the instructions as:
Home / Documentation / 1.0 / mod_perl 1.0 User Guide /
Still valid for MP2?  I can't find anything in the MP2 docs...

Thanks,
Boysenberry

boysenberrys.com | habitatlife.com | selfgnosis.com


Re: Is Apache::DB still the way to interactively debug via MP2

Posted by "Philip M. Gollucci" <pg...@p6m7g8.com>.
Boysenberry Payne wrote:
>>   I'm not very familiar with Apache on OSX, does it by default
>>   run setuid and/or setgid?  Also are you running with taint on?
>>
>>   There was an issue with Apache::SmallProf and Apache::DProf when
>>   running under taint mode, and I'm curious if it's also a problem
>>   for Apache::DB itself.
> 
> Yes I do have taint on.  I thought it was wise for the production server.
> Should I just turn it off on my development server?
Everytim perl reads a variable under PerlOptions T, it checks the Taint flag.  If its tainted, and you
use in an insecure way, perl does what you are seeing.

This is not specific to mod_perl.

You didn't read perldoc perlsec as I suggested before, so I'll paste it for clarity this time:

$path = $ENV{'PATH'};       # Tainted, but see below
$data = 'abc';              # Not tainted

system "echo $arg";         # Insecure
system "/bin/echo", $arg;   # Considered insecure
                                        # (Perl doesn't know about /bin/echo)
system "echo $hid";         # Insecure
system "echo $data";        # Insecure until PATH set

$path = $ENV{'PATH'};       # $path now tainted
$ENV{'PATH'} = '/bin:/usr/bin';
delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'};

$path = $ENV{'PATH'};       # $path now NOT tainted
system "echo $data";        # Is secure now!


You _must_ untaint $ENV{PATH}.  It just so happens that TermReady key is getting hit before your code.
Its doing a system() or some other such thing which makes use of $ENV{PATH} to find commands.



-- 
------------------------------------------------------------------------
Philip M. Gollucci (pgollucci@p6m7g8.com) 323.219.4708
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com
1024D/A79997FA F357 0FDD 2301 6296 690F  6A47 D55A 7172 A799 97F

"In all that I've done wrong I know I must have done something right to
deserve a hug every morning and butterfly kisses at night."

Re: Is Apache::DB still the way to interactively debug via MP2

Posted by Boysenberry Payne <bo...@humaniteque.com>.
>   I'm not very familiar with Apache on OSX, does it by default
>   run setuid and/or setgid?  Also are you running with taint on?
>
>   There was an issue with Apache::SmallProf and Apache::DProf when
>   running under taint mode, and I'm curious if it's also a problem
>   for Apache::DB itself.

Yes I do have taint on.  I thought it was wise for the production  
server.
Should I just turn it off on my development server?

I don't think Apache on OSX runs setuid by default.  I used Apache::DB
once before with my old Apache1.33/MP1 config and never had this
happen.

Could this have something to do with Toolkit Template and the includes
it uses, e.g. if they have the wrong group on the files, etc, or maybe  
something
similar.

This is really hard for me to debug, because it errors out before the
debugger does anything more than print the first line of code:

Habitat::Apache2::handler(/Users/boysie/habitat/perl/modules/Habitat/ 
Apache2.pm:35):
35:       my $r = shift;

error_log:
Insecure $ENV{PATH} while running setgid at  
/Library/Perl/5.8.1/darwin-thread-multi-2level/Term/ReadKey.pm line  
334.\nCompilation failed in require at  
/Library/Perl/5.8.1/Term/ReadLine/Perl.pm line 63.\n

On the second request, the debugger behaves as it should...



Thanks,
Boysenberry

boysenberrys.com | habitatlife.com | selfgnosis.com

On Jul 3, 2006, at 10:00 AM, Frank Wiles wrote:

> On Sun, 2 Jul 2006 11:25:27 -0500
> Boysenberry Payne <bo...@humaniteque.com> wrote:
>
>> I little more info, the setgid error only happens on the first request
>> and only while debugging, as far as I can tell.
>>
Thanks,
Boysenberry

boysenberrys.com | habitatlife.com | selfgnosis.com
>>
>> On Jul 2, 2006, at 8:35 AM, Boysenberry Payne wrote:
>>
>>> That fixed the print issue but I'm still getting the following
>>> error:
>>>
>>> Insecure $ENV{PATH} while running setgid at
>>> /Library/Perl/5.8.1/darwin-thread-multi-2level/Term/ReadKey.pm
>>> line 334.\nCompilation failed in require at
>>> /Library/Perl/5.8.1/Term/ReadLine/Perl.pm line 63.\n
>>>
>>> How can I tell what is causing the error?
>>> I get it before the first line of code is run in my handler, so
>>> I'm guessing its
>>> something during compile that causes it.  Am I off base?
>>>
>>> Is Apache2 or MP2 compiled improperly maybe?
>>>
>>> Any suggestions?
>
>   Sorry was off having a rare "computer free weekend".  :)
>
>   I'm not very familiar with Apache on OSX, does it by default
>   run setuid and/or setgid?  Also are you running with taint on?
>
>   There was an issue with Apache::SmallProf and Apache::DProf when
>   running under taint mode, and I'm curious if it's also a problem
>   for Apache::DB itself.
>
>  ---------------------------------
>    Frank Wiles <fr...@wiles.org>
>    http://www.wiles.org
>  ---------------------------------
>
>
>


Re: Is Apache::DB still the way to interactively debug via MP2

Posted by Frank Wiles <fr...@wiles.org>.
On Sun, 2 Jul 2006 11:25:27 -0500
Boysenberry Payne <bo...@humaniteque.com> wrote:

> I little more info, the setgid error only happens on the first request
> and only while debugging, as far as I can tell.
> 
> Thanks,
> Boysenberry
> 
> boysenberrys.com | habitatlife.com | selfgnosis.com
> 
> On Jul 2, 2006, at 8:35 AM, Boysenberry Payne wrote:
> 
> > That fixed the print issue but I'm still getting the following
> > error:
> >
> > Insecure $ENV{PATH} while running setgid at  
> > /Library/Perl/5.8.1/darwin-thread-multi-2level/Term/ReadKey.pm
> > line 334.\nCompilation failed in require at  
> > /Library/Perl/5.8.1/Term/ReadLine/Perl.pm line 63.\n
> >
> > How can I tell what is causing the error?
> > I get it before the first line of code is run in my handler, so
> > I'm guessing its
> > something during compile that causes it.  Am I off base?
> >
> > Is Apache2 or MP2 compiled improperly maybe?
> >
> > Any suggestions?

  Sorry was off having a rare "computer free weekend".  :) 

  I'm not very familiar with Apache on OSX, does it by default 
  run setuid and/or setgid?  Also are you running with taint on? 
 
  There was an issue with Apache::SmallProf and Apache::DProf when
  running under taint mode, and I'm curious if it's also a problem
  for Apache::DB itself.  

 ---------------------------------
   Frank Wiles <fr...@wiles.org>
   http://www.wiles.org
 ---------------------------------


Re: Is Apache::DB still the way to interactively debug via MP2

Posted by Boysenberry Payne <bo...@humaniteque.com>.
I little more info, the setgid error only happens on the first request
and only while debugging, as far as I can tell.

Thanks,
Boysenberry

boysenberrys.com | habitatlife.com | selfgnosis.com

On Jul 2, 2006, at 8:35 AM, Boysenberry Payne wrote:

> That fixed the print issue but I'm still getting the following error:
>
> Insecure $ENV{PATH} while running setgid at  
> /Library/Perl/5.8.1/darwin-thread-multi-2level/Term/ReadKey.pm line  
> 334.\nCompilation failed in require at  
> /Library/Perl/5.8.1/Term/ReadLine/Perl.pm line 63.\n
>
> How can I tell what is causing the error?
> I get it before the first line of code is run in my handler, so I'm  
> guessing its
> something during compile that causes it.  Am I off base?
>
> Is Apache2 or MP2 compiled improperly maybe?
>
> Any suggestions?
>
>
> Thanks,
> Boysenberry
>
> boysenberrys.com | habitatlife.com | selfgnosis.com
>
> On Jul 1, 2006, at 9:49 PM, Philip M. Gollucci wrote:
>
>> Boysenberry Payne wrote:
>>> print vs $r->print still works.  Is it better to use one over the  
>>> other?
>>> If I change all of my $r->print statements to read print instead will
>>> I need to expect trouble?
>> do you have this in the file in question ?
>> use Apache2::RequestIO ()
>> use Apache2::RequestRec ()
>>
>> just because you put in in startup.pl doesn't mean you shouldn't put  
>> it in the file itself.
>>
>>
>> ---------------------------------------------------------------------- 
>> --
>> Philip M. Gollucci (pgollucci@p6m7g8.com) 323.219.4708
>> Consultant / http://p6m7g8.net/Resume/resume.shtml
>> Senior Software Engineer - TicketMaster - http://ticketmaster.com
>> 1024D/A79997FA F357 0FDD 2301 6296 690F  6A47 D55A 7172 A799 97F
>>
>> "In all that I've done wrong I know I must have done something right  
>> to
>> deserve a hug every morning and butterfly kisses at night."
>>
>>
>
>
>


Re: Is Apache::DB still the way to interactively debug via MP2

Posted by Boysenberry Payne <bo...@humaniteque.com>.
That fixed the print issue but I'm still getting the following error:

Insecure $ENV{PATH} while running setgid at  
/Library/Perl/5.8.1/darwin-thread-multi-2level/Term/ReadKey.pm line  
334.\nCompilation failed in require at  
/Library/Perl/5.8.1/Term/ReadLine/Perl.pm line 63.\n

How can I tell what is causing the error?
I get it before the first line of code is run in my handler, so I'm  
guessing its
something during compile that causes it.  Am I off base?

Is Apache2 or MP2 compiled improperly maybe?

Any suggestions?


Thanks,
Boysenberry

boysenberrys.com | habitatlife.com | selfgnosis.com

On Jul 1, 2006, at 9:49 PM, Philip M. Gollucci wrote:

> Boysenberry Payne wrote:
>> print vs $r->print still works.  Is it better to use one over the  
>> other?
>> If I change all of my $r->print statements to read print instead will
>> I need to expect trouble?
> do you have this in the file in question ?
> use Apache2::RequestIO ()
> use Apache2::RequestRec ()
>
> just because you put in in startup.pl doesn't mean you shouldn't put  
> it in the file itself.
>
>
> ----------------------------------------------------------------------- 
> -
> Philip M. Gollucci (pgollucci@p6m7g8.com) 323.219.4708
> Consultant / http://p6m7g8.net/Resume/resume.shtml
> Senior Software Engineer - TicketMaster - http://ticketmaster.com
> 1024D/A79997FA F357 0FDD 2301 6296 690F  6A47 D55A 7172 A799 97F
>
> "In all that I've done wrong I know I must have done something right to
> deserve a hug every morning and butterfly kisses at night."
>
>


Re: Is Apache::DB still the way to interactively debug via MP2

Posted by "Philip M. Gollucci" <pg...@p6m7g8.com>.
Boysenberry Payne wrote:
> print vs $r->print still works.  Is it better to use one over the other?
> If I change all of my $r->print statements to read print instead will
> I need to expect trouble?
do you have this in the file in question ?
use Apache2::RequestIO ()
use Apache2::RequestRec ()

just because you put in in startup.pl doesn't mean you shouldn't put it in the file itself.


------------------------------------------------------------------------
Philip M. Gollucci (pgollucci@p6m7g8.com) 323.219.4708
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com
1024D/A79997FA F357 0FDD 2301 6296 690F  6A47 D55A 7172 A799 97F

"In all that I've done wrong I know I must have done something right to
deserve a hug every morning and butterfly kisses at night."

Re: Is Apache::DB still the way to interactively debug via MP2

Posted by Boysenberry Payne <bo...@humaniteque.com>.
print vs $r->print still works.  Is it better to use one over the other?
If I change all of my $r->print statements to read print instead will
I need to expect trouble?

Thanks,
Boysenberry

boysenberrys.com | habitatlife.com | selfgnosis.com

On Jul 1, 2006, at 1:40 PM, Boysenberry Payne wrote:

> To clarify, I get the error now whether I debug or not.
> Until I started to debug I wasn't getting the error.
> I don't think I changed anything in my code to cause this though...
>
> Thanks,
> Boysenberry
>
> boysenberrys.com | habitatlife.com | selfgnosis.com
>
> On Jul 1, 2006, at 1:37 PM, Boysenberry Payne wrote:
>
>> I'm getting the following error only when I debug:
>>
>> Can't locate object method "print" via package "Apache2::RequestRec"  
>> at /Users/boysie/habitat/perl/modules/Habitat/Apache2/Template.pm  
>> line 69.\n
>>
>> Line 69:
>> $r->print( $output ) if $output;
>>
>> Where $r is Apache2::RequestRec
>>
>> Any ideas?  It was working fine yesterday, the only thing different  
>> is the debugger now,
>> and I even have it remarked out and still get this error.  It doesn't  
>> make any sense to me.
>> Why would Apache2:RequestRec loose the print subroutine?
>>
>>
>>
>> Thanks,
>> Boysenberry
>>
>> boysenberrys.com | habitatlife.com | selfgnosis.com
>>
>> On Jul 1, 2006, at 1:36 AM, Boysenberry Payne wrote:
>>
>>>> I'm not sure what your doing that you need to be running setgid  
>>>> though.
>>>
>>> Me either.
>>> Do any of these require setgid that you know of?
>>>
>>> use APR::Pool ();
>>> use Apache::DB ();
>>> Apache::DB->init();
>>>
>>> use Apache::DBI ();
>>> use Apache2::Connection ();
>>> use Apache2::Const -compile => qw( OK REDIRECT FORBIDDEN );
>>> use Apache2::Cookie ();
>>> use Apache2::Request ();
>>> use Apache2::Upload ();
>>> use APR::Request::Apache2 ();
>>> use Email::Send ();
>>> use HTML::TreeBuilder ();
>>> use Template ();
>>> use URI::Escape ();
>>>
>>> I used egrep on all of my custom modules and came up with nothing.
>>> I says during install_driver(mysql)  would it be from changing  
>>> databases,
>>> e.g. starting in one database/user than switching to another  
>>> database/user?
>>>
>> Thanks,
>> Boysenberry
>>
>> boysenberrys.com | habitatlife.com | selfgnosis.com
>>>
>>> On Jun 30, 2006, at 6:36 PM, Philip M. Gollucci wrote:
>>>
>>>> Boysenberry Payne wrote:
>>>>> That helped me get the Debugger working thank you.
>>>>> Now its cutting out with this error in the error log:
>>>>> [Fri Jun 30 17:55:23 2006] [error] [client 127.0.0.1]  
>>>>> install_driver(mysql) failed: Insecure $ENV{PATH} while running  
>>>>> setgid at  
>>>>> /Library/Perl/5.8.1/darwin-thread-multi-2level/Term/ReadKey.pm  
>>>>> line 334.\nCompilation failed in require at  
>>>>> /Library/Perl/5.8.1/Term/ReadLine/Perl.pm line 58.\n\n at  
>>>>> /Users/boysie/habitat/perl/modules/Habitat/Apache2/DB.pm line 39\n
>>>>> How come its saying the $ENV{PATH} is insecure?
>>>>> Any ideas?
>>>> perldoc perlsec.
>>>>
>>>> By default path is tainted unless you untaint it.
>>>>
>>>> I'm not sure what your doing that you need to be running setgid  
>>>> though.
>>>>
>>>>
>>>> --  
>>>> -------------------------------------------------------------------- 
>>>> ----
>>>> Philip M. Gollucci (pgollucci@p6m7g8.com) 323.219.4708
>>>> Consultant / http://p6m7g8.net/Resume/resume.shtml
>>>> Senior Software Engineer - TicketMaster - http://ticketmaster.com
>>>> 1024D/A79997FA F357 0FDD 2301 6296 690F  6A47 D55A 7172 A799 97F
>>>>
>>>> "In all that I've done wrong I know I must have done something  
>>>> right to
>>>> deserve a hug every morning and butterfly kisses at night."
>>>>
>>>>
>>>
>>>
>>>
>>
>>
>>
>
>
>


Re: Is Apache::DB still the way to interactively debug via MP2

Posted by Boysenberry Payne <bo...@humaniteque.com>.
To clarify, I get the error now whether I debug or not.
Until I started to debug I wasn't getting the error.
I don't think I changed anything in my code to cause this though...

Thanks,
Boysenberry

boysenberrys.com | habitatlife.com | selfgnosis.com

On Jul 1, 2006, at 1:37 PM, Boysenberry Payne wrote:

> I'm getting the following error only when I debug:
>
> Can't locate object method "print" via package "Apache2::RequestRec"  
> at /Users/boysie/habitat/perl/modules/Habitat/Apache2/Template.pm line  
> 69.\n
>
> Line 69:
> $r->print( $output ) if $output;
>
> Where $r is Apache2::RequestRec
>
> Any ideas?  It was working fine yesterday, the only thing different is  
> the debugger now,
> and I even have it remarked out and still get this error.  It doesn't  
> make any sense to me.
> Why would Apache2:RequestRec loose the print subroutine?
>
>
>
> Thanks,
> Boysenberry
>
> boysenberrys.com | habitatlife.com | selfgnosis.com
>
> On Jul 1, 2006, at 1:36 AM, Boysenberry Payne wrote:
>
>>> I'm not sure what your doing that you need to be running setgid  
>>> though.
>>
>> Me either.
>> Do any of these require setgid that you know of?
>>
>> use APR::Pool ();
>> use Apache::DB ();
>> Apache::DB->init();
>>
>> use Apache::DBI ();
>> use Apache2::Connection ();
>> use Apache2::Const -compile => qw( OK REDIRECT FORBIDDEN );
>> use Apache2::Cookie ();
>> use Apache2::Request ();
>> use Apache2::Upload ();
>> use APR::Request::Apache2 ();
>> use Email::Send ();
>> use HTML::TreeBuilder ();
>> use Template ();
>> use URI::Escape ();
>>
>> I used egrep on all of my custom modules and came up with nothing.
>> I says during install_driver(mysql)  would it be from changing  
>> databases,
>> e.g. starting in one database/user than switching to another  
>> database/user?
>>
> Thanks,
> Boysenberry
>
> boysenberrys.com | habitatlife.com | selfgnosis.com
>>
>> On Jun 30, 2006, at 6:36 PM, Philip M. Gollucci wrote:
>>
>>> Boysenberry Payne wrote:
>>>> That helped me get the Debugger working thank you.
>>>> Now its cutting out with this error in the error log:
>>>> [Fri Jun 30 17:55:23 2006] [error] [client 127.0.0.1]  
>>>> install_driver(mysql) failed: Insecure $ENV{PATH} while running  
>>>> setgid at  
>>>> /Library/Perl/5.8.1/darwin-thread-multi-2level/Term/ReadKey.pm line  
>>>> 334.\nCompilation failed in require at  
>>>> /Library/Perl/5.8.1/Term/ReadLine/Perl.pm line 58.\n\n at  
>>>> /Users/boysie/habitat/perl/modules/Habitat/Apache2/DB.pm line 39\n
>>>> How come its saying the $ENV{PATH} is insecure?
>>>> Any ideas?
>>> perldoc perlsec.
>>>
>>> By default path is tainted unless you untaint it.
>>>
>>> I'm not sure what your doing that you need to be running setgid  
>>> though.
>>>
>>>
>>> --  
>>> --------------------------------------------------------------------- 
>>> ---
>>> Philip M. Gollucci (pgollucci@p6m7g8.com) 323.219.4708
>>> Consultant / http://p6m7g8.net/Resume/resume.shtml
>>> Senior Software Engineer - TicketMaster - http://ticketmaster.com
>>> 1024D/A79997FA F357 0FDD 2301 6296 690F  6A47 D55A 7172 A799 97F
>>>
>>> "In all that I've done wrong I know I must have done something right  
>>> to
>>> deserve a hug every morning and butterfly kisses at night."
>>>
>>>
>>
>>
>>
>
>
>


Re: Is Apache::DB still the way to interactively debug via MP2

Posted by Boysenberry Payne <bo...@humaniteque.com>.
I'm getting the following error only when I debug:

Can't locate object method "print" via package "Apache2::RequestRec" at  
/Users/boysie/habitat/perl/modules/Habitat/Apache2/Template.pm line  
69.\n

Line 69:
$r->print( $output ) if $output;

Where $r is Apache2::RequestRec

Any ideas?  It was working fine yesterday, the only thing different is  
the debugger now,
and I even have it remarked out and still get this error.  It doesn't  
make any sense to me.
Why would Apache2:RequestRec loose the print subroutine?



Thanks,
Boysenberry

boysenberrys.com | habitatlife.com | selfgnosis.com

On Jul 1, 2006, at 1:36 AM, Boysenberry Payne wrote:

>> I'm not sure what your doing that you need to be running setgid  
>> though.
>
> Me either.
> Do any of these require setgid that you know of?
>
> use APR::Pool ();
> use Apache::DB ();
> Apache::DB->init();
>
> use Apache::DBI ();
> use Apache2::Connection ();
> use Apache2::Const -compile => qw( OK REDIRECT FORBIDDEN );
> use Apache2::Cookie ();
> use Apache2::Request ();
> use Apache2::Upload ();
> use APR::Request::Apache2 ();
> use Email::Send ();
> use HTML::TreeBuilder ();
> use Template ();
> use URI::Escape ();
>
> I used egrep on all of my custom modules and came up with nothing.
> I says during install_driver(mysql)  would it be from changing  
> databases,
> e.g. starting in one database/user than switching to another  
> database/user?
>
Thanks,
Boysenberry

boysenberrys.com | habitatlife.com | selfgnosis.com
>
> On Jun 30, 2006, at 6:36 PM, Philip M. Gollucci wrote:
>
>> Boysenberry Payne wrote:
>>> That helped me get the Debugger working thank you.
>>> Now its cutting out with this error in the error log:
>>> [Fri Jun 30 17:55:23 2006] [error] [client 127.0.0.1]  
>>> install_driver(mysql) failed: Insecure $ENV{PATH} while running  
>>> setgid at  
>>> /Library/Perl/5.8.1/darwin-thread-multi-2level/Term/ReadKey.pm line  
>>> 334.\nCompilation failed in require at  
>>> /Library/Perl/5.8.1/Term/ReadLine/Perl.pm line 58.\n\n at  
>>> /Users/boysie/habitat/perl/modules/Habitat/Apache2/DB.pm line 39\n
>>> How come its saying the $ENV{PATH} is insecure?
>>> Any ideas?
>> perldoc perlsec.
>>
>> By default path is tainted unless you untaint it.
>>
>> I'm not sure what your doing that you need to be running setgid  
>> though.
>>
>>
>> --  
>> ---------------------------------------------------------------------- 
>> --
>> Philip M. Gollucci (pgollucci@p6m7g8.com) 323.219.4708
>> Consultant / http://p6m7g8.net/Resume/resume.shtml
>> Senior Software Engineer - TicketMaster - http://ticketmaster.com
>> 1024D/A79997FA F357 0FDD 2301 6296 690F  6A47 D55A 7172 A799 97F
>>
>> "In all that I've done wrong I know I must have done something right  
>> to
>> deserve a hug every morning and butterfly kisses at night."
>>
>>
>
>
>


Re: Is Apache::DB still the way to interactively debug via MP2

Posted by Boysenberry Payne <bo...@humaniteque.com>.
> I'm not sure what your doing that you need to be running setgid though.

Me either.
Do any of these require setgid that you know of?

use APR::Pool ();
use Apache::DB ();
Apache::DB->init();

use Apache::DBI ();
use Apache2::Connection ();
use Apache2::Const -compile => qw( OK REDIRECT FORBIDDEN );
use Apache2::Cookie ();
use Apache2::Request ();
use Apache2::Upload ();
use APR::Request::Apache2 ();
use Email::Send ();
use HTML::TreeBuilder ();
use Template ();
use URI::Escape ();

I used egrep on all of my custom modules and came up with nothing.
I says during install_driver(mysql)  would it be from changing  
databases,
e.g. starting in one database/user than switching to another  
database/user?

Thanks,
Boysenberry

boysenberrys.com | habitatlife.com | selfgnosis.com

On Jun 30, 2006, at 6:36 PM, Philip M. Gollucci wrote:

> Boysenberry Payne wrote:
>> That helped me get the Debugger working thank you.
>> Now its cutting out with this error in the error log:
>> [Fri Jun 30 17:55:23 2006] [error] [client 127.0.0.1]  
>> install_driver(mysql) failed: Insecure $ENV{PATH} while running  
>> setgid at  
>> /Library/Perl/5.8.1/darwin-thread-multi-2level/Term/ReadKey.pm line  
>> 334.\nCompilation failed in require at  
>> /Library/Perl/5.8.1/Term/ReadLine/Perl.pm line 58.\n\n at  
>> /Users/boysie/habitat/perl/modules/Habitat/Apache2/DB.pm line 39\n
>> How come its saying the $ENV{PATH} is insecure?
>> Any ideas?
> perldoc perlsec.
>
> By default path is tainted unless you untaint it.
>
> I'm not sure what your doing that you need to be running setgid though.
>
>
> --  
> ----------------------------------------------------------------------- 
> -
> Philip M. Gollucci (pgollucci@p6m7g8.com) 323.219.4708
> Consultant / http://p6m7g8.net/Resume/resume.shtml
> Senior Software Engineer - TicketMaster - http://ticketmaster.com
> 1024D/A79997FA F357 0FDD 2301 6296 690F  6A47 D55A 7172 A799 97F
>
> "In all that I've done wrong I know I must have done something right to
> deserve a hug every morning and butterfly kisses at night."
>
>


Re: Is Apache::DB still the way to interactively debug via MP2

Posted by "Philip M. Gollucci" <pg...@p6m7g8.com>.
Boysenberry Payne wrote:
> That helped me get the Debugger working thank you.
> 
> Now its cutting out with this error in the error log:
> [Fri Jun 30 17:55:23 2006] [error] [client 127.0.0.1] 
> install_driver(mysql) failed: Insecure $ENV{PATH} while running setgid 
> at /Library/Perl/5.8.1/darwin-thread-multi-2level/Term/ReadKey.pm line 
> 334.\nCompilation failed in require at 
> /Library/Perl/5.8.1/Term/ReadLine/Perl.pm line 58.\n\n at 
> /Users/boysie/habitat/perl/modules/Habitat/Apache2/DB.pm line 39\n
> 
> How come its saying the $ENV{PATH} is insecure?
> Any ideas?
perldoc perlsec.

By default path is tainted unless you untaint it.

I'm not sure what your doing that you need to be running setgid though.


-- 
------------------------------------------------------------------------
Philip M. Gollucci (pgollucci@p6m7g8.com) 323.219.4708
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com
1024D/A79997FA F357 0FDD 2301 6296 690F  6A47 D55A 7172 A799 97F

"In all that I've done wrong I know I must have done something right to
deserve a hug every morning and butterfly kisses at night."

Re: Is Apache::DB still the way to interactively debug via MP2

Posted by Boysenberry Payne <bo...@humaniteque.com>.
That helped me get the Debugger working thank you.

Now its cutting out with this error in the error log:
[Fri Jun 30 17:55:23 2006] [error] [client 127.0.0.1]  
install_driver(mysql) failed: Insecure $ENV{PATH} while running setgid  
at /Library/Perl/5.8.1/darwin-thread-multi-2level/Term/ReadKey.pm line  
334.\nCompilation failed in require at  
/Library/Perl/5.8.1/Term/ReadLine/Perl.pm line 58.\n\n at  
/Users/boysie/habitat/perl/modules/Habitat/Apache2/DB.pm line 39\n

How come its saying the $ENV{PATH} is insecure?
Any ideas?

Thanks,
Boysenberry

boysenberrys.com | habitatlife.com | selfgnosis.com

On Jun 30, 2006, at 4:38 PM, Philip M. Gollucci wrote:

> Boysenberry Payne wrote:
>> [notice] Apache::DB initialized in child 1441
>> Syntax error on line 74 of  
>> /Users/boysie/habitat/apache/conf/perl.conf:
>> mod_perl is already running, too late for PerlSwitches
>> I must be doing something wrong.  I'm using the following:
>> Apache/2.0.55
>> perl5 (revision 5.0 version 8 subversion 1 RC3)
>> OS X 10.3.9
>> MP2.02
>> Here is my config:
>> <Perl>
>>     use Apache::DB ();
>>     Apache::DB->init;
>> </Perl>
>> <Location />
>>     PerlFixupHandler Apache::DB
>> </Location>
> you need a small 3 line db.pl
> file at startup under mod_perl2.  That error is from something  
> unrelated in your config.
> http://search.cpan.org/~fwiles/Apache-DB-0.13/DB.pm
>
> see the init section there.
>
> I use it all the time, and it works fine.
>
> Frank Wiles reads this list regular and is a mp docs committer as well.
>
> --  
> ----------------------------------------------------------------------- 
> -
> Philip M. Gollucci (pgollucci@p6m7g8.com) 323.219.4708
> Consultant / http://p6m7g8.net/Resume/resume.shtml
> Senior Software Engineer - TicketMaster - http://ticketmaster.com
> 1024D/A79997FA F357 0FDD 2301 6296 690F  6A47 D55A 7172 A799 97F
>
> "It takes a minute to have a crush on someone, an hour to like someone,
> and a day to love someone, but it takes a lifetime to forget  
> someone..."
>
>


Re: Is Apache::DB still the way to interactively debug via MP2

Posted by "Philip M. Gollucci" <pg...@p6m7g8.com>.
Boysenberry Payne wrote:
> [notice] Apache::DB initialized in child 1441
> Syntax error on line 74 of /Users/boysie/habitat/apache/conf/perl.conf:
> mod_perl is already running, too late for PerlSwitches
> 
> I must be doing something wrong.  I'm using the following:
> 
> Apache/2.0.55
> perl5 (revision 5.0 version 8 subversion 1 RC3)
> OS X 10.3.9
> MP2.02
> 
> Here is my config:
> 
> <Perl>
>     use Apache::DB ();
>     Apache::DB->init;
> </Perl>
> <Location />
>     PerlFixupHandler Apache::DB
> </Location>
you need a small 3 line db.pl
file at startup under mod_perl2.  That error is from something unrelated in your config.
http://search.cpan.org/~fwiles/Apache-DB-0.13/DB.pm

see the init section there.

I use it all the time, and it works fine.

Frank Wiles reads this list regular and is a mp docs committer as well.

-- 
------------------------------------------------------------------------
Philip M. Gollucci (pgollucci@p6m7g8.com) 323.219.4708
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com
1024D/A79997FA F357 0FDD 2301 6296 690F  6A47 D55A 7172 A799 97F

"It takes a minute to have a crush on someone, an hour to like someone,
and a day to love someone, but it takes a lifetime to forget someone..."

Re: Is Apache::DB still the way to interactively debug via MP2

Posted by Boysenberry Payne <bo...@humaniteque.com>.
When I follow the example, using Apache2::Status instead of
Apache::Status I get the following at the prompt:


root# httpd -X -D PERLDB
Processing config directory: /private/etc/httpd/users/*.conf
  Processing config file: /private/etc/httpd/users/boysie.conf

Instead of the expected:
[notice] Apache::DB initialized in child 950

When I do apachectl start I get the following:

root# apachectl start
[notice] Apache::DB initialized in child 1441
Syntax error on line 74 of /Users/boysie/habitat/apache/conf/perl.conf:
mod_perl is already running, too late for PerlSwitches

I must be doing something wrong.  I'm using the following:

Apache/2.0.55
perl5 (revision 5.0 version 8 subversion 1 RC3)
OS X 10.3.9
MP2.02

Here is my config:

<Perl>
	use Apache::DB ();
	Apache::DB->init;
</Perl>
<Location />
	PerlFixupHandler Apache::DB
</Location>

PerlModule Apache2::Status
<Location /perl-status>
     PerlResponseHandler Apache2::Status
     SetHandler perl-script
</Location>

I am using mod-rewrite too, would that effect the outcome?


Thanks,
Boysenberry

boysenberrys.com | habitatlife.com | selfgnosis.com

On Jun 30, 2006, at 1:07 PM, Perrin Harkins wrote:

> On Fri, 2006-06-30 at 12:57 -0500, Boysenberry Payne wrote:
>> Are the instructions as:
>> Home / Documentation / 1.0 / mod_perl 1.0 User Guide /
>> Still valid for MP2?  I can't find anything in the MP2 docs...
>
> The Apache::DB docs say it supports mod_perl 2.
>
> - Perrin
>
>
>


Re: Is Apache::DB still the way to interactively debug via MP2

Posted by Perrin Harkins <pe...@elem.com>.
On Fri, 2006-06-30 at 12:57 -0500, Boysenberry Payne wrote:
> Are the instructions as:
> Home / Documentation / 1.0 / mod_perl 1.0 User Guide /
> Still valid for MP2?  I can't find anything in the MP2 docs...

The Apache::DB docs say it supports mod_perl 2.

- Perrin