You are viewing a plain text version of this content. The canonical link for it is here.
Posted to test-dev@httpd.apache.org by Rodent of Unusual Size <Ke...@Golux.Com> on 2004/03/12 18:28:19 UTC

testing apache 1.3 on windows

where does the perl framework get the -D APACHEn value?  i'm trying
to run it against an installation of 1.3 on windows, and it keeps
varfing by passing '-p' to the 1.3 apxs.pl.  the same line shows
'-D APACHE2' so i'm suspecting it has simply made the wrong choice
of arguments.
-- 
#ken	P-)}

Ken Coar, Sanagendamgagwedweinini  http://Ken.Coar.Org/
Author, developer, opinionist      http://Apache-Server.Com/

"Millennium hand and shrimp!"



Re: testing apache 1.3 on windows

Posted by William McKee <wi...@knowmad.com>.
On Mon, Mar 15, 2004 at 09:04:32AM -0500, Rodent of Unusual Size wrote:
> explodes with the attempt to treat the 1.3 apxs.pl as 2.0, complete
> with the same -D APACHE2.

Ken,

I had a slightly different variation of sticky preferences problems over
the weekend. I found preferences stored in the following two locations:

    <path to your A::T libs>\Apache\TestConfigData.pm
    t\conf\apache_test_config.pm

Do you see the preferences set in either of these locations? I too never
saw a .apache-test file in my home directory in Windows (XP).


HTH,
William

-- 
Knowmad Services Inc.
http://www.knowmad.com

Re: testing apache 1.3 on windows

Posted by Randy Kobes <ra...@theoryx5.uwinnipeg.ca>.
On Mon, 15 Mar 2004, William A. Rowe, Jr. wrote:

> At 02:51 PM 3/15/2004, you wrote:
> >On Mon, 15 Mar 2004, Rodent of Unusual Size wrote:
> >
> >> also, there apparently is no longer an apxs.pl for 2.0 windows --
> >> so what's the magic Makefile.PL argument to let the test modules
> >> be built?
> >
> >There is an alpha port of apxs for Win32 for Apache/2.0;
> >grab the script
> >   http://perl.apache.org/dist/win32-bin/install_apxs
> >and run it, which will fetch, configure, and install
> >it on your system.
>
> Randy ... ready to make a go of integrating into httpd-2.0 build?
>
> Bill

Sure, Bill - I'd be happy to ... Right now it seems to work
OK for external modules (although some cleanup is
warranted), but it would need work to be useable within
httpd-2.0 itself.

-- 
best regards,
randy

Re: testing apache 1.3 on windows

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
At 02:51 PM 3/15/2004, you wrote:
>On Mon, 15 Mar 2004, Rodent of Unusual Size wrote:
>
>> also, there apparently is no longer an apxs.pl for 2.0 windows --
>> so what's the magic Makefile.PL argument to let the test modules
>> be built?
>
>There is an alpha port of apxs for Win32 for Apache/2.0;
>grab the script
>   http://perl.apache.org/dist/win32-bin/install_apxs
>and run it, which will fetch, configure, and install
>it on your system.

Randy ... ready to make a go of integrating into httpd-2.0 build?

Bill



Re: testing apache 1.3 on windows

Posted by Randy Kobes <ra...@theoryx5.uwinnipeg.ca>.
On Tue, 16 Mar 2004, Rodent of Unusual Size wrote:

> Randy Kobes wrote:
> >
> > There is an alpha port of apxs for Win32 for Apache/2.0;
> > grab the script
> >    http://perl.apache.org/dist/win32-bin/install_apxs
> > and run it, which will fetch, configure, and install
> > it on your system.
>
> beauty.  except a) i had to add 'use File::Spec;' to Configure.pl,

Sorry about that - I'll fix that.

> and a 'perl t\TEST -config' blowes up trying to build mod_random_chunk
> (unresolved symbols _random and _srandom).

I noticed that too - I guess it needs linking against
some system library; I'll try to find out which one.

> but it's a whole lot better than before!
>
> do things of the form 'open($fh, "link foo |");' not work well
> on windows?  because i'm wondering if the giant .bat file could
> be replaced with a perl script that used that construct to do
> the linking..

Things like that do work in general, and that's a good idea.
I was going to clean the script up (in it's present form it
was a hacked port from the unix version), and I'll look at
doing something like that. Thanks.

-- 
best regards,
randy

Re: testing apache 1.3 on windows

Posted by Randy Kobes <ra...@theoryx5.uwinnipeg.ca>.
On Wed, 17 Mar 2004, Rodent of Unusual Size wrote:

> Randy Kobes wrote:
> >
> > I couldn't find the _random or _srandom symbols in a
> > system library, but changing these to rand() and srand()
> > in mod_random_chunk.c seems to work OK.
>
> mm.  i've ifdef'd those for WIN32 and will commit it; if anyone
> cares to verify that s/rand() are universally suitable replacements
> for s/random(), the ifdef can go.
>
> thanks, randy!

I found this in the rand man page on Linux:

The versions of rand() and srand() in the Linux C Library
use the same random number generator as random() and
srandom(), so the lower-order bits should be as random as
the higher-order bits. However, on older rand()
implementations, the lower-order bits are much less random
than the higher-order bits.

So it looks like they're not equivalent on older
implementations.

-- 
best regards,
randy

Re: testing apache 1.3 on windows

Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
Randy Kobes wrote:
> 
> I couldn't find the _random or _srandom symbols in a
> system library, but changing these to rand() and srand()
> in mod_random_chunk.c seems to work OK.

mm.  i've ifdef'd those for WIN32 and will commit it; if anyone
cares to verify that s/rand() are universally suitable replacements
for s/random(), the ifdef can go.

thanks, randy!
-- 
#ken	P-)}

Ken Coar, Sanagendamgagwedweinini  http://Ken.Coar.Org/
Author, developer, opinionist      http://Apache-Server.Com/

"Millennium hand and shrimp!"


Re: testing apache 1.3 on windows

Posted by Randy Kobes <ra...@theoryx5.uwinnipeg.ca>.
On Tue, 16 Mar 2004, Rodent of Unusual Size wrote:

> and a 'perl t\TEST -config' blowes up trying to build mod_random_chunk
> (unresolved symbols _random and _srandom).

I couldn't find the _random or _srandom symbols in a
system library, but changing these to rand() and srand()
in mod_random_chunk.c seems to work OK.

-- 
best regards,
randy

Re: testing apache 1.3 on windows

Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
Randy Kobes wrote:
> 
> There is an alpha port of apxs for Win32 for Apache/2.0;
> grab the script
>    http://perl.apache.org/dist/win32-bin/install_apxs
> and run it, which will fetch, configure, and install
> it on your system.

beauty.  except a) i had to add 'use File::Spec;' to Configure.pl,
and a 'perl t\TEST -config' blowes up trying to build mod_random_chunk
(unresolved symbols _random and _srandom).

but it's a whole lot better than before!

do things of the form 'open($fh, "link foo |");' not work well
on windows?  because i'm wondering if the giant .bat file could
be replaced with a perl script that used that construct to do
the linking..
-- 
#ken	P-)}

Ken Coar, Sanagendamgagwedweinini  http://Ken.Coar.Org/
Author, developer, opinionist      http://Apache-Server.Com/

"Millennium hand and shrimp!"


Re: testing apache 1.3 on windows

Posted by Randy Kobes <ra...@theoryx5.uwinnipeg.ca>.
On Mon, 15 Mar 2004, Rodent of Unusual Size wrote:

> also, there apparently is no longer an apxs.pl for 2.0 windows --
> so what's the magic Makefile.PL argument to let the test modules
> be built?

There is an alpha port of apxs for Win32 for Apache/2.0;
grab the script
   http://perl.apache.org/dist/win32-bin/install_apxs
and run it, which will fetch, configure, and install
it on your system.

> in case there was any question, i hate development on windows,
> i hate libtool, and i think i've discovered a special subtype
> of 'male pattern baldness' -- call it 'hacker pattern baldness,'
> comes from pulling your hair out.

:)

-- 
best regards,
randy kobes

Re: testing apache 1.3 on windows

Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
also, there apparently is no longer an apxs.pl for 2.0 windows --
so what's the magic Makefile.PL argument to let the test modules
be built?

in case there was any question, i hate development on windows,
i hate libtool, and i think i've discovered a special subtype
of 'male pattern baldness' -- call it 'hacker pattern baldness,'
comes from pulling your hair out.
-- 
#ken	P-)}

Ken Coar, Sanagendamgagwedweinini  http://Ken.Coar.Org/
Author, developer, opinionist      http://Apache-Server.Com/

"Millennium hand and shrimp!"


Re: testing apache 1.3 on windows

Posted by Stas Bekman <st...@stason.org>.
William A. Rowe, Jr. wrote:
> At 11:46 AM 3/22/2004, Stas Bekman wrote:
> 
>>Rodent of Unusual Size wrote:
>>
>>
>>>TestConfigC.pm was making the assumption that that '-llibhttpd -p' 
>>>was valid for all versions of the server on windows.  conditionalised 
>>>and now it works.  committed.
>>
>>Good work, Ken!
>>
>>in the future commits please avoid using unnecessary parantheses, to keep the code style consistent.
> 
> 
> LOL I personally find Ken's style increases legibility - +1 and kudos
> to all Perl programmers who write code legibly :)
> 
> Those familiar with xbase know that DO FOR recval < 100 AMD fooval = "Q"
> would parse and treat AMD... as commentary - enclosing the same condition 
> in parens would successfully cause the parser to complain.  To this day I'm
> still a huge beliver in extra parens for clarity :)

true, but there is no ambiguety in:

   do something if A == B

in which case extra parens make the code less readable, IMHO of course.

In any case, let's not to start a flamewar here, we just try to keep the 
coding style consistent across the project and we use () only when they are 
needed to avoid ambiguety.

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

Re: testing apache 1.3 on windows

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
At 11:46 AM 3/22/2004, Stas Bekman wrote:
>Rodent of Unusual Size wrote:
>
>>TestConfigC.pm was making the assumption that that '-llibhttpd -p' 
>>was valid for all versions of the server on windows.  conditionalised 
>>and now it works.  committed.
>
>Good work, Ken!
>
>in the future commits please avoid using unnecessary parantheses, to keep the code style consistent.

LOL I personally find Ken's style increases legibility - +1 and kudos
to all Perl programmers who write code legibly :)

Those familiar with xbase know that DO FOR recval < 100 AMD fooval = "Q"
would parse and treat AMD... as commentary - enclosing the same condition 
in parens would successfully cause the parser to complain.  To this day I'm
still a huge beliver in extra parens for clarity :)



Re: testing apache 1.3 on windows

Posted by Stas Bekman <st...@stason.org>.
Geoffrey Young wrote:
> 
> Stas Bekman wrote:
> 
>>Rodent of Unusual Size wrote:
>>
>>
>>>Stas Bekman wrote:
>>>
>>>
>>>>does this make any difference/
>>>>
>>>>perl Makefile.PL -apxs K:/Coar/Apache/Server-1.3/bin/apxs.pl -httpd
>>>>K:/Coar/Apache/Server-1.3/bin/Apache.exe
>>>
>>>
>>>
>>>yes, it made a difference -- but it still didn't work.  it now
>>>specifies '-D APACHE1' correctly -- 
>>
>>
>>OK, so this is a known issue. Geoff was saying that he will post a
>>reproducable case so I can fix that. I suppose that since Geoff has
>>added the band-aid to turn the feature off we won't see that case ;)
> 
> 
> well, I implemented the feature but I have yet to turn it on outside of my
> test case :)

> sorry I haven't followed up - I've been swamped lately and am trying to
> catch up.  hopefully I'll be able to track it down "soonish"

Take your time, Geoff. I've reviewed the custom config loading code again and 
I do handle this case, but I must have omitted some situation I haven't 
thought of. I think the problem happens when the options are saved, not when 
they are read. So I won't be surprised that you will report that you get 
TestConfigData.pm containing discrepancy between apxs and httpd, as the cause 
of the problem.

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

Re: testing apache 1.3 on windows

Posted by Geoffrey Young <ge...@modperlcookbook.org>.

Stas Bekman wrote:
> Rodent of Unusual Size wrote:
> 
>> Stas Bekman wrote:
>>
>>> does this make any difference/
>>>
>>> perl Makefile.PL -apxs K:/Coar/Apache/Server-1.3/bin/apxs.pl -httpd
>>> K:/Coar/Apache/Server-1.3/bin/Apache.exe
>>
>>
>>
>> yes, it made a difference -- but it still didn't work.  it now
>> specifies '-D APACHE1' correctly -- 
> 
> 
> OK, so this is a known issue. Geoff was saying that he will post a
> reproducable case so I can fix that. I suppose that since Geoff has
> added the band-aid to turn the feature off we won't see that case ;)

well, I implemented the feature but I have yet to turn it on outside of my
test case :)

sorry I haven't followed up - I've been swamped lately and am trying to
catch up.  hopefully I'll be able to track it down "soonish"

--Geoff


Re: testing apache 1.3 on windows

Posted by Stas Bekman <st...@stason.org>.
Rodent of Unusual Size wrote:
> Stas Bekman wrote:
> 
>>does this make any difference/
>>
>>perl Makefile.PL -apxs K:/Coar/Apache/Server-1.3/bin/apxs.pl -httpd 
>>K:/Coar/Apache/Server-1.3/bin/Apache.exe
> 
> 
> yes, it made a difference -- but it still didn't work.  it now
> specifies '-D APACHE1' correctly -- 

OK, so this is a known issue. Geoff was saying that he will post a 
reproducable case so I can fix that. I suppose that since Geoff has added the 
band-aid to turn the feature off we won't see that case ;)

> but it still specifies '-p'
> which isn't an apxs option for 1.3.
> 
> 
>>perl Makefile.PL -httpd K:/Coar/Apache/Server-1.3/bin/Apache.exe
> 
> 
> 'can't build c-modules without apxs'
> 
> okey, i thin i found the problem -- TestConfigC.pm was making the
> assumption that that '-llibhttpd -p' was valid for all versions of
> the server on windows.  conditionalised and now it works.  committed.

Good work, Ken!

in the future commits please avoid using unnecessary parantheses, to keep the 
code style consistent.

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

Re: testing apache 1.3 on windows

Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
Stas Bekman wrote:
> 
> does this make any difference/
> 
> perl Makefile.PL -apxs K:/Coar/Apache/Server-1.3/bin/apxs.pl -httpd 
> K:/Coar/Apache/Server-1.3/bin/Apache.exe

yes, it made a difference -- but it still didn't work.  it now
specifies '-D APACHE1' correctly -- but it still specifies '-p'
which isn't an apxs option for 1.3.

> perl Makefile.PL -httpd K:/Coar/Apache/Server-1.3/bin/Apache.exe

'can't build c-modules without apxs'

okey, i thin i found the problem -- TestConfigC.pm was making the
assumption that that '-llibhttpd -p' was valid for all versions of
the server on windows.  conditionalised and now it works.  committed.
-- 
#ken	P-)}

Ken Coar, Sanagendamgagwedweinini  http://Ken.Coar.Org/
Author, developer, opinionist      http://Apache-Server.Com/

"Millennium hand and shrimp!"


Re: testing apache 1.3 on windows

Posted by Stas Bekman <st...@stason.org>.
Rodent of Unusual Size wrote:
> Rodent of Unusual Size wrote:
> 
> 
>>Geoffrey Young wrote:
>>
>>>it all boils down to TestConfigParse::httpd_version()
>>
>>glad to know it's somewhat identified.
>>
>>
>>>that (or similar foo) will happen when you try to test first against 2.0 and
>>>then against 1.3, regardless of win32 vs unix.  at least that's been my
>>>experience.
>>>
>>>try first removing $HOME/.apache-test and see if that helps.  if so, just
>>>introduced into cvs yesterday was $ENV{APACHE_TEST_NO_STICKY_PREFERENCES}
>>>which, if true, attempts to suppress any and all influence from prior runs.
>>
>>well, no.  there is no ".apache-test" file anywhere on my windows system.
>>i did a "set APACHE_TEST_NO_STICKY_PREFERENCES=1".  i even completely
>>removed and re-checked out the httpd-test module.  but
>>
>>perl Makefile.PL -apxs "K:\Coar\Apache\Server-1.3\bin\apxs.pl"
>>
>>succeeds, as does the nmake following, but
>>
>>perl t\TEST -config
>>
>>explodes with the attempt to treat the 1.3 apxs.pl as 2.0, complete
>>with the same -D APACHE2.
> 
> 
> i just tried completely removing the httpd-test tree and checking out
> HEAD again.  it did exactly the same thing:
> 
> perl Makefile.PL -apxs K:/Coar/Apache/Server-1.3/bin/apxs.pl
> perl t\TEST -config
> [blah blah]
> K:\Coar\Apache\Server-1.3\bin\apxs.pl -D APACHE2
> -IK:\Coar\httpd-test\perl-framework\c-modules -llibhttpd -p -c mod_test_ssl.c
> 
> and blows up with '-p' being unrecognised.  so why is it trying
> to figure out that this is a 2.0 server???

does this make any difference/

perl Makefile.PL -apxs K:/Coar/Apache/Server-1.3/bin/apxs.pl -httpd 
K:/Coar/Apache/Server-1.3/bin/Apache.exe

and this?

perl Makefile.PL -httpd K:/Coar/Apache/Server-1.3/bin/Apache.exe

of course i assume that that's the path to httpd.


__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

Re: testing apache 1.3 on windows

Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
Rodent of Unusual Size wrote:

> Geoffrey Young wrote:
>> 
>> it all boils down to TestConfigParse::httpd_version()
> 
> glad to know it's somewhat identified.
> 
>> that (or similar foo) will happen when you try to test first against 2.0 and
>> then against 1.3, regardless of win32 vs unix.  at least that's been my
>> experience.
>> 
>> try first removing $HOME/.apache-test and see if that helps.  if so, just
>> introduced into cvs yesterday was $ENV{APACHE_TEST_NO_STICKY_PREFERENCES}
>> which, if true, attempts to suppress any and all influence from prior runs.
> 
> well, no.  there is no ".apache-test" file anywhere on my windows system.
> i did a "set APACHE_TEST_NO_STICKY_PREFERENCES=1".  i even completely
> removed and re-checked out the httpd-test module.  but
> 
> perl Makefile.PL -apxs "K:\Coar\Apache\Server-1.3\bin\apxs.pl"
> 
> succeeds, as does the nmake following, but
> 
> perl t\TEST -config
> 
> explodes with the attempt to treat the 1.3 apxs.pl as 2.0, complete
> with the same -D APACHE2.

i just tried completely removing the httpd-test tree and checking out
HEAD again.  it did exactly the same thing:

perl Makefile.PL -apxs K:/Coar/Apache/Server-1.3/bin/apxs.pl
perl t\TEST -config
[blah blah]
K:\Coar\Apache\Server-1.3\bin\apxs.pl -D APACHE2
-IK:\Coar\httpd-test\perl-framework\c-modules -llibhttpd -p -c mod_test_ssl.c

and blows up with '-p' being unrecognised.  so why is it trying
to figure out that this is a 2.0 server???
-- 
#ken	P-)}

Ken Coar, Sanagendamgagwedweinini  http://Ken.Coar.Org/
Author, developer, opinionist      http://Apache-Server.Com/

"Millennium hand and shrimp!"


Re: testing apache 1.3 on windows

Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
Geoffrey Young wrote:
> 
> it all boils down to TestConfigParse::httpd_version()

glad to know it's somewhat identified.

> that (or similar foo) will happen when you try to test first against 2.0 and
> then against 1.3, regardless of win32 vs unix.  at least that's been my
> experience.
> 
> try first removing $HOME/.apache-test and see if that helps.  if so, just
> introduced into cvs yesterday was $ENV{APACHE_TEST_NO_STICKY_PREFERENCES}
> which, if true, attempts to suppress any and all influence from prior runs.

well, no.  there is no ".apache-test" file anywhere on my windows system.
i did a "set APACHE_TEST_NO_STICKY_PREFERENCES=1".  i even completely
removed and re-checked out the httpd-test module.  but

perl Makefile.PL -apxs "K:\Coar\Apache\Server-1.3\bin\apxs.pl"

succeeds, as does the nmake following, but

perl t\TEST -config

explodes with the attempt to treat the 1.3 apxs.pl as 2.0, complete
with the same -D APACHE2.

no joy yet..
-- 
#ken	P-)}

Ken Coar, Sanagendamgagwedweinini  http://Ken.Coar.Org/
Author, developer, opinionist      http://Apache-Server.Com/

"Millennium hand and shrimp!"


Re: testing apache 1.3 on windows

Posted by Geoffrey Young <ge...@modperlcookbook.org>.

Rodent of Unusual Size wrote:
> where does the perl framework get the -D APACHEn value? 

it all boils down to TestConfigParse::httpd_version()

>  i'm trying
> to run it against an installation of 1.3 on windows, and it keeps
> varfing by passing '-p' to the 1.3 apxs.pl.  the same line shows
> '-D APACHE2' so i'm suspecting it has simply made the wrong choice
> of arguments.

that (or similar foo) will happen when you try to test first against 2.0 and
then against 1.3, regardless of win32 vs unix.  at least that's been my
experience.

try first removing $HOME/.apache-test and see if that helps.  if so, just
introduced into cvs yesterday was $ENV{APACHE_TEST_NO_STICKY_PREFERENCES}
which, if true, attempts to suppress any and all influence from prior runs.

HTH

--Geoff