Re: PerlAuthenHandler and ErrorDocument 401

2008-05-21 Thread fof
Philip M. Gollucci wrote: > > In my experience and a few others on the list if you search the archives, > its > almost never worth it to override with something unless you > don't > have any 'assets' being served from this server which is an advisable > idea. > Thanks for your response Philip

Re: [OT] is there a maximum output character length ?

2008-05-21 Thread Dodger
If you have a reason to leave it open, you can always set autoflush on the file. open FO, ">file_out"; my $was = select FO; local $| = 1; select $was; print FO "a"; print FO "b"; etc. 2008/5/21 John ORourke <[EMAIL PROTECTED]>: > > Well thanks! Under regular CGI, every time your browser reques

Re: [OT] Solaris + Apache 2.2 / PHP 5 cluster config help

2008-05-21 Thread Jonathan Vanasco
On May 20, 2008, at 4:00 PM, Issac Goldstand wrote: Right - I know that in theory, but was worried about the disk/ram/ cpu overhead of replicating the writes to all of the slave servers offsetting that benefit... The explanation i gave to this on the Pylons list today was such: when you're

Re: [OT] is there a maximum output character length ?

2008-05-21 Thread John ORourke
Well thanks! Under regular CGI, every time your browser requests a page, Apache has to find your script, load Perl, compile your script and any modules you use, run it, and exit Perl. Under mod_perl, all the loading and compiling is done when Apache starts, not on every request - it's doing fa

Re: is there a maximum output character length ?

2008-05-21 Thread william
On Thu, May 22, 2008 at 4:50 AM, John ORourke <[EMAIL PROTECTED]> wrote: > william wrote: > > On Thu, May 22, 2008 at 4:30 AM, John ORourke <[EMAIL PROTECTED]> > wrote: > > > william wrote: > > > It will write a few characters only, not complete. Is there a thread > problem or something ? > > > You

Re: is there a maximum output character length ?

2008-05-21 Thread John ORourke
william wrote: On Thu, May 22, 2008 at 4:30 AM, John ORourke <[EMAIL PROTECTED]> wrote: william wrote: It will write a few characters only, not complete. Is there a thread problem or something ? You need to explicitly close the file - under CGI, your program exits at the end of

Re: is there a maximum output character length ?

2008-05-21 Thread william
On Thu, May 22, 2008 at 4:30 AM, John ORourke <[EMAIL PROTECTED]> wrote: > william wrote: >> >> Let's say if I have >> $ruleStr = "aa eee"; >> >> open(PARSER,">$self->{parser}.pm"); >> print PARSER $ruleStr; >> >> It will write a few characters only, not complete. Is there

Re: is there a maximum output character length ?

2008-05-21 Thread John ORourke
william wrote: Let's say if I have $ruleStr = "aa eee"; open(PARSER,">$self->{parser}.pm"); print PARSER $ruleStr; It will write a few characters only, not complete. Is there a thread problem or something ? You need to explicitly close the file - under CGI, your p

is there a maximum output character length ?

2008-05-21 Thread william
Hello, I am just so tired after hours of debugging, why does is never write text into the file completely ? It has not problem if using CGI. Let's say if I have $ruleStr = "aa eee"; open(PARSER,">$self->{parser}.pm"); print PARSER $ruleStr; It will write a few characte

Re: Current working directory always "/"

2008-05-21 Thread Perrin Harkins
On Wed, May 21, 2008 at 10:28 AM, Philip M. Gollucci <[EMAIL PROTECTED]> wrote: > You should almost always use full paths to files, think of threads. This is true in a module you plan to distribute on CPAN, but for local use you typically don't need to think of threads because most people will not

Re: Current working directory always "/"

2008-05-21 Thread Philip M. Gollucci
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 william wrote: | /var/www/modperl/Dir/Test.pm | package Dir::Test; | | use Cwd; | use Storable; | | sub mygetcwd() | { | open(FILE, 'textfile') || die "$!"; #No such file or directory at | /var/www/modperl//Dir/Test.pm line 8.\n | print ;

Re: PerlAuthenHandler and ErrorDocument 401

2008-05-21 Thread Philip M. Gollucci
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 | I have uploaded my MyAuthenHandler.pm and the modules it relies on for | configuration perhaps if you have time you could peruse the code and let me | know if I am doing anything wrong for this type of operation. | | Thanks again for your help on th

Re: Current working directory always "/"

2008-05-21 Thread Perrin Harkins
On Wed, May 21, 2008 at 7:52 AM, william <[EMAIL PROTECTED]> wrote: > Sigh...Even ModPerl::RegistryPrefork does not work as what I want, why > do they say "Run unaltered CGI scripts under mod_perl" when it is > working differently with CGI ? > > /var/www/modperl/Dir/Test.pm > package Dir::Test; Un

Re: Current working directory always "/"

2008-05-21 Thread william
On Wed, May 21, 2008 at 5:26 PM, Torsten Foertsch <[EMAIL PROTECTED]> wrote: > On Wed 21 May 2008, william wrote: >> I don't know why they don't just recommend using >> ModPerl::RegistryPrefork instead of ModPerl::Registry , that could >> save a lot of other people's trouble. But there must be a re

Re: Current working directory always "/"

2008-05-21 Thread Torsten Foertsch
On Wed 21 May 2008, william wrote: > I don't know why they don't just recommend using > ModPerl::RegistryPrefork instead of ModPerl::Registry , that could > save a lot of other people's trouble. But there must be a reason that > I don't know. because it won't work with a threaded MPM. Torsten --

Re: Current working directory always "/"

2008-05-21 Thread william
On Wed, May 21, 2008 at 4:29 PM, Fred Moyer <[EMAIL PROTECTED]> wrote: > william wrote: >> >> Hello, >> It took me hours just to notice that my current working directory of >> mod_perl2 always appear as "/" > > See slide 77 and on: > > http://gozer.ectoplasm.org/Talks/mod_perl-2.0-from-cgi-fast.pdf

Re: Current working directory always "/"

2008-05-21 Thread Fred Moyer
william wrote: Hello, It took me hours just to notice that my current working directory of mod_perl2 always appear as "/" See slide 77 and on: http://gozer.ectoplasm.org/Talks/mod_perl-2.0-from-cgi-fast.pdf Specifically slide 81 looks like it addresses this issue. Try adding: require “/var/

Current working directory always "/"

2008-05-21 Thread william
Hello, It took me hours just to notice that my current working directory of mod_perl2 always appear as "/" Alias /modperl/ /var/www/modperl/ SetHandler perl-script PerlResponseHandler ModPerl::Registry PerlOptions +ParseHeaders Options +ExecCGI Order allow,deny All