Re: [MP2]: strange behavior with Apache2::SubRequest::run

2008-09-25 Thread titetluc titetluc
Does anyone has additional documentation on Apache2::SubRequest::run and
Apache2::SubRequest::status returned values ?

Gaetan

2008/9/22 titetluc titetluc <[EMAIL PROTECTED]>

> 2008/9/19 Torsten Foertsch <[EMAIL PROTECTED]>
>
>> On Fri 19 Sep 2008, titetluc titetluc wrote:
>> > > Does your mod_perl one return Apache2::Const::REDIRECT at the end?
>> >
>> > No, the module returns Apache2::Const::MOVED_TEMPORARILY, setting the
>> > Location header by using $r->err_headers_out
>>
>> $ perl -MApache2::Const=REDIRECT,HTTP_MOVED_TEMPORARILY -le 'print
>> REDIRECT; print HTTP_MOVED_TEMPORARILY'
>> 302
>> 302
>>
>> Guess what that means.
>
>
> That means REDIRECT and HTTP_MOVED_TEMPORARILY are synonyms, but that does
> not explain the Apache2::SubRequest::run and $subr->status returned values
>  ;-)
>
>
>>
>> Torsten
>>
>> --
>> Need professional mod_perl support?
>> Just hire me: [EMAIL PROTECTED]
>>
>
>


Re: Share perl variables between apache process

2008-09-25 Thread Jonathan Vanasco


On Sep 24, 2008, at 3:17 PM, Perrin Harkins wrote:


On Wed, Sep 24, 2008 at 3:08 AM, badman <[EMAIL PROTECTED]> wrote:
For Michael, yes i know what it mean to have global variables  
(semaphores,
...) i was investigating this option because when i do call ...- 
>new(); it

reads a file to initiate its attribute.
I would like to improve the performance not reading always the file


If the file doesn't change, read it into a global in the parent
process before forking.  Then you'll have it for use in the children.

For Ryan, i already see IPC::Shareable before using it i was  
investigating

some other option, but i think i'l use it :)


Be careful, IPC::Shareable is pretty slow, especially for large chunks
of data.  In most cases, an RDBMS or a dbm file ends up being faster.


also memcached can work well here


// Jonathan Vanasco

w. http://findmeon.com/user/jvanasco
e. [EMAIL PROTECTED]

| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - -

| Founder/CEO
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - -

| FindMeOn.com - The cure for Multiple Web Personality Disorder
| Privacy Minded Web Identity Management and 3D Social Networking
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - -




Re: Apache::DBI 1.07 requires global $r - workaround?

2008-09-25 Thread Bryan-Kirk Reinhardt

Thanks Adam!

UPDATE:  Reverted back to 1.06 and Apache is loading now. whoohoo

To revert, remove the following 1.07 items from the system

/usr/lib/perl5/site_perl/5.8.8/Apache/AuthDBI.pm
/usr/lib/perl5/site_perl/5.8.8/Apache/DBI.pm
/usr/share/man/man3/Apache::AuthDBI.3pm
/usr/share/man/man3/Apache::DBI.3pm
/usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/auto/Apache/ 
DBI/.packlist


...edit the following file to remove the 1.06 entry

/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/perllocal.pod

... then install 1.06 normally



(*void) bkr++
___
Bryan-Kirk Reinhardt
Sr. Software Engineer
[EMAIL PROTECTED]
::
Blingo, Inc.
1620 Montgomery Street #170
San Francisco CA 94111
United States
work415-277-7223 x304
mobile  415-816-0675
work fax415-381-3630
IM bkratblingo (AIM)
___


On Sep 24, 2008, at 12:24 PM, [EMAIL PROTECTED] wrote:

1.07 is broken.  PGOLLUCCI said it was going to get reverted, but  
apparently it hasn't happened.


see http://rt.cpan.org/Public/Bug/Display.html?id=36346

Adam

Quoting Perrin Harkins <[EMAIL PROTECTED]>:

On Wed, Sep 24, 2008 at 12:39 PM, Fred Moyer  
<[EMAIL PROTECTED]> wrote:
I went ahead and use 1.06 in my production setup.  If you want to  
use 1.07,
you will need to include the GlobalRequest option in your config  
setup.


It should be fine to use GlobalRequest.  The warnings against it  
are  outdated.


- Perrin









Re: Apache::DBI 1.07 requires global $r - workaround?

2008-09-25 Thread Bryan-Kirk Reinhardt

Thanks everyone for the quick response.

Yes.  We tried this fix before we had contacted you, and now I just  
tried it again just to be sure I wasn't cross-eyed:


PerlOptions +GlobalRequest -SetupEnv -ParseHeaders

# Startup module sets @INC and does other initialization
PerlRequire .../foo/startup2.pl


also tried:


PerlOptions +GlobalRequest -SetupEnv -ParseHeaders
PerlModule Apache:DBI

# Startup module sets @INC and does other initialization
PerlRequire .../foo/startup2.pl


In startup2.pl, the

use Apache::DBI;

seems to trigger the failure...



Also, tried reversing the above line just to be hack sure:

PerlOptions -SetupEnv -ParseHeaders +GlobalRequest


but still get same error...

[Wed Sep 24 09:57:06 2008] [error] Global $r object is not available.  
Set:\n\tPerlOptions +GlobalRequest\nin httpd.conf at /usr/lib/perl5/ 
site_perl/5.8.8/Apache/DBI.pm line 144.\nCompilation failed in require  
at (eval 2) line 1.\n


Sounds to me like there is no other option but to rollback to a 1.06  
release, unless you all think of something?


Thanks again.


(*void) bkr++
___
Bryan-Kirk Reinhardt
Sr. Software Engineer
[EMAIL PROTECTED]
::
Blingo, Inc.
1620 Montgomery Street #170
San Francisco CA 94111
United States
work415-277-7223 x304
mobile  415-816-0675
work fax415-381-3630
IM bkratblingo (AIM)
___


On Sep 24, 2008, at 9:39 AM, Fred Moyer wrote:


Hi Brian,

Bryan-Kirk Reinhardt wrote:

Howdy:
We're trying to get Apache::DBI 1.07 going, and we ran into this  
problem posted by Fred (which is re-published in various places as ):

http://www.gossamer-threads.com/lists/modperl/dev/97744
It wasn't clear how you all worked around this as the final details  
were left to expertise.
Can someone please let me know how to work around this or edit in a  
fix?


Can you please cc the mod_perl list on all future correspondence? (I  
have forwarded your email to the list)


I went ahead and use 1.06 in my production setup.  If you want to  
use 1.07, you will need to include the GlobalRequest option in your  
config setup.


http://perl.apache.org/docs/2.0/user/config/config.html#C_GlobalRequest_

I'm guessing that 1.08 will pop up in November sometime after  
ApacheCon, quite a bit of hacking usually gets done there.



Much thanks