Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ModPerl: Dev

win32 and apache_1.3.19

 

 

ModPerl dev RSS feed   Index | Next | Previous | View Threaded


randy at theoryx5

Apr 22, 2001, 11:25 PM

Post #1 of 7 (1367 views)
Permalink
win32 and apache_1.3.19

Hi,
Apache_1.3.19 on Win32 has changed the way os.h in
the apache source tree is included, so that mod_perl no
longer finds it if built via command-line arguments. I've
attached a patch against the cvs mod_perl which builds
a mod_perl.dsp to include the relevant apache directory.
This patch also includes the t/TEST.win32 patch sent
earlier to account for the fact that apache_1.3.19 on Win32
sets the relative server root to the path to the apache binary,
so that $Apache::Server::CWD in t/docs/startup.pl and t/docs/rl.pl
points to the path of the apache binary, rather than the mod_perl
build directory, and subsequently the tests get confused
since @INC doesn't contain the mod_perl build directory.
Finally, there's some changes in mod_perl.dsp to use some
generic include and lib paths - these don't really matter, as
they have to be set anyway for the local system, but this
may make the needed changes more obvious to a
user if things are configured manually.

best regards,
randy kobes
Attachments: win32.patch (2.64 KB)


randy at theoryx5

Apr 23, 2001, 7:15 PM

Post #2 of 7 (1316 views)
Permalink
Re: win32 and apache_1.3.19 [In reply to]

----- Original Message -----
From: "Randy Kobes" <randy [at] theoryx5>
To: <dev [at] perl>
Sent: Monday, April 23, 2001 1:25 AM
Subject: win32 and apache_1.3.19


> Hi,
> Apache_1.3.19 on Win32 has changed the way os.h in
> the apache source tree is included, so that mod_perl no
> longer finds it if built via command-line arguments. I've
> attached a patch against the cvs mod_perl which builds
> a mod_perl.dsp to include the relevant apache directory.
> This patch also includes the t/TEST.win32 patch sent
> earlier to account for the fact that apache_1.3.19 on Win32
> sets the relative server root to the path to the apache binary,
> so that $Apache::Server::CWD in t/docs/startup.pl and t/docs/rl.pl
> points to the path of the apache binary, rather than the mod_perl
> build directory, and subsequently the tests get confused
> since @INC doesn't contain the mod_perl build directory.
> Finally, there's some changes in mod_perl.dsp to use some
> generic include and lib paths - these don't really matter, as
> they have to be set anyway for the local system, but this
> may make the needed changes more obvious to a
> user if things are configured manually.

Additionally, a recent patch to the top-level Makefile.PL
removed some Win32-specific values that were
present in Apache::MyConfig that recorded the mod_perl
and apache paths used to build mod_perl. These are put
back in in the attached patch, which also includes the
patches described above.

best regards,
randy kobes
Attachments: win32.patch (3.48 KB)


dougm at covalent

Apr 23, 2001, 9:04 PM

Post #3 of 7 (1308 views)
Permalink
Re: win32 and apache_1.3.19 [In reply to]

On Mon, 23 Apr 2001, Randy Kobes wrote:

> This patch also includes the t/TEST.win32 patch sent
> earlier to account for the fact that apache_1.3.19 on Win32
> sets the relative server root to the path to the apache binary,
> so that $Apache::Server::CWD in t/docs/startup.pl and t/docs/rl.pl
> points to the path of the apache binary, rather than the mod_perl
> build directory, and subsequently the tests get confused
> since @INC doesn't contain the mod_perl build directory.

did you see my reply to your original message (included below) ?
thanks as always randy!


randy at theoryx5

Apr 25, 2001, 10:15 PM

Post #4 of 7 (1340 views)
Permalink
Re: win32 and apache_1.3.19 [In reply to]

----- Original Message -----
From: "Doug MacEachern" <dougm [at] covalent>
To: "Randy Kobes" <randy [at] theoryx5>
Cc: <dev [at] perl>
Sent: Monday, April 23, 2001 11:04 PM
Subject: Re: win32 and apache_1.3.19


> On Mon, 23 Apr 2001, Randy Kobes wrote:
>
> > This patch also includes the t/TEST.win32 patch sent
> > earlier to account for the fact that apache_1.3.19 on Win32
> > sets the relative server root to the path to the apache binary,
> > so that $Apache::Server::CWD in t/docs/startup.pl and t/docs/rl.pl
> > points to the path of the apache binary, rather than the mod_perl
> > build directory, and subsequently the tests get confused
> > since @INC doesn't contain the mod_perl build directory.
>
> did you see my reply to your original message (included below) ?
> thanks as always randy!
[ ... ]

Hi,
No, I didn't get that - we may have been having some local
network glitches around that time ....

> On Sat, 14 Apr 2001, Randy Kobes wrote:
>
> > Hi,
> > One of the changes in apache_1.3.19 for Win32 is that the
> > relative ServerRoot was changed to root to the path
> > of the apache binary. This has the effect of setting
> > $Apache::Server::CWD in t/docs/startup.pl and t/docs/rl.pl
> > to the path of the apache binary, rather than the mod_perl
> > build directory, and subsequently the tests can't be run
> > since @INC doesn't contain the mod_perl build directory.
> > The following patch against mod_perl-1.25, tested on
> > apache_1.3.19 and perl-5.6.1, fixes this by simply
> > substituting the mod_perl build directory for
> > $Apache::Server::CWD in these two files.
>
> i'd rather not iedit those files. will something like the patch below
> solve the problem? thanks randy.
>
> Index: Makefile.PL
> ===================================================================
> RCS file: /home/cvs/modperl/Makefile.PL,v
> retrieving revision 1.179
> diff -u -r1.179 Makefile.PL
> --- Makefile.PL 2001/04/17 21:38:52 1.179
> +++ Makefile.PL 2001/04/17 22:20:02
> @@ -95,6 +95,7 @@
> $Apache::MyConfig::Setup{Apache_Src} ;
>
> my $PWD = cwd;
> +$ENV{APACHE_CWD} = $PWD;
> $ENV{PERL5LIB} = "$PWD/lib";
[ ... ]

This turned out to be an interesting problem ....
Basically $ENV{APACHE_CWD}, set within
Makefile.PL, or even in t/TEST.win32, doesn't
survive the trip to t/docs/startup.pl. I checked
the bug database at ActiveState, and apparently
it's a problem with Win32::Process - it does
inherit environment variables from the console
window from which the script is run, but doesn't
see changes in %ENV made within that
script (this did work in ActivePerl 5xx). A fix
is being worked on ....

In the meantime, I tried a couple of workarounds,
but these weren't very satisfactory. One could
put an environment variable temporarily in the
Registry, but this seems overkill. Alternatively,
apparently there's a program called
WINSET which can set console environment
variables in a system() call, but WINSET isn't
installed in a stock Win32. Another option
is to write a batch file which sets APACHE_CWD
and then starts apache, and then execute this
batch file with Win32::Process - this works,
but again seems like overkill. I'll think
about this some more ....

best regards,
randy



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe [at] perl
For additional commands, e-mail: dev-help [at] perl


dougm at covalent

Apr 26, 2001, 6:57 PM

Post #5 of 7 (1354 views)
Permalink
Re: win32 and apache_1.3.19 [In reply to]

how about having Makefile.PL generate a file that sets
$Apache::Server::CWD, which is then PerlRequire'd by httpd.conf?
i'd just rather avoid modifying the distribution files.



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe [at] perl
For additional commands, e-mail: dev-help [at] perl


randy at theoryx5

Apr 26, 2001, 10:31 PM

Post #6 of 7 (1337 views)
Permalink
Re: win32 and apache_1.3.19 [In reply to]

----- Original Message -----
From: "Doug MacEachern" <dougm [at] covalent>
To: "Randy Kobes" <randy [at] theoryx5>
Cc: <dev [at] perl>
Sent: Thursday, April 26, 2001 8:57 PM
Subject: Re: win32 and apache_1.3.19


> how about having Makefile.PL generate a file that sets
> $Apache::Server::CWD, which is then PerlRequire'd by httpd.conf?
> i'd just rather avoid modifying the distribution files.

that's great ... this is done in the attached patch (against today's
cvs mod_perl), and all works with perl-5.6.1 and apache_1.3.19.
i also included in this patch the earlier patches for getting the
right apache_1.3.19 inc directories, inserting some win32-specific
values in Apache::MyConfig, and changing some apache paths
in mod_perl.dsp to more generic values.

best regards,
randy
Attachments: win32.patch (3.51 KB)


dougm at covalent

Apr 27, 2001, 10:01 AM

Post #7 of 7 (1339 views)
Permalink
Re: win32 and apache_1.3.19 [In reply to]

On Fri, 27 Apr 2001, Randy Kobes wrote:

> that's great ... this is done in the attached patch (against today's
> cvs mod_perl), and all works with perl-5.6.1 and apache_1.3.19.
> i also included in this patch the earlier patches for getting the
> right apache_1.3.19 inc directories, inserting some win32-specific
> values in Apache::MyConfig, and changing some apache paths
> in mod_perl.dsp to more generic values.

cool, applied, thanks!


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe [at] perl
For additional commands, e-mail: dev-help [at] perl

ModPerl dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.