Re: Zip on the fly problem

2010-01-13 Thread André Warnier
Thanks guys for this informative thread. I use Archive::Zip extensively, including in mod_perl context. I have not encountered this problem yet, but will now make sure to keep an eye open for it when I upgrade my systems. Thomas den Braber wrote: Yes I am sure that second argument is false. I

Re: Zip on the fly problem

2010-01-12 Thread Thomas den Braber
g Date: Tue, 12 Jan 2010 23:06:49 -0500 Subject: Re: Zip on the fly problem > On Tue, Jan 12, 2010 at 10:11:04PM -0500, Scott Gifford wrote: > > On Tue, Jan 12, 2010 at 7:49 AM, Thomas den Braber > wrote: > > [ ... ] > > > > > The error is: 'IO erro

Re: Zip on the fly problem

2010-01-12 Thread Ronald J Kimball
On Tue, Jan 12, 2010 at 10:11:04PM -0500, Scott Gifford wrote: > On Tue, Jan 12, 2010 at 7:49 AM, Thomas den Braber wrote: > [ ... ] > > > The error is: 'IO error: seeking to rewrite local header : Invalid > > argument' > > > > That error means that after writing something to the ZIP archive, it

Re: Zip on the fly problem

2010-01-12 Thread Scott Gifford
On Tue, Jan 12, 2010 at 7:49 AM, Thomas den Braber wrote: [ ... ] > The error is: 'IO error: seeking to rewrite local header : Invalid > argument' > That error means that after writing something to the ZIP archive, it tried to go backwards to put what it just wrote in the header, but found it co

Re: Zip on the fly problem

2010-01-12 Thread David Nicol
Not satisfied with the size of your file?

Re: Zip on the fly problem

2010-01-12 Thread Torsten Förtsch
On Tuesday 12 January 2010 13:49:34 Thomas den Braber wrote: > I use Archive::Zip to generate zip files on the fly in Modperl 2.04 with > code similar like this: > > my $zip = Archive::Zip->new(); > my $member = $zip->addFile( '/home/testimg/test1.jpg', &

Zip on the fly problem

2010-01-12 Thread Thomas den Braber
Hi, I use Archive::Zip to generate zip files on the fly in Modperl 2.04 with code similar like this: my $zip = Archive::Zip->new(); my $member = $zip->addFile( '/home/testimg/test1.jpg', 'testfile1.jpg' ); if ($member){ $member->desiredCompressionLevel( 1 ); } $m

Re: Configuring virtual hosts on the fly

2009-10-14 Thread Scott Gifford
Scott Gifford writes: [...] > I see some hooks in PerlTransHandler and PerlMapToStorageHandler that > seem like they can almost do what I want, but I don't see how to set > other virtual host parameters, like ServerAdmin, UseCanonicalName, > etc. I was able to get something I like working in Pe

Re: Configuring virtual hosts on the fly

2009-10-13 Thread Scott Gifford
Joel Richard writes: > I thought I'd weigh in on two items of note > > On Oct 13, 2009, at 12:17 PM, Scott Gifford wrote: > >> When I have done this in the past, I have done it with generating >> configuration files, so of course one misplaced newline or >> angle-bracket will kill the server.

Re: Configuring virtual hosts on the fly

2009-10-13 Thread Michael Peters
On 10/13/2009 12:17 PM, Scott Gifford wrote: I have had mixed experiences in the past with automatically restarting Apache after a configuration change. It is very easy to end up with something unexpected in the configuration, which causes the configuration to fail, which causes apache to stop.

Re: Configuring virtual hosts on the fly

2009-10-13 Thread Joel Richard
I thought I'd weigh in on two items of note On Oct 13, 2009, at 12:17 PM, Scott Gifford wrote: When I have done this in the past, I have done it with generating configuration files, so of course one misplaced newline or angle-bracket will kill the server. Maybe generating the configuration

Re: Configuring virtual hosts on the fly

2009-10-13 Thread Scott Gifford
"Ryan Yagatich" writes: > What about mod_vhost_alias? ( > http://httpd.apache.org/docs/2.0/mod/mod_vhost_alias.html ) > > > Summary > > This module creates dynamically configured virtual hosts, by allowing the IP > address and/or the Host: header of the HTTP request to be used as part of > the p

Re: Configuring virtual hosts on the fly

2009-10-13 Thread Scott Gifford
Michael Peters writes: > Looking at this from a different perspective, have you tried writing a > monitoring program that looks for updates to the database and then > would restart the appropriate apache servers on the various > machines. It would do them one at a time (taking them out of rotatio

Re: Configuring virtual hosts on the fly

2009-10-13 Thread Michael Peters
Looking at this from a different perspective, have you tried writing a monitoring program that looks for updates to the database and then would restart the appropriate apache servers on the various machines. It would do them one at a time (taking them out of rotation from your load balancer). I

RE: Configuring virtual hosts on the fly

2009-10-13 Thread Ryan Yagatich
on the fly Thanks William, comments inline... William T writes: > On Sun, Oct 11, 2009 at 11:54 AM, Scott Gifford > wrote: >> Hello, >> >> I'm working on an Apache configuration for a cluster of machines >> serving a variety of virtual hosts. > > I woul

Re: Configuring virtual hosts on the fly

2009-10-13 Thread William T
On Tue, Oct 13, 2009 at 8:08 AM, Scott Gifford wrote: >> Sounds like you might be pushing the envelope on what Apache can >> actually do.  If you cannot solve the problem in Apache you could >> consider relying on Apache default vhost as a way to funnel all >> requests into a Perl "dynamic vhost"

Re: Configuring virtual hosts on the fly

2009-10-13 Thread Scott Gifford
Thanks William, comments inline... William T writes: > On Sun, Oct 11, 2009 at 11:54 AM, Scott Gifford > wrote: >> Hello, >> >> I'm working on an Apache configuration for a cluster of machines >> serving a variety of virtual hosts. > > I would not try to unify disparate configs into one unless

Re: Configuring virtual hosts on the fly

2009-10-13 Thread William T
On Sun, Oct 11, 2009 at 11:54 AM, Scott Gifford wrote: > Hello, > > I'm working on an Apache configuration for a cluster of machines > serving a variety of virtual hosts. I would not try to unify disparate configs into one unless each server is actually going to service all the virtual hosts your

Re: Configuring virtual hosts on the fly

2009-10-12 Thread Adam Prime
e table. > I would like my Apache to set up the virtual hosts on the fly based on > information in the tables. > > I have seen examples for generating the virtual hosts configuration > from a database when Apache starts. That leaves me with the problem > of how the unprivilege

Re: Configuring virtual hosts on the fly

2009-10-12 Thread Torsten Foertsch
or what not to do. > > I have never tried this myself, but the mod_perl 2.x documentation > contains some hints that leads to believe that it should be possible. Some things could work this way, others definitely will not. For example you cannot create an IP based vhost on demand. You can

Re: Configuring virtual hosts on the fly

2009-10-11 Thread André Warnier
o set up the virtual hosts on the fly based on information in the tables. Sounds intersting. I have seen examples for generating the virtual hosts configuration from a database when Apache starts. That leaves me with the problem of how the unprivileged Web application doing the provisionin

Configuring virtual hosts on the fly

2009-10-11 Thread Scott Gifford
ts on the fly based on information in the tables. I have seen examples for generating the virtual hosts configuration from a database when Apache starts. That leaves me with the problem of how the unprivileged Web application doing the provisioning can reliably trigger a reload across an entire cl

Re: modifying request on the fly

2006-01-27 Thread Frank Wiles
On Thu, 26 Jan 2006 12:08:12 -0500 [EMAIL PROTECTED] wrote > I need to add a unique variable to every GET request processed by the > application without issuing a redirect. Is there a way to cleanly > accomplish it in MP2? > > The following is the illustration: > > Request that looks like

modifying request on the fly

2006-01-27 Thread alex-lists-modperl
Hi, I need to add a unique variable to every GET request processed by the application without issuing a redirect. Is there a way to cleanly accomplish it in MP2? The following is the illustration: Request that looks like /app?m=someparams received by the browser should become /app?m=someparams&

Re: Activating/decativating PerlOutputFilterHandler "on-the-fly"

2005-05-02 Thread Stas Bekman
Jeff Ambrosino wrote: From within an existing Perl handler/filter, you can dynamically insert ('register') a new filter with the add_output_filter method on the request object: $r->add_output_filter(\&callback); And, you can remove a downstream filter (from within an upstream filter) with: $next_f

Re: Activating/decativating PerlOutputFilterHandler "on-the-fly"

2005-05-02 Thread Jeff Ambrosino
>From within an existing Perl handler/filter, you can dynamically insert ('register') a new filter with the add_output_filter method on the request object: $r->add_output_filter(\&callback); And, you can remove a downstream filter (from within an upstream filter) with: $next_f = $f->next; $next_

Activating/decativating PerlOutputFilterHandler "on-the-fly"

2005-05-02 Thread Srebrenko Sehic
Hi ppl, I have a couple of PerlOutputFilterHandler directives registered in my httpd.conf conigurations. Is there any way to activate/deactivate these filters without editing httpd.conf and restarting Apache? I'm running Apache 2.0.54 with mod_perl2_RC5. TIA, // haver

Re: On-the-Fly

2004-07-03 Thread Stas Bekman
David Arnold wrote: Stas, Here's a little report to answer your questions below about my error_log: With: PerlAccessHandler 'sub {\ return Apache::Const::FORBIDDEN\ unless shift->connection->remote_ip=~m/^\Q10.3.4./;\

Re: On-the-Fly

2004-07-03 Thread Stas Bekman
David Arnold wrote: Stas et al, OK. Gave this a try: file:MyApache/BlockByIP.pm -- package MyApache::BlockByIP; use strict; use warnings; use Apache::RequestRec (); use Apache::Connection (); use Apache::Const -compile => qw(FORBIDDEN OK); my %

Re: On-the-Fly

2004-07-03 Thread David Arnold
Stas et al, OK. Gave this a try: file:MyApache/BlockByIP.pm -- package MyApache::BlockByIP; use strict; use warnings; use Apache::RequestRec (); use Apache::Connection (); use Apache::Const -compile => qw(FORBIDDEN OK); my %bad_ips = map {$_

Re: On-the-Fly

2004-07-03 Thread David Arnold
Stas, Here's a little report to answer your questions below about my error_log: With: PerlAccessHandler 'sub {\ return Apache::Const::FORBIDDEN\ unless shift->connection->remote_ip=~m/^\Q10.3.4./;\

Re: On-the-Fly

2004-07-03 Thread Stas Bekman
[David, don't forget to hit reply-all] Thanks. Line continuation! I now have this in my httpd.conf: PerlAccessHandler 'sub {\ return Apache::Const::FORBIDDEN\ unless shift->connection->remote_ip=~m/^\Q10.3.4./;\

Re: On-the-Fly

2004-07-03 Thread Stas Bekman
David Arnold wrote: All, Tried this in my httpd.conf: PerlAccessHandler 'sub { return Apache::Constants::FORBIDDEN unless shift->connection->remote_ip=~m/^\Q10.3.4./; }' But got this error when

On-the-Fly

2004-07-03 Thread David Arnold
All, Tried this in my httpd.conf: PerlAccessHandler 'sub { return Apache::Constants::FORBIDDEN unless shift->connection->remote_ip=~m/^\Q10.3.4./; }' But got this error when I tried to resta