At 21:43 22.05.2002, Doug MacEachern wrote:
>On Thu, 23 May 2002, Stas Bekman wrote:
>
> > In any case if the wrapper is used, the scripts won't work under
> > mod_cgi. On the other hand if File::Basename::dirname() is used
> > explicitly the script will still work with mod_cgi.
>
>good point. we should probably not bother providing something special in
>this case. at least not something that is also added to 1.27. 2.0 can
>have something fast and clean that uses apr, which 1.x doesn't have.
We definitely shouldn't have something that makes mod_perl Registry scripts
incompatible with CGI. In that case people might just re-start from scratch
with handlers.
> > The worst thing about this workaround, no matter how we implement it, is
> > that users will have to modify their code to make this work. So the cool
> > idea of "run your scripts unaltered" doesn't work any more :(
>
>umm, sloppy cgi scripts have always required changes to run properly in
>1.x. one might consider depending on '.' and chdir to be sloppy.
>and if that's the only change one has to make for a cgi script to also be
>thread-safe, that ain't too bad.
Hmm, I know I come with problems without much of a solution, but I would
just like to express my concern as to this: the way I see it, opening files
by depending on '.' is *really* common for CGI scripts, so I think we would
need a solution. The way I know it, people won't remember about this (or
not even read bout it), and have all kinds of problems with their scripts,
then come to us asking why mod_perl can't run their CGI scripts, etc etc.
>the goal of 2.x is to have enough compat layer so code will _run_ in
>both 1.x and 2.x. that doesn't mean changes won't be required such as
>this case or $r->connection->user changing to $r->user. but once the
>change is made, the code will run with both 2.x and 1.x. that is what's
>important.
IMO, $r->user is much less common than the above open() problem.
> > May be we can still have a special mode in which chdir() is performed if
> > running under non-threaded mpm? For those who need a transition period?
>
>we should probably have it die("chdir not supported in threaded MPMs");
>and warn("chdir ok in prefork MPM, will not work in threaded MPM");
If it can be made to work under prefork MPM, that is atleast a good step
forward. But there will still be many people using threaded MPM in Apache
2, because "it's the latest and greatest" everyone's talking about.
--
Per Einar Ellefsen
[EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]