Ed Grimm wrote:
On Wed, 30 Jul 2003, Stas Bekman wrote:
Perrin Harkins wrote:
On Tue, 2003-07-29 at 07:23, Stas Bekman wrote:
That's correct. This is because $r-chdir_file in compat doesn't do
anything. The reason is that under threaded mpm, chdir() affects all
threads. Of course we could
On Wed, 30 Jul 2003, Stas Bekman wrote:
Perrin Harkins wrote:
On Tue, 2003-07-29 at 07:23, Stas Bekman wrote:
That's correct. This is because $r-chdir_file in compat doesn't do
anything. The reason is that under threaded mpm, chdir() affects all
threads. Of course we could check whether the
Don't mess with the cooker, try using a subclass, e.g.:
# ModPerl/RegistryPrefork.pm
package ModPerl::RegistryPrefork;
use strict;
use warnings FATAL = 'all';
our $VERSION = '0.01';
use base qw(ModPerl::Registry);
use File::Basename ();
sub handler : method {
my $class
This seems to work OK. Hopefully I should now be able to remove the
mod_perl 1's Registry.pm file.
Thanks everyone.
Perfect. I've replaced the suggestion to use mp1's Apache::Registry with this
better solution, which doesn't require mp1:
--- Stas Bekman [EMAIL PROTECTED] wrote:
This seems to work OK. Hopefully I should now be able to remove the
mod_perl 1's Registry.pm file.
Thanks everyone.
Perfect. I've replaced the suggestion to use mp1's Apache::Registry
with this
better solution, which doesn't require mp1:
ColinB wrote:
http://perl.apache.org/docs/2.0/user/porting/compat.html#C_Apache__Registry___C_Apache__PerlRun__and_Friends
I'm a little confused about the changes you've made here. You still
mention using Apache::Registry, and then you added the text that
describes ModPerl::RegistryPrefork but
scripts to fail because they call open() using a relative
pathname.
Surely the working directory of a script should be the directory in
which it resides?
It does not seem to matter what directory I am in when I invoke httpd;
the script's current directory is always /.
I am mystified.
Here
. This causes
many scripts to fail because they call open() using a relative
pathname.
Surely the working directory of a script should be the directory in
which it resides?
It does not seem to matter what directory I am in when I invoke httpd;
the script's current directory is always /.
That's correct
--- Stas Bekman [EMAIL PROTECTED] wrote:
... I won't commit it yet, but you can override it in your
startup.pl,
until the dust settles down:
require Apache::compat;
sub Apache::RequestRec::chdir_file {
my $dir = @_ == 2 ? $_[1] : $_[0]-filename;
chdir $dir;
}
Thanks Stas.
... and even stranger, when I invoke the printenv cgi script for the
FIRST time it STILL displays / for the working directory, but if I
then click the IE browser's refresh (or CTRL-Refresh) button it changes
to the server root /dir1/dir2/httpd. Subsequent clicks of the refresh
button continue to
ColinB wrote:
--- Stas Bekman [EMAIL PROTECTED] wrote:
... I won't commit it yet, but you can override it in your
startup.pl,
until the dust settles down:
require Apache::compat;
sub Apache::RequestRec::chdir_file {
my $dir = @_ == 2 ? $_[1] : $_[0]-filename;
chdir $dir;
}
Thanks
Thanks Stas that worked a treat, except that your call to
File::Basename::basename
should be
File::Basename::dirname
The strange reversion to / seems to have been cured too.
Colin
__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design
ColinB wrote:
Thanks Stas that worked a treat, except that your call to
File::Basename::basename
should be
File::Basename::dirname
The strange reversion to / seems to have been cured too.
you are right. Can you please post a working solution, so I'll add it to docs.
BTW, perhaps we should
Can you please post a working solution, so I'll add it
to docs.
I added this to my startup.pl just after the
use Apache::compat();
sub Apache::RequestRec::chdir_file {
use File::Basename();
my $file = @_ == 2 ? $_[1] : $_[0]-filename;
my $dir = File::Basename::dirname($file);
On Tue, 2003-07-29 at 07:23, Stas Bekman wrote:
That's correct. This is because $r-chdir_file in compat doesn't do anything.
The reason is that under threaded mpm, chdir() affects all threads. Of course
we could check whether the mpm is prefork and do things the old way, but that
means that
On Tue, 29 Jul 2003, ColinB wrote:
Well I commented out the following line in
perl/lib/site_perl/5.8.0/sun4-solaris/Apache2/ModPerl/RegistryCooker.pm
like this:
#*chdir_file = \NOP;
and added an identical definition to the above in my startup.pl file
like this:
sub
Perrin Harkins wrote:
On Tue, 2003-07-29 at 07:23, Stas Bekman wrote:
That's correct. This is because $r-chdir_file in compat doesn't do anything.
The reason is that under threaded mpm, chdir() affects all threads. Of course
we could check whether the mpm is prefork and do things the old way,
Randy Kobes wrote:
On Tue, 29 Jul 2003, ColinB wrote:
Well I commented out the following line in
perl/lib/site_perl/5.8.0/sun4-solaris/Apache2/ModPerl/RegistryCooker.pm
like this:
#*chdir_file = \NOP;
and added an identical definition to the above in my startup.pl file
like this:
sub
18 matches
Mail list logo