Re: [mp1.27] Too much logging

2003-01-27 Thread Geoffrey Young
Goehring, Chuck Mr., RCI - San Diego wrote: I'm running Apache 1.3.26/mod_perl 1.27 (Win32). This version I built in response to one of the security alerts. New with this version, I get extremely strict error logging like this: Use of uninitialized value in substitution (s///) at e:/apache/cg

Re: Object Handlers & internal_redirect

2003-01-23 Thread Geoffrey Young
So I converted Util::Tour::Translate's handler into a regular non object handler and everythings works fine. I would rather use object handlers but this doesn't seem possible if a content handler is performing an internal_redirect which might invoke that handler. this has been reported before

Re: rfc: new filtering APIs

2003-01-17 Thread Geoffrey Young
Stas Bekman wrote: Geoffrey Young wrote: I would want at least a real-time interface for this, something similar to $filter->init(sub {shift->update_mtime($package_mtime)} ); where would you run this code? outsite of a handler() subroutine, pretty much like I showed i

Re: rfc: new filtering APIs

2003-01-17 Thread Geoffrey Young
I would want at least a real-time interface for this, something similar to $filter->init(sub {shift->update_mtime($package_mtime)} ); where would you run this code? outsite of a handler() subroutine, pretty much like I showed it - on module load. I suspect you'd have to register the init

Re: [mp2] Conflicting instructions in docs?

2003-01-17 Thread Geoffrey Young
I'm confused. Where's the quick answer to whether or not I should use threads? I'm on FreeBSD 4.7. you shouldn't need -DUSETHREADS unless you plan on using the threaded MPM you can use your normal perl with --with-mpm=prefork (at least I think so :) --Geoff

Re: rfc: new filtering APIs

2003-01-17 Thread Geoffrey Young
Stas Bekman wrote: Geoffrey Young wrote: Finally, other than add/remove filters APIs which we have talked about, what other APIs do you want for filters? is there an interface to filter_init? see the discussion on http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9673 or CHANGES

Re: OK and headers

2003-01-16 Thread Geoffrey Young
Lee Goddard wrote: Is this the right place to ask? I have a handler that picks up requests in a specific location, and usually returns the Apache constant OK. Some of these requests are images. They display fine in all browsers, but when a user right-clicks and selects SAVE AS they only have a

Re: rfc: new filtering APIs

2003-01-16 Thread Geoffrey Young
Finally, other than add/remove filters APIs which we have talked about, what other APIs do you want for filters? is there an interface to filter_init? see the discussion on http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9673 or CHANGES file for a description of why it was added. this AP

Re: reading cookies from mod_perl HTTP request handlers

2003-01-15 Thread Geoffrey Young
But, I'm not able to see that cookie when I print $ENV{'HTTP_COOKIE'} within in header_parse_handler. %ENV is setup during the fixup phase, so it hasn't been populated yet. mod_perl docs say that that you can examine request headers in the PerlHeaderParserHandler. yes, using something like

Re: The best place for mod_perl beginners to get started.

2003-01-15 Thread Geoffrey Young
Chris Shiflett wrote: --- Geoffrey Young <[EMAIL PROTECTED]> wrote: and don't forget about the cookbook http://www.modperlcookbook.org/ Speaking of that, why is it missing from http://perl.apache.org/? I guess that when the mason book came out, it replaced the cookbook im

Re: The best place for mod_perl beginners to get started.

2003-01-15 Thread Geoffrey Young
Michael Shirk wrote: To those of you on this mailing that wonder what is the best way to get started with mod_perl should check out "Writing Apache Modules with Perl and C". This book is coauthored by Lincoln Stein (creator of CGI.pm) and Doug MacEachern (creator of mod_perl). I am only half

Re: Timestamp for Apache::Upload uploads.

2003-01-14 Thread Geoffrey Young
Matthew Hodgson wrote: Hi, I could have sworn that at some point under Apache/1.3.27 and mod_perl/1.27 I had the ability to find a timestamp of some kind for uploaded files using Apache::Upload. To be precise, I thought that: $upload = $apr->upload; $filehandle = $upload->fh; $timestamp = (st

Re: Inserting a handler in "stack of handlers".

2003-01-13 Thread Geoffrey Young
Ruslan U. Zakirov wrote: Hello All! Short synopsis: How to push handler just after handler that working now? More about the problem. I've got main handler, that forms stack of handlers from query string by calling push_handlers(). Then each module doing his job. Some handlers needs to

Re: OSCON ideas

2003-01-09 Thread Geoffrey Young
but where do you get a corporate experienced, clean-cut (75%, at least) person willing to put on the tie 5 days a week and do mod_perl? I suspect that there are actually quite a few people on this list that would _love_ to do mod_perl full time. after talking to a few employers over the past

Re: [modperl 1.27] Problem regarding Perl*Handler and the HTTPrequestline

2002-12-24 Thread Geoffrey Young
I was wondering if it is possible to write a handler to handle a 'new http method', because I could not find any hint in the user guide. :) if my 'new http method' you mean something other that GET, POST, PUT, etc then no, you cannot (in Apache 1.3, at least). just about the only thing you cann

Re: Double execution of PerlRequire statement

2002-12-18 Thread Geoffrey Young
Kyle Oppenheim wrote: This behavior is documented in the guide... http://perl.apache.org/docs/1.0/guide/config.html#Apache_Restarts_Twice_On_S tart it may not be that simpple - what Andreas is likely seeing is likely a real bug that's been around for a while: http://marc.theaimsgroup.com/?t

Re: pass-thru/redirect/DECLINE to *.jpg

2002-12-18 Thread Geoffrey Young
my $fh=$pic->open; #returns the filehandle $r->send_fd($fh); close($fh); return OK; I used send_fd because it seemed from the documentation that it is a easier/better(?) method than rewriting the URI and setting default-handler. Is that not so? if you were to use default-handl

Re: [mp2] Having to reload apache when perl modules change

2002-12-17 Thread Geoffrey Young
Richard Curtis wrote: Hi again group. A quick question (but this might not be the right place). If this is the wrong place to ask, please point me in the direction of the right place. you're in the right place, don't worry :) I have a web app written using mod_perl2 and apache::ASP. When

Re: Access to ap_send_fd_length in 1.0

2002-12-16 Thread Geoffrey Young
Tom Murphy wrote: I have a client for whom I manage documents, some of which are in pdf format. The documents are not in the web tree, and are served based on custom access etc., and some are encrypted on the files system. I am successfully do all this, and ultimately use send_fd to send the f

Cookie-free authentication

2002-12-12 Thread Geoffrey Young
Ron Savage wrote: On Wed, 11 Dec 2002 13:58:18 -0700, Nathan Torkington wrote: [snip] Some of us are trying to implement authentication/login/logout where, if at all possible, cookies are not to be used. A cookie-free discussion would be most welcome. I've done a bit of preliminary work

Re: Perl Cookbook modperl chapter

2002-12-11 Thread Geoffrey Young
Paul Lindner wrote: Hi, I only speak for myself, but I am happy to see mod_perl covered in the Perl Cookbook. Why you ask? I see the inclusion of mod_perl helping increase the size of the mod_perl "pie". A rising tide lifts all boats. I totally agree - at this stage in the game, the more

Re: segfault after HTTP_MOVED_* and set_handlers()

2002-12-06 Thread Geoffrey Young
Stefano wrote: Hello, This is a question about the correct use of set_handlers request method. I have some handlers stacked by the first one content handler; one of them processing the request needs to redirect and then close the HTTP response with a HTTP_MOVED_PERMANENTLY; so I thought that

Re: apache2 + mod_perl2 + dbd::oracle

2002-12-06 Thread Geoffrey Young
$ENV{'ORACLE_HOME'} is set correctly right before the connection attempt (it missing would result in an additional warning in the trace). that's not necessarily true. Also, the same script run from bash does successfully connect (same users, all envs set in script). I did an additional in

Re: [mp2] Documentation/LogHandler question

2002-12-05 Thread Geoffrey Young
Hsiao, Chang-Ping wrote: p.s. Geoff, we need a short acronym for your book so it's easy to refer to it, (a new eagle), I've called it R&W (Red&White), if you have a better idea, please suggest. Right, an animal is much easier to remember. Wish it had one on its cover like books from O'rei

Re: throttling

2002-12-04 Thread Geoffrey Young
Paolo Campanella wrote: Hi all I had a look at mod_throttle, but it doesn't seem to be able to do what I want. I would like to limit accesses by remote IP address, _per-URL_ (mod_throttle seems to only be able to do this in the server scope, not per-location/per-directory/per-virtualhost). Can

Re: Resetting cache Apache::Registry

2002-12-03 Thread Geoffrey Young
The situation is that I?m using a shared server from a 3rd party hosting provider and I do not have control over what they have in their Apache configuration file. Every time I make a change to a helper file I need them to restart Apache. on the Cobalt and Ensim systems I have websites at, I

Re: modperl file cache screwed up

2002-11-27 Thread Geoffrey Young
Bauer, Peter wrote: Hi, on my installation of Apache (1.3.27 + last Modperl) I have the problem that on two diffrent virtual servers, there are perl CGIs with the same name but entirely diffrent funcions. I have the effect that sometimes when asking to execute the CGI of server1, the CGI of s

Re: Getting at server's MaxClients setting?

2002-11-27 Thread Geoffrey Young
Bas A.Schulte wrote: Geoff, On Wednesday, November 27, 2002, at 03:07 PM, Geoffrey Young wrote: in this case, MaxClients looks like it calls ap_daemons_limit to make the setting, so you may be able to create a subclass that offers up that API to perl-land. for more information on how, you

Re: Getting at server's MaxClients setting?

2002-11-27 Thread Geoffrey Young
Bas A.Schulte wrote: Hi, is it possible to get at the configured MaxClients setting from within my handler? I checked Apache::Server which gives you some configuration information but there's no accessor for MaxClients. Any other, easy, way? see my previous post from earlier this week :)

Re: IPC::Open2, mod_perl and cvsweb

2002-11-25 Thread Geoffrey Young
Look in archives. I think many people had problems with IPC::Open2 under mod_perl. So far the best solution I know is just replacing it with IPC::Run. Seconded. Go with IPC::Run and you won't regret, since it works under mod_perl and gives you much more than the IPC::Open* family. IPC::Run+

Re: libapreq-1.1 Release Candidate 1

2002-11-25 Thread Geoffrey Young
a try and report comments/problems/etc. to the apreq-dev list at [EMAIL PROTECTED] I have a comment :) I've been building nightly from CVS for almost a year now, but when you added the Apache::test stuff I had to stop doing it - the prompt for the Apache path when building the makefile make

Re: mp2: Pb using HTML::Entities

2002-11-25 Thread Geoffrey Young
gilles wrote: I write in my handler something like : use HTML::Entities; ... $r->content_type('text/html;charset=iso-8859-1') my $txt="Long life to the ¤"; &decode_entities($txt) I think you want encode_entities() here :) HTH --Geoff

Re: Accessing configuration information

2002-11-21 Thread Geoffrey Young
Grant McLean wrote: From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Hi All I know I can use $r->dir_config() to access parameter values set in the config file with PerlSetVar, but is it possible to access the value of generic Apache configuration directives? This is described in the [Eag

Re: What triggers the User Handler?

2002-11-18 Thread Geoffrey Young
Richard Clarke wrote: Marc, If the webpage has images then a request will be made for each of these images as well. Depending on your configuration this could account for it being run several times. not to mention subrequests, such as a request for foo.com/bar that gets translated into fo

Re: configuration table permanent storage?

2002-11-18 Thread Geoffrey Young
Marc Murphy wrote: Once you use a configuration directive to store some values in a module's configuration table, is there any way to change them after that? When there is a request I grab the values I initally stored in the configuration table (which I believe are stored only once when httpd

Re: odd headers with Apache::add_version_component()

2002-11-14 Thread Geoffrey Young
Even if I can get this to work through certain config tweaks, I will not add this to Apache::ASP as I would need this to be correct for all user configs, not just mine. I do not want to preempt the Apache/... header! Thanks for the follow up. Maybe I'll revist this in MP2. sure. it's reall

Re: redirecting outside the Content handler

2002-11-14 Thread Geoffrey Young
Each of these: $r->set_handlers(PerlHandler => 'My::Package'); $r->set_handlers(PerlHandler => 'My::Package::handler'); $r->set_handlers(PerlHandler => \&My::Package); $r->set_handlers(PerlHandler => \&My::Package::handler); give me: [error] Can't set_handler with that value Any ideas? yeah

Re: odd headers with Apache::add_version_component()

2002-11-14 Thread Geoffrey Young
Josh Chamas wrote: Hey, I'm looking to get Apache::ASP to insert itself into the module Server tokens with the add_version_component() API, so I call it like this: package Apache::ASP ... &Apache::add_version_component("Apache::ASP/$VERSION"); ... 1; but then it becomes the first hea

Re: redirecting outside the Content handler

2002-11-14 Thread Geoffrey Young
Narins, Josh wrote: I think I know this one. #you might want to do this line, for edification if nothing else my $list_ref = $r->get_handlers("PerlHandler"); $r->set_handlers('PerlHandler",\&My::Package::handler); sorry, I misread when I replied with internal_redirect_handler. set_handlers(

Re: redirecting outside the Content handler

2002-11-14 Thread Geoffrey Young
Brett Sanger wrote: I have a few AccessHandlers that I'd like to redirect the user to the correct page to get access if they don't have it. I tried ErrorDocuments, but I have multiple layers of authentication, and ErrorDocuments won't cascade. So I'm looking at switching the ContentHandler. i

Re: Server Parsed .shtml files...

2002-11-14 Thread Geoffrey Young
simran wrote: Hi All, I have a auth protected area for the apache server: Aka, the location /auth is password protected by Perl*Handlers and usually i only write other PerlHandlers that do things under that location. However, i need to put a .shtml file into that diretory (it is also a norm

Re: [mp-1 ?] Apache::Util::escape_html could handle single quotation

2002-11-13 Thread Geoffrey Young
Marcin Kasperski wrote: namely "i had a bad feeling about this. we should not be implementing escape_html to begin with, the functionality should all be in apache." (...) The main point in this case: someone decided to escape " (double quote) in escape_html. For HTML, ' (single quote) is pra

Re: syntax and sanity check?

2002-11-13 Thread Geoffrey Young
Paul wrote: I'm doing a 45 minute seminar at UAB tomorrow on mod_perl, and would be very grateful if anyone would point out holes in this code before I try to show it to a roomful of attendees: #~~~

Re: [mp-1 ?] Apache::Util::escape_html could handle single quotation

2002-11-11 Thread Geoffrey Young
Two patches, one for t/net/util.pl and one for src/modules/perl/Util.xs. Apply them from the root of the untarred source. cool, thanks. you know, the test compares the results of Apache::Util::escape_html() to HTML::Entities::encode, both of which do not translate ' into &apos by default.

Re: [mp-1 ?] Apache::Util::escape_html could handle single quotation

2002-11-11 Thread Geoffrey Young
(oh, maybe someone could consider also adding some test case to t/net/perl/util.pl but it does not seem to be very important) tests are always important :) I'm think that, with mod_perl 2.0, mod_perl 1.x might not be high on maintainer's list of stuff to do sorry, but I haven't been follow

Re: OO handlers

2002-11-07 Thread Geoffrey Young
Michael Schout wrote: Geoffrey Young wrote: interesting. the last time I tried was with bleedperl before 5.8 was released - I know it worked then because I was writing a patch for mod_perl core based on it. this thread has most of the dialogue: Hrm. Well, not sure how the :method

Re: OO handlers

2002-11-06 Thread Geoffrey Young
Michael Schout wrote: Geoffrey Young wrote: keep in mind that neither book mentions the use of subroutine attributes, which is allowed in 1.3 but the only way in 2.0 sub handler : method { ... } I am 99% sure that Attribute handlers wont work in 1.3 because Attribute::Handlers use

Re: OO handlers

2002-11-06 Thread Geoffrey Young
Richard Clarke wrote: List, Tired of having 10 modules all with near identical handler methods I decided to put the handler method into a superclass and be done with maintaining the same code 10 times. I first tried this a couple of weeks ago and it failed to work, because at the time I coul

[ANNOUNCE] mod_perl Developer's Cookbook now on Safari

2002-11-06 Thread Geoffrey Young
hi all... we have received a few requests for an electronic version of the mod_perl Developer's Cookbook over the past few months, which we have thus far been unable to satisfy. yesterday I noticed that it has finally shown up on Safari: http://safari.informit.com/0672322404 so, for thos

Re: Apache::ChildExit released

2002-11-05 Thread Geoffrey Young
Jim Schueler wrote: A couple of months ago I posted my realization that I was experiencing many problems with Apache::Registry due to its treatment of module END blocks. No one responded with a workaround, so I have released my own. The module Apache::ChildExit is now available on CPAN: int

Re: [OTish] Version Control?

2002-11-01 Thread Geoffrey Young
Oh, & CVS is free which is always a good thing. :) subversion (http://subversion.tigris.org/) has been gaining lots of momentum lately, and I just saw this link today: http://svnbook.red-bean.com/ some of you might know the folks at red-bean from their other projects, like http://cvsbook.r

[ANNOUNCE] Apache-Clean-2.00b

2002-11-01 Thread Geoffrey Young
The URL http://www.modperlcookbook.org/~geoff/modules/experimental/Apache-Clean-2.00b.tar.gz has entered CPAN as file: $CPAN/authors/id/G/GE/GEOFF/Apache-Clean-2.00b.tar.gz size: 4725 bytes md5: a25497718555ef6567bdd38685a6b940 it's still incomplete, but it should be educational at lea

Re: Should I be coding with mod_perl 2 yet?

2002-11-01 Thread Geoffrey Young
Clinton Gormley wrote: I'm struggling to get anything much working with mod_perl 2. I have installed mod_perl 1.99_07 with Apache 2.0.43. I have read all of the documentation on perl.apache.org. I can get a basic page returned to me with a modperl handler, but as soon as I try to do anything o

Re: FW: mod_perl / PerlAuthenHandler question

2002-10-29 Thread Geoffrey Young
Mitchel, Jennifer (Jem) wrote: the line shift->send_http_header('text/plain'); is giving me the error: Can't call method "send_http_header" on an undefined value it's not a normal cgi script - you need to run it from a /perl-bin or other where you already have an Apache::Registry setup.

Re: FW: mod_perl / PerlAuthenHandler question

2002-10-29 Thread Geoffrey Young
Mitchel, Jennifer (Jem) wrote: > The machine does belong to my org & my login does not have root access. I will do the > /perl-status?hooks as soon as I can be let onto the machine with root access. > > I did print out the global hash %Apache::MyConfig::Setup and here is the result > > Apache_Sr

Re: FW: mod_perl / PerlAuthenHandler question

2002-10-29 Thread Geoffrey Young
Mitchel, Jennifer (Jem) wrote: > Steve, > > I have no objection to replying to the mod_perl list. I have no idea what is wrong & I > am so new at all of this that the more people who might have an idea the better. > > > I am running Apache 1.3.22 and mod_perl 1.21 on a Sun Solaris 2.6 machine.

Re: Communication between handlers

2002-10-29 Thread Geoffrey Young
Ruslan U. Zakirov wrote: Hi! Please point me to good documentation about subj. Is it possible to initialize some class(MyProjConfig for example) with some params in first content handler, and then send it trought other handlers, all it within only one request? see $r->pnotes() in man Apache an

Re: Problems with mod_perl. Location of C code.

2002-10-28 Thread Geoffrey Young
Anders Lidén wrote: I have some troubles with mod_perl (loosing indata), but the problems are so obscure that it seems to me as I am the only (or one of very very few) who are encountering these problems. Anyway, what I need to continue finding this problem and eliminating it is: Where is th

Re: conditional get

2002-10-28 Thread Geoffrey Young
The doc on issuing correct http headers has returns with values all over it: http://perl.apache.org/docs/general/correct_headers/correct_headers.html the examples in that document assume that you're using mod_perl handlers, not Apache::Registry, though I admit that's not obvious unless you

Re: conditional get

2002-10-28 Thread Geoffrey Young
[snip] Also, I hate to whine, but despite the docs saying so, whatever value my script returns is completely ignored; I have to use $R->status (). I'm using Apache::Registry, in case that makes any difference. Apache::Registry ignores the actual return code from your script, using instead the

Re: conditional get

2002-10-26 Thread Geoffrey Young
Kyle Oppenheim wrote: I assume you are running this script under Apache::Registry (since your URLs have .pl extensions). Apache::Registry compiles your code into a subroutine and runs it using this code: my $old_status = $r->status; my $cv = \&{"$package\::handler"}; eval { &{$cv}(

Re: Enabling debugging in mod_perl

2002-10-24 Thread Geoffrey Young
Anders Lidén wrote: It seems like I have missed something when I try to enable debugging mode in mod_perl. I started with setting the PERL_TRACE variable to 1 and recompiling (and setting PerlSetEnv MOD_PERL_TRACE all in httpd.conf) - nothing happens. So I recompiled with PERL_DEBUG also set

Re: $r->requires

2002-10-18 Thread Geoffrey Young
[snip] Despite not having a location tag anywhere, nor a require valid-user directive, the above code is able to accomplish my objective: loading an AccessHandler on the fly from the TransHandler for specific urls on my site. Although, I must admit that I'm not sure why it is working. _check

Re: basic www auth

2002-10-16 Thread Geoffrey Young
Cristóvão Dalla Costa wrote: > Hi > > I'd like to do basic www authentication on my scripts. Apache::Auth::DBI > isn't good since it would waste a database connection, and just add > unnecessary complication. I'd like to do something like: > > if (! check ($username, $password)) { > send

Re: $r->current_callback() returns wrong handler after subrequest

2002-10-16 Thread Geoffrey Young
[EMAIL PROTECTED] wrote: > Hello, > $r->current_callback() is returning 'PerlLogHandler', when called from a > CleanupHandler after a subrequest was handled. > > It returns 'PerlHandler' correctly when called from the 'content-handler'. > > I am using Apache/1.3.23 (Unix) mod_perl/1.26 w

Re: $r->requires

2002-10-16 Thread Geoffrey Young
Rodney Hampton wrote: > Does anyone have an example of how to use $r->requires? see recipe 13.6 in the cookbook, the code for which can be found here: http://www.modperlcookbook.org/code/ch13/Cookbook/AuthzRole.pm > I cannot find Apache::AuthzAge for an example of its use. > I'm trying to han

Apache::Clean mod_perl 2.0 port

2002-10-14 Thread Geoffrey Young
hi all... I had a few moments so I've started to port Apache::Clean over to mod_perl 2.0. it's far from complete, and I haven't examined all the issues with proper caching headers yet, but you can find the work in progress here: http://www.modperlcookbook.org/~geoff/modules/experimental/A

Re: How would you organize custom logging?

2002-10-10 Thread Geoffrey Young
Marcin Kasperski wrote: > I am to provide some custom logging in my mod_perl > application. Omitting some unnecessary details, I need to store some > information after processing each request, putting this info into some > central log (be it file or database) common for all apache processes > an

Re: Copying Apache/Mod_perl/perl installation

2002-10-08 Thread Geoffrey Young
Ganesan M wrote: > Hi all, > > This is kinda installation question. I have installed perl, Apache, > Mod_perl with > some modules (GD, Apache FileManager, DBD-Chart etc.,) in my development > machine. > Is there anyway to copy the installation to a similar OS/architecture > without going thr

Re: closing connection to client not working !

2002-10-07 Thread Geoffrey Young
[EMAIL PROTECTED] wrote: > Hello, > > I have noticed a interesting thing. I am trying to close my connection to > client but I am getting weird error. don't do that. > > $r->internal_redirect("file"); > shutdown($r->connection->fileno, 1) || die "$!"; you should always return OK after call

Re: PerlHandler & Inheritance

2002-10-04 Thread Geoffrey Young
Tom Servo wrote: > This is probably a pointless question, but I'm mostly just curious if > there is any way to get this to work. > > I've got two modules, Parent.pm and Child.pm. Parent.pm has a sub > handler in it, and Child.pm has Parent in @ISA. I can run a little > driver script over th

Re: Dynamlcally loading modules at run-time

2002-10-03 Thread Geoffrey Young
Jochen Lillich wrote: > Hi, > > I'm writing my first mod_perl handler. I'd like to make the handler some > kind of dispatcher that dynamically loads certain modules depending on > the URI called: > > /foo/index => require foo; $result = foo::index(); > /foo/other => require foo; $result = foo:

Re: Easy internal redirect question

2002-10-03 Thread Geoffrey Young
[EMAIL PROTECTED] wrote: > I've got a bit of a better grasp on the problem nowI think it's an > interaction with POST data... > > I have a form in foo.html > > > > ...other form fields... > > > I submit this form, and in /rms/admin, it gets handled like this > > # suck in for

Re: Defaulting to default-handler from custom handler

2002-10-03 Thread Geoffrey Young
> > All four cases result in the Perl code being displayed instead of the > script being executed? If a location is defined as a ScriptAlias, then > is the default-handler == perl-script? and would returning DECLINED > result in mod_cgi handling the request? What am I doing wrong? perl-scrip

Re: cookies and IE

2002-10-02 Thread Geoffrey Young
> But when it's set to "3d" the cookie is set as: > Set-Cookie=name=value; path=/path; expires=3d > > Which makes sense, but it's a very subtle thing IMHO, and to me "1d" > means "expire in one day", the same as "+1d". > > Anything think that this deserves a bug report, or chalk it up to stupi

Re: Easy internal redirect question

2002-10-02 Thread Geoffrey Young
[EMAIL PROTECTED] wrote: > I call a page, /my/script1?task=foo which does some things and then needs to > redirect to /my/script2?task=bar. However, putting > > $r->internal_redirect('/my/script2?task=bar'); > > doesn't seem to work as script2 is seeing task=foo rather than task=bar. > Looks

Re: Daft question - preventing the username password box from appearing.

2002-10-01 Thread Geoffrey Young
Martin Moss wrote: > All, > > How do I change the behaviour of get_basic_auth_passwd() > > I do not wish to have the prompt box appear, I want to have a dynamically > produced login form which when submitted carries out the users previous > command (I have an authentication system which 'times

Re: $r->content

2002-09-25 Thread Geoffrey Young
Rodney Broom wrote: > MC> > Presently I get all the incoming parameters via > Apache::Request and MC> > append to the URL before redirecting but > this is not ideal as I?d like MC> > to spit the modified parameters > out in a POST. Can anyone give me any MC> > advice? > > GY> see GY> > ht

Re: $r->content

2002-09-25 Thread Geoffrey Young
> Presently I get all the incoming parameters via Apache::Request and > append to the URL before redirecting but this is not ideal as I?d like > to spit the modified parameters out in a POST. Can anyone give me any > advice? see http://perl.apache.org/docs/1.0/guide/snippets.html#Redirecting

Re: OT: Re: Hoping you could give advice

2002-09-21 Thread Geoffrey Young
Gunther Birznieks wrote: > > > Todd Cranston-Cuebas wrote: > >> Any other thoughts? >> >> > Yeah, this is off topic, please label it as such. :) well, it's essentially a job offer (if you're one that meets the requirements), not really OT :) of course, I forgot to tell todd to use [Job]

Re: When is Apache->server->log_error available?

2002-09-19 Thread Geoffrey Young
Ken Miller wrote: > I'd like to write some status messages to the error_log during server > startup. So, I tried > > Apache->server->log_error( "..." ) > > but it doesn't work. This works fine in the child processes. Is the log > file not ready to write to during server startup? Printin

Re: help with a simple redirect

2002-09-18 Thread Geoffrey Young
iudicium ferat wrote: > On 9/18/02 2:06 PM, "Robert Landrum" <[EMAIL PROTECTED]> wrote: > > >>$r->header_out("Location" => "http://domain.com/test.html";); > > > This would work: > > $r->header_out("Location" => "/test.html\n\n"); of course, this is common. but technically Location is onl

Re: problem with $r->push_handlers()

2002-09-17 Thread Geoffrey Young
Martin Moss wrote: > All, > > can anybody provide any help with this problem - and maybe explain why > I get the following anomoly? [snip] > mod_perl_push_handlers: Not a subroutine name or CODE reference! at > /usr/local/lib/perl//MyMod/Apache/Multiplex.pm line 101. I really can't fol

Re: newbie: file uploads not working :(

2002-09-13 Thread Geoffrey Young
>>my ($name) = $upload->filename =~ m!([^/\\]*$)!; > > > use File::Basename; > my $name = basename($upload->filename); much better :) --Geoff

Re: newbie: file uploads not working :(

2002-09-12 Thread Geoffrey Young
> Note: If you ever use them in file posts, don't forget to clean the file > names, especially when it comes from Windows machine... > I've found this to be reasonably portable for getting just the filename (sans path) - YMMV my ($name) = $upload->filename =~ m!([^/\\]*$)!; --Geoff

Re: newbie: file uploads not working :(

2002-09-12 Thread Geoffrey Young
[snip] > > # This is a copy of the form code from the snippets page > sub form { >use Apache::Request; >my $r = Apache->request(); >my $apr = Apache::Request->new($r, DISABLE_UPLOADS => 1); I think DISABLE_UPLOADS should be 0, not 1. I can't find any other obvious errors in what

Re: $r->prev is always defined

2002-09-09 Thread Geoffrey Young
Jindo wrote: > Hello, > > Unfortunately, I did suspect the same before and called Index.cgi > directly. By calling it directly, $r->log_error($r->prev()->uri()) > still perfectly printed one line in error_log. you must be doing something with internal redirects _someplace_. I'm running CVS

Re: $r->prev is always defined

2002-09-09 Thread Geoffrey Young
Jindo wrote: > Hello, > > According to docs, $r->prev returns undef unless there is an internal > redirect. But to > my surprises, $r->prev is always defined, severely breaking down the > code/flow logic > of my scripts. > > Here is what I have in /Index.cgi (My browser defaults to that pag

mod_perl statistics on securityspace.com

2002-09-06 Thread Geoffrey Young
hi all... just FYI... mod_perl use seems to be dramatically on the rise again. here'are the statistics for August from security space: perl august: %36.83 july: %30.79 change: %19.64 PHP august: %38.59 july: %40.03 change: %-3.62 https://secure1.securityspace.com/s_survey/data/man.200

Re: [ANNOUNCE] Apache::AuthDigest 0.01

2002-09-06 Thread Geoffrey Young
CPAN shortly. Geoffrey Young wrote: > The URL > > > http://www.modperlcookbook.org/~gyoung/modules/Apache-AuthDigest-0.01.tar.gz > > > has entered CPAN as > > file: $CPAN/authors/id/G/GE/GEOFF/Apache-AuthDigest-0.01.tar.gz > size: 10195 bytes >md5:

[ANNOUNCE] Apache::AuthDigest 0.01

2002-09-06 Thread Geoffrey Young
The URL http://www.modperlcookbook.org/~gyoung/modules/Apache-AuthDigest-0.01.tar.gz has entered CPAN as file: $CPAN/authors/id/G/GE/GEOFF/Apache-AuthDigest-0.01.tar.gz size: 10195 bytes md5: 305f6bfdbdcbd267760bbed9bdc130c7 from the README: This is a suite of applications for u

[RFC] Apache::AuthDigest

2002-09-05 Thread Geoffrey Young
a few months ago I posted an RFC for a Digest authentication module. http://marc.theaimsgroup.com/?l=apache-modperl&m=102217847409606&w=2 I've done a bit of work on it based on feedback and my own tinkering, but it's still not completely complete. since then, a few people have asked about it,

Re: $r->print does not dereference

2002-09-03 Thread Geoffrey Young
> > I forgot to mention the dereference does not work in > Apache::Filter context, while it works in regular situations. Apache::Filter does not support the auto-deferencing (and deprecated in 2.0) feature of $r->print. I sent a patch to Ken but, IIRC, he decided not to implement it. --Geof

Re: $r->push_handlers('PerlAuthenHandler', 'Some::handler') doesn'twork

2002-09-03 Thread Geoffrey Young
Rodney Broom wrote: > From: Per Einar Ellefsen <[EMAIL PROTECTED]> > >>dir_config is the Perl{Set,Add}Var configuration... > > > Yep, you're right. But I'm sort of grasping at straws at this point. > > > >>You can just add that and let your handler decide regardless of the value >>of requ

Re: $r->push_handlers('PerlAuthenHandler', 'Some::handler') doesn'twork

2002-09-01 Thread Geoffrey Young
Rodney Broom wrote: > Hi all, > > I'm sure I'm just missing something, but I'm stumped. > > I've got an access handler that does some tests and then conditionaly does this: > > $r->push_handlers('PerlAuthenHandler', 'Some::handler'); > return OK; > > Some::handler() starts by printing th

Re: How to limit the size of requests ?

2002-08-30 Thread Geoffrey Young
>>my the time mod_perl enters the request, Apache has already taken care >>of parsing the request, so there's not much you can do about it (in >>1.3, at least). > > > Parsing the request *headers*. So you can't prevent any overflow in the > headers with mod_perl. well, headers and the reque

Re: How to limit the size of requests ?

2002-08-30 Thread Geoffrey Young
> I have written a perl script which prevents browsers (or evil exploits) to > send buffer owerflows to apache. Basicaly this script is supposed to listen > on port 80 for incoming connections. The input (from browsers) is read up to > 500 characters. don't the apache directives: LimitReq

Re: mod_perl2 & DBD::Oracle problem

2002-08-22 Thread Geoffrey Young
Atsushi Fujita wrote: > Hi all, > > Few weeks ago, I posted a problem about DBD::Oracle as following. [snip] > > > # add by atsushi 2002/08/22 > $ENV{'ORACLE_HOME'} = '/u01/app/oracle/product/9.0.1'; > $ENV{'ORACLE_SID'} = 'ynt0'; > $ENV{'NLS_LANG'}= 'japanese_japan.ja16euc'; > > 1

Re: $r->path_info() getting confused

2002-08-21 Thread Geoffrey Young
Fran Fabrizio wrote: > > In my conf file, I have the following directives: > > >AuthType Apache::AuthCookieRMSDBI >AuthName RMS >PerlAuthenHandler Apache::AuthCookieRMSDBI->authenticate >PerlAuthzHandler Apache::AuthCookieRMSDBI->authorize >require valid-user > > > >

Re: Module dependency testing question

2002-08-20 Thread Geoffrey Young
Matthew Pressly wrote: > If module A depends on module B (uses methods or subroutines from module > B), is there a good way to test that module A loads module B (i.e. has a > "use" statement)? I frequently run into the following scenario: > > 1. Write one or more new modules plus a handler

<    1   2   3   4   5   6   7   8   9   10   >