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

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/

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 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 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 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 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: 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-22 Thread william
On 5/21/08, Perrin Harkins <[EMAIL PROTECTED]> wrote: > 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

Re: Current working directory always "/"

2008-05-22 Thread Perrin Harkins
On Thu, May 22, 2008 at 5:50 AM, william <[EMAIL PROTECTED]> wrote: > Btw, could you tell me how does full paths increase security ? It prevents some attacks based on tricking your application into working on different files. If you don't assume a certain working directory, you won't be compromis

Re: Current working directory always "/"

2008-05-22 Thread Foo JH
Hello Perrin, I would think that threads are more important to Win32 Perlies than their Linux counterparts. To me, I use threads as often as I can to maximise performance and scalability. To conclude, I can't agree with your statement that people don't use threads. william wrote: On 5/21/0

Re: Current working directory always "/"

2008-05-23 Thread Perrin Harkins
On Thu, May 22, 2008 at 11:37 PM, Foo JH <[EMAIL PROTECTED]> wrote: > To conclude, I can't agree with your statement > that people don't use threads. I disagree with that statement too. What I actually said was that most people don't use threads (since they are on Linux) and that people who don't