Apache 2.4 and mod_dir

2014-04-12 Thread Ryan Gies
The httpd commit r1573580 (under a configurable option: don't run mod_dir if r-handler is already set.) does not appear to hold true when $r-handler is set via MP as: # In my httpd config DirectoryCheckHandler Off # In a PerlFixupHandler $r-push_handlers(PerlResponseHandler =

Re: setHandler question

2012-12-14 Thread Ryan Gies
On 12/14/2012 8:52 AM, André Warnier wrote: I suppose that in the end I will want to do something like this : my $finfo = $r-finfo(); # do something to $finfo to set the flag $r-finfo($finfo); $r-handler('modperl'); $r-set_handlers(PerlResponseHandler = \_my_response_handler); but how do I do

Re: setHandler question

2012-12-14 Thread Ryan Gies
On 12/14/2012 3:29 PM, André Warnier wrote: Ryan Gies wrote: On 12/14/2012 8:52 AM, André Warnier wrote: I suppose that in the end I will want to do something like this : my $finfo = $r-finfo(); # do something to $finfo to set the flag $r-finfo($finfo); $r-handler('modperl'); $r-set_handlers

Re: get the incoming TCP protocol type

2012-11-24 Thread Ryan Gies
On 11/24/2012 10:58 AM, André Warnier wrote: Hi. Inside a mod_perl2 request handler, how can I find out if the current request was received via HTTP or HTTPS ? Have you looked into: $r-scheme; # Will return 'http' or 'https' Maybe you want to set environment variables:

Re: Setting up perl-virtual-host handlers from startup script or handler, not from apache config, not hardcoded

2012-05-22 Thread Ryan Gies
As you have eluded to, it is the request (not the server) which can be configured as such. Possibly this would work for you: VirtualHost A PerlTransHandler +Local::Handlers-startup /VirtualHost VirtualHost B PerlTransHandler +Local::Handlers-startup /VirtualHost package Local::Handlers;

Re: Uploading Files bigger the 64M

2011-01-25 Thread Ryan Gies
1) You may lower the limit, not raise it. If you are trying to raise it, you will get Conflicting information. 2) Your server config trumps your virtual-host config. If you have not set APREQ2_ReadLimit outside of your VirtualHost, then it is set for you (64M). Personally, I do this: A)

Re: Dollar Self Storage (aka mod_perl children sharing/updating data on a schedule)

2011-01-13 Thread Ryan Gies
On 01/03/2011 04:48 PM, Jeff Anderson wrote: the goal being that each child will not have to hit a database for every request. If the reason behind not hitting the database on each request is because you don't want to impact your page-response times, know that the Cleanup phase happens

Re: Mod-jk worker not being called after calling Perl handler

2010-11-22 Thread Ryan Gies
You should be putting use strict; at the top of your Perl files (which would have reported the following error) The constant is DECLINED, not DECLINE On 11/22/2010 12:53 PM, Mohit Anchlia wrote: I tried package Apache2::Rules2; #use lib '/home/.mohit/mod_perl-2.0.4/lib'; use Apache2::Const

Re: Mod-jk worker not being called after calling Perl handler

2010-11-20 Thread Ryan Gies
Have you tried returning Apache2::Const::DECLINED instead? http://perl.apache.org/docs/2.0/user/handlers/intro.html#Handler_Return_Values On 11/20/2010 12:09 AM, Mohit Anchlia wrote: I am trying to look at how handlers work so I created a very simple perl handler that just return OK. And I

Re: combining multiple filtered files into a single response

2010-11-19 Thread Ryan Gies
On 11/18/2010 06:15 PM, Brian wrote: One is to iterate over the filenames with subrequests (if this is even possible/supported), so that each can be passed internally to a single request as in the simple (single-file) handler described in the example above. If the output of the subrequests can

Re: Path to my module and APR::Socket::send() usage

2010-10-21 Thread Ryan Gies
On 10/21/2010 08:35 AM, Alexander Farber wrote: Hello mod_perl 2 users, I have 3 questions please: 1) How do you specify the path to your custom module, so that Apache 2 can load it at the startup? To adjust @INC at start-up: IfModule mod_perl.c PerlSwitches -I /my/perl/lib

Re: PerlSetEnv vars not available in PerlRequire script

2010-07-22 Thread Ryan Gies
Notice that PerlSetEnv is allowed in scope DIR: http://perl.apache.org/docs/2.0/user/config/config.html#mod_perl_Directives_Argument_Types_and_Allowed_Location Try moving the PerlSetEnv line to inside the LocationMatch directive. Although the above documentation indicates PerlSetVar is also of

Re: Use form instead of AuthType Basic (pop-up windows)

2010-01-21 Thread Ryan Gies
On 1/21/2010 12:25 PM, Juan Manuel Parrilla Gutiérrez wrote: Hello, I am sorry if I didnt explain me properly. Apache2::AuthCookie is what you are looking for. Read through the source code, understand what it does and why and you will be able to write your own. No, you cannot use an html

Re: Apache2::Request-param fails with POST

2009-10-22 Thread Ryan Gies
This may be obvious, however note that calling $req-param will invoke the input filters, should have have any configured. On 10/21/2009 06:12 PM, nmittal wrote: Hi I am using Apache2.2 and mod_perl. I have a login page that POSTs to an authentication script. form method=POST

Fwd: Apache2::Reload

2009-08-18 Thread Ryan Gies
Aug 2009 11:32:21 -0400 From: Ryan Gies r...@livesite.net Organization: Livesite Netwoks, LLC To: d...@perl.apache.org I have a patch for Apache2::Reload which does two things: a) ignores require-hooks which exist in %INC (fix) b) reloads by file, not module name (fix?) I consider

Re: Apache2::URI::unescape_url

2009-05-09 Thread Ryan Gies
On Thu, 7 May 2009 14:29:18 -0700 Fred wrote: That's pretty weird.  If you modify it to be: $url = Apache2::URI::unescape_url($url); then it works ok, though according to the docs on perl.apache.org it's not supposed to have a return value. Just curious Adam, does that mean you were

Re: same handler with different port

2009-02-17 Thread Ryan Gies
On Tue, 17 Feb 2009 16:20:42 +0100 valerio wrote: Hi, I was wondering if is possible using same mod_perl handler with different ports and how can i manage to configure it. The Listen directive is part of the server configuration, and not valid within a Location block. Configure your server

Re: $r-status no correct

2008-10-29 Thread Ryan Gies
On Wed, 29 Oct 2008 15:29:18 -0400 Michael wrote: So what's going on here. Shouldn't the 2 requests (/foo and /foo/index.pl) be treated exactly the same? /foo is much different than /foo/index.pl because /foo is handled by mod_dir (http://httpd.apache.org/docs/2.0/mod/mod_dir.html). First,

Re: $r-status no correct

2008-10-29 Thread Ryan Gies
On Wed, 29 Oct 2008 16:13:32 -0400 Michael wrote: Ok then let's talk about /foo/ and /foo/index.pl so that we're not talking about the redirect. Right on if it was subrequests that were the problem I would have expected to see more than debug statement in the log since the cleanup handler

Re: $r-status no correct

2008-10-29 Thread Ryan Gies
On Wed, 29 Oct 2008 16:51:51 -0400 Michael wrote: This is probably a really dumb question, but how do you get a log like that? I tried setting LogLevel debug but no dice. Not a permanent home, but here is module which will slip in and give you similar messages.

Re: $r-status no correct

2008-10-29 Thread Ryan Gies
CORRECTIONS! On Wed, 29 Oct 2008 15:30:12 -0700 Ryan wrote: I tested a PHP script with a syntax error, and I see exactly what you're seeing. No, my test was not valid. $r-status will be 500 when the PHP script issues: header('HTTP/1.0 500 Error'); From Apache2::RequestRec documentation for

[libapreq2] Should there be two temp (spool) files?

2008-09-24 Thread Ryan Gies
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

Re: [libapreq2] Should there be two temp (spool) files?

2008-09-24 Thread Ryan Gies
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

Re: [libapreq2] Should there be two temp (spool) files?

2008-09-24 Thread Ryan Gies
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

Re: Share perl variables between apache process

2008-09-23 Thread Ryan Gies
On Tue, 23 Sep 2008 12:11:03 -0700 (PDT) badman wrote: I was asking if there is a way that i could get a really shared variable among all the process, I had no problems using IPC::Sharable with mp2 and it may be what you're looking for. I do not use this in production as the data shared does

Re: How to extract the protocol part of URL from an apache request

2008-09-17 Thread Ryan Gies
On Wed, 17 Sep 2008 00:21:52 -0700 (PDT) grsvarma019 wrote: But , i couldn't find how to extract the protocol(http or https ) from the current URL using apache request object. Can you please anybody help me in this? See: perldoc Apache2::RequestRec # HTTP protocol version number

Re: Problem setting POST_MAX

2008-09-17 Thread Ryan Gies
On Wed, 17 Sep 2008 10:37:07 +0200 Rolf wrote: when I try to set POST_MAX to a higher value I get Conflicting information. I've also tried to set it via read_limit() with the same result. What's wrong ? The best explanation I've found is Philip's:

Re: Problem setting POST_MAX

2008-09-17 Thread Ryan Gies
On Wed, 17 Sep 2008 12:07:24 +0200 Rolf wrote: So I have to change this in the source to get a vlaue above 64M? :-( According to the documentation you can specify the limit in the Apache configuration, i.e., APREQ2_ReadLimit 100M I have not had success setting this directive. Nor does

Re: whence $r-send_http_header ?

2008-07-16 Thread Ryan Gies
Consider this fragment: $r-content_type(image/$type); $r-send_http_header; $m-print($img); The method send_http_header seems to no longer exist. What should I be using instead? For now I just commented it out. # perl -MModPerl::MethodLookup -e print_method

[mp2] $s-protocol returns INCLUDED

2008-04-02 Thread Ryan Gies
What causes $s-protocol() to return the string INCLUDED?

Re: Virtual host with mod_perl

2008-03-28 Thread Ryan Gies
I'm curious, how would this be possible with mod_perl? The below will fail as: $r-add_config() has failed: VirtualHost not allowed here and when $r-add_config is changed to $r-server-add_config it will fail as: Can't run '$s-add_config' after server startup In /etc/hosts 127.0.0.1

Re: Virtual host with mod_perl (off-topic)

2008-03-28 Thread Ryan Gies
Ahem, sorry folks about the HTML email Ryan Gies wrote: I'm curious, how would this be possible with mod_perl? The below will fail as: $r-add_config() has failed: VirtualHost not allowed here and when $r-add_config is changed to $r-server-add_config it will fail as: Can't run '$s

Looking for a way to identify a retry-with-authorization request

2007-11-06 Thread Ryan Gies
Any chance there is a methodology with which I may identify when a browser is sending me a retry-with-authorization request? Intention: To issue a response which ultimately brings up the browser's log-in dialog. Yes, I'm trying to implement the already well-known inability to 'log-out' after

[mp2] password protect directories at runtime

2007-08-08 Thread Ryan Gies
I would like to maintain a list of password protected directories outside of the apache conf files. My thoughts are to write a PerlAccessHandler which will use $r-add_config to set the authorization requirements. Is this a sound approach? Would another phase such as PostReadRequest or

[mp2] Failed Test on t/api/server_const.t

2007-08-07 Thread Ryan Gies
1. Problem Description: 'make test' failed on t/api/server_const.t I am trying to build Apache2/mod_perl2 on a Fedora Core 6 system which already has these components installed. I am under the impression that as long as I am installing in to /usr/local/apache2, there will be no

Re: find all uninitialized variables?

2006-02-22 Thread Ryan Gies
I've been frustrated with the Use of uninitialized value warning myself, and was hoping someone could shed some light on it as well. Point being, this will issue the warning: #!/usr/bin/perl -Tw sub max { return $_[0] $_[1] ? $_[0] : $_[1]; } max(); In what seems like logic, the