Re: Share perl variables between apache process
Tnx for the replies 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 For Ryan, i already see IPC::Shareable before using it i was investigating some other option, but i think i'l use it :) -- View this message in context: http://www.nabble.com/Share-perl-variables-between-apache-process-tp19634770p19643172.html Sent from the mod_perl - General mailing list archive at Nabble.com.
Re: Apache::DBI 1.07 requires global $r - workaround?
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
Re: Apache::DBI 1.07 requires global $r - workaround?
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
[libapreq2] Should there be two temp (spool) files?
When I post a multipart-form request I see two files being written in my temp directory: -rw--- 1 ryan users 8318656 2008-09-24 10:51 apreqK5Oiyc -rw--- 1 ryan users 8318484 2008-09-24 10:51 apreqQ1qs6C And: Apache2::Request-new($r)-upload('file')-tempname() indicates the spool file is apreqQ1qs6C. So I wonder what the file apreqK5Oiyc is all about. I imagine it is used to verify the bytes written and is just standard operating procedure, but I want to ensure I have not created this situation. Thanks and Cheers, -Ryan
Re: [libapreq2] Should there be two temp (spool) files?
--- On Wed, 9/24/08, Ryan Gies [EMAIL PROTECTED] wrote: When I post a multipart-form request I see two files being written in my temp directory: -rw--- 1 ryan users 8318656 2008-09-24 10:51 apreqK5Oiyc -rw--- 1 ryan users 8318484 2008-09-24 10:51 apreqQ1qs6C And: Apache2::Request-new($r)-upload('file')-tempname() indicates the spool file is apreqQ1qs6C. So I wonder what the file apreqK5Oiyc is all about. It's spooling the contents of the raw (unparsed) body. You can tell apreq not to do this by calling $r-discard_request_body in your handler after invoking Apache2::Request::new.
Re: [libapreq2] Should there be two temp (spool) files?
On Wed, 24 Sep 2008 11:08:24 -0700 (PDT) Joe wrote: It's spooling the contents of the raw (unparsed) body. You can tell apreq not to do this by calling $r-discard_request_body in your handler after invoking Apache2::Request::new. When discarding the request body, I receive the error: End of file found (which happens when APR_BUCKET_IS_EOS). I can see the spool file being written and *presume* the multi-part boundary is missing. In a PerlHeaderParserHandler I am executing: 1) Apache2::Request-new() 2) $r-add_input_filter() 3) $r-discard_request_body() Swapping steps 2 3 will yield same error. If calling $r-discard_request_body() like this is not commonly known to work maybe I should follow-up with the libapreq2 development list? If this is known to work then obviously I need to isolate error.
Re: [libapreq2] Should there be two temp (spool) files?
--- On Wed, 9/24/08, Ryan Gies [EMAIL PROTECTED] wrote: When discarding the request body, I receive the error: End of file found (which happens when APR_BUCKET_IS_EOS). I can see the spool file being written and *presume* the multi-part boundary is missing. In a PerlHeaderParserHandler I am executing: 1) Apache2::Request-new() 2) $r-add_input_filter() 3) $r-discard_request_body() Why are you doing step 2? You shouldn't need to add an input filter for apreq to work. Swapping steps 2 3 will yield same error. If calling $r-discard_request_body() like this is not commonly known to work maybe I should follow-up with the libapreq2 development list? If this is known to work then obviously I need to isolate error. It's known to work for a few people, but it's not the default behavior. If you can't decipher why it's not working for you then asking on apreq-dev@ makes sense.
Apache2::AuthenNTLM working ok, but an error is still showing in the logs of the virtual server
Hi all, I installed Apache 2 (2.2.3-11.el5_1.3), mod_perl (2.0.2-6.3.el5) and Apache2::AuthenNTLM (0.02) on a Red Hat Linux server. Everything is working as expected (I'm getting logged in through NTLM), but a message is being written to the error log of the virtual site every time someone logs in: [Wed Sep 24 14:00:09 2008] [error] Bad/Missing NTLM/Basic Authorization Header for /test_access/ I tried searching on Google for answers, but I couldn't find any... I even saw the same questions asked in 2005 without an answer! Is it possible to get rid of the message in the error log? Here's my config in httpd.conf: Location /test_access PerlAuthenHandler Apache2::AuthenNTLM AuthType ntlm,basic AuthName Basic require valid-user #domain pdcbdc PerlAddVar ntdomain mydomain mypdc mybdc PerlSetVar defaultdomain mydomain=20 PerlSetVar fallbackdomain mydomain=20 PerlSetVar splitdomainprefix 1 PerlSetVar ntlmdebug 1 /Location Of course, mydomain, mypdc and mybdc are configured with the correct values. I also tried PerlSetVar ntlmdebug 0, but that doesn't help as this logging applies to the main server's log. Thanks! - Christian Caron
Re: Share perl variables between apache process
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. - Perrin
Re: [libapreq2] Should there be two temp (spool) files?
On Wed, 24 Sep 2008 12:07:23 -0700 (PDT) Joe wrote: 1) Apache2::Request-new() 2) $r-add_input_filter() 3) $r-discard_request_body() Why are you doing step 2? You shouldn't need to add an input filter for apreq to work. Step 2 is Apache2::UploadProgress::track_progress It's known to work for a few people, but it's not the default behavior. If you can't decipher why it's not working for you then asking on apreq-dev@ makes sense. I will try to reproduce the issue with a simple test case and follow up there if necessary. Thank you.
Re: Apache::DBI 1.07 requires global $r - workaround?
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