AW: [mp2] Content-Length: 0 / Location:

2004-08-05 Thread Denis Banovic
Hi!


I have following config:

Apache:

PerlResponseHandler ModPerl::Registry
AddHandler perl-script .pl


Perl script:

#!/usr/bin/perl
print Location: http://www.mydomain.at\n\n;;



Output with headers:

HTTP/1.1 200 OK
Connection: close
Date: Thu, 05 Aug 2004 08:59:59 GMT
Server: Apache/2.0.46 (Red Hat)
Content-Type: text/plain; charset=ISO-8859-1
Client-Date: Thu, 05 Aug 2004 08:59:45 GMT
Client-Response-Num: 1
Client-Transfer-Encoding: chunked

Location: http://www.mydomain.at


What am I doing wrong?

I just want him to make a Redirect when somebody calls my script.

I've tried PerlSendHeader Off and On, nothing helped.


Thanks

Denis






-Ursprüngliche Nachricht-
Von: Geoffrey Young [mailto:[EMAIL PROTECTED] 
Gesendet: Mittwoch, 4. August 2004 14:44
An: Denis Banovic
Cc: [EMAIL PROTECTED]
Betreff: Re: [mp2] Content-Length: 0




Denis Banovic wrote:
 Hi!
 
 I just got a new Server with apache 2.046 and mp2
 
 I have some problems when running under mod_perl, that Content-Length: 0 always 
 shows 0 Byte
 
 When running under cgi, content length is there.
 
 Has someone had something similar?
 
 Do I have to take care of the content_length?

no, apache automatically computes the content length of the request for you
(or does not if it finds that a C-L header is not required) so you no longer
should handle this yourself.

--Geoff

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html



Perl not allowed here

2004-08-05 Thread Evert Meulie
Hi everyone!

When trying to start Apache I get:
Syntax error on line 376 of
/usr/local/apache-freeside/conf/Apache-Freeside.conf:
Perl not allowed here

The relevant paragraph from Apache-Freeside.conf:
PerlModule HTML::Mason
Directory /usr/local/apache/htdocs/freeside-mason
Files ~ (\.cgi)
AddHandler perl-script .cgi
PerlHandler HTML::Mason
/Files
Perl
require /usr/local/etc/freeside/handler.pl;
/Perl
/Directory 

(the 'require' line is 376).

This paragraph I've cut/pasted from:
http://www.sisd.com/freeside/docs/install.html


 My apache version is: Apache/2.0.50 (Unix) mod_perl/1.99_14 Perl/v5.8.4
DAV/2



Is there anyone out there who can enlighten me? I'm lost...   :-/



Regards,
 Evert



-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html



AW: AW: [mp2] Content-Length: 0 / Location:

2004-08-05 Thread Denis Banovic
Hi Geoffrey!

Thanks, that works fine.

It would be interresting to know how to do this in mod_perl style!


I have a Output object which captures the whole output.

On Destroy i'm doing something like this:


my @header = split(/\n/, $class-http_header);
foreach (@header) {
 $_ =~ /^(.*?)\: (.*?)$/s;
$class-{r}-headers_out-add($1,$2);  
  
}

There is also a function where I can set the Location header.

The only problem ist, that when I put this all together, there is a
Content-length: 0

and the redirect doesn't work. I have no Idea where this Content-length: 0 is comming 
from, I think it's from apache.

I've followed the last discussion about the C-L but could not find a sollution for it.

I wish everyone a nice weekend, 
CU in Zürich, the biggest party in Europe this weekend!

http://www.streetparade.ch

THINK THE WEB WAY.
---
NCM - NET COMMUNICATION MANAGEMENT GmbH
---[  Denis Banovic - CTO
mailto:[EMAIL PROTECTED]
---[  Mühlstrasse 4a
  AT - 5023 Salzburg
  Tel. 0662 / 644 688
---[  Fax: 0662 / 644 688 - 88 
  http://www.ncm.at
---


-Ursprüngliche Nachricht-
Von: Geoffrey Young [mailto:[EMAIL PROTECTED] 
Gesendet: Donnerstag, 5. August 2004 14:42
An: Denis Banovic
Cc: [EMAIL PROTECTED]
Betreff: Re: AW: [mp2] Content-Length: 0 / Location:



 What am I doing wrong?
 
 I just want him to make a Redirect when somebody calls my script.
 
 I've tried PerlSendHeader Off and On, nothing helped.

I don't have compat mode enabled, but

  PerlOptions +ParseHeaders

worked just fine for me:

Alias /perl-bin /apache/2.0/prefork/perl-5.8.5/cgi-bin
Location /perl-bin
  SetHandler perl-script
  PerlResponseHandler ModPerl::Registry
  Options +ExecCGI
  PerlOptions +ParseHeaders
/Location

HTH

--Geoff

--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html



Re: AW: AW: [mp2] Content-Length: 0 / Location:

2004-08-05 Thread Geoffrey Young


Denis Banovic wrote:
 Hi Geoffrey!
 
 Thanks, that works fine.
 
 It would be interresting to know how to do this in mod_perl style!
 
 
 I have a Output object which captures the whole output.

sounds like you might want to consider writing a PerlOutputFilterHandler
instead.

 
 On Destroy i'm doing something like this:
   
 
   my @header = split(/\n/, $class-http_header);
   foreach (@header) {
$_ =~ /^(.*?)\: (.*?)$/s;
   $class-{r}-headers_out-add($1,$2);  
   
   }
 
 There is also a function where I can set the Location header.
 
 The only problem ist, that when I put this all together, there is a
 Content-length: 0

Apache will calculate the C-L header for you, so you pretty much don't need
to worry about it.  in fact, unless you _know_ that it is messing things up
for you, just forget about it altogether.

 
 and the redirect doesn't work. I have no Idea where this Content-length: 0 is 
 comming from, I think it's from apache.

it sounds like you are doing some funky stuff, capturing output and doing
stuff on DESTROY.  as mentioned in the pervious thread, apache will send the
headers along if you somehow pass a flush bucket along (either via a direct
API call or if your print buffer gets sufficiently large or somesuch).  so,
what you need to be careful of is printing Location:... after the headers
are sent, though if you are adding Location to $r-headers_out that
shouldn't be an issue (and neither should you need +ParseHeaders IIRC).

anyway, this is all kind of conjecture on my part - I can't really do much
with redirect doesn't work without lots more information, especially since
you can get it to work with a standard Registry setup.  so, if you suspect a
bug it is best to follow the instructions at http://perl.apache.org/bugs/,
specifically the part about creating a self-contained Apache-Test
environment as described in Problem Description.  you may find that in
stripping down your code to create the smallest test case possible you will
figure it out.

HTH

--Geoff

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html



Re: How to use a particular version of perl

2004-08-05 Thread Arnaud Blancher
Thanks Tom and Perrin
I ok now
I decide mysefl to update to fedora2.
And add a perl 5.8.5 in addition of the official perl 5.8.3  from my 
fedora.
in more, i have taken the last apache 2.50 and  mod_perl 1.99_14
and reintall all my perl module.

Tom Schindl wrote:
Hi,
Well now you need to recompile mod_perl using the new perl you 
compiled your own,
I also recommend that you install your own apache. This way you can 
use the latest versions
with the fewest bugs. If you are running into problems it is most 
likely that people will help you
when running the latest versions.

Download mod_perl from perl.apache.org and apache from 
httpd.apache.org and simply follow
the INSTALL-File coming with mp2 you'll see it's not a mystery to get 
up your own httpd/perl. If you want
mp2 to be compiled with your own perl instead of writing

8--
perl Makefile.PL  make  make test
8--
do
8--
/usr/local/bin/perl Makefile.PL  make  make test
8--
Maybe you also have to install some more cpan-modules in front of 
mod_perl but it will perl Makefile.PL will tell you about
that. You can e.g. use the cpan-shell to install the missing 
prerequesits, and do not built as root as I think the test-suite has to
be run as an non-root user.

Tom
Arnaud Blancher wrote:
Hi,
I want try to use perl 5.8.5 with MP2,
in my system (fedora core 1) i have perl 5.8.3 ( the last rpm package)
In have compile the last perl in other directory ( usr/local/bin/perl )
How could i tell MP to use this version of perl ?
(i havent found it in MP2' doc)
thanks
Arnaud




--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: AuthenNTLM and login

2004-08-05 Thread Arnaud Blancher

I don't think that a modification to the module would be the best 
solution here.
 It seems that the best solution is going to be at the directory services
cluster.

If we were to allow the AuthenNTLM module to DECLINE and use another 
alternative
authentication method, then you will need to mirror the AD passwords 
in some
other location...  Is it possible to bring up a Backup Directory services
server outside of the cluster?  You could then specify the backup as the
failover server, and authentication would always failover there, if 
the main
cluster was unreachable.  If you can't have a backup server, then you 
would
need to choose another authentication scheme, (such as LDAP, NIS, etc.),
I'll use an openldap server or a local bdd in this case.
BUT i wish get the login (and password)
without demand again to user (they must log only once on their window)
When the AD is  down, do you know a way to get login (and pasword) ?
Thank's again.
Arnaud
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Trouble installing Apache::VMonitor

2004-08-05 Thread Nathan L. Kugland
Hi all,
I've hit a problem with installing Apache::VMonitor for apache 1.3.31 
and mp 1.29:

[  error] configure() has failed:
find_apache_module: module name argument is required at 
/usr/lib/perl5/site_perl/5.8.1/i386-linux-thread-multi/Apache/TestConfig.pm 
line 702.

Some googling of the error string didn't turn up anything useful. Prior 
to that I:

-Installed gnome-libs-devel and libgtop-devel
-Installed Apache::Scoreboard 0.10 and GTop from CPAN
Any thoughts?
Thanks,
Nathan

Full CPAN output:
---
 CPAN.pm: Going to build S/ST/STAS/Apache-VMonitor-2.0.tar.gz
Goind to build against mod_perl/1.29 Perl/5.008001
[   info] generating script t/TEST
Checking if your kit is complete...
Looks good
Writing Makefile for Apache::VMonitor
cp lib/Apache/VMonitor.pm blib/lib/Apache/VMonitor.pm
Manifying blib/man3/Apache::VMonitor.3pm
 /usr/bin/make  -- OK
Running make test
/usr/bin/perl -Iblib/arch -Iblib/lib \
t/TEST -clean
[warning] setting ulimit to allow core files
ulimit -c unlimited; /usr/bin/perl 
/root/.cpan/build/Apache-VMonitor-2.0/t/TEST -clean
APACHE_TEST_PORT= APACHE_TEST_HTTPD= APACHE_TEST_APXS= APACHE_TEST_USER= 
APACHE_TEST_GROUP= \
/usr/bin/perl -Iblib/arch -Iblib/lib \
t/TEST -bugreport -verbose=0
[warning] setting ulimit to allow core files
ulimit -c unlimited; /usr/bin/perl 
/root/.cpan/build/Apache-VMonitor-2.0/t/TEST -bugreport -verbose=0
[  error] configure() has failed:
find_apache_module: module name argument is required at 
/usr/lib/perl5/site_perl/5.8.1/i386-linux-thread-multi/Apache/TestConfig.pm 
line 702.

[warning] forcing Apache::TestConfig object save
[warning] run 't/TEST -clean' to clean up before continuing
make: *** [run_tests] Error 1
 /usr/bin/make test -- NOT OK
Running make install
 make test had returned bad status, won't install without force
--
Nathan L. Kugland
[EMAIL PROTECTED]
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: make test hangs

2004-08-05 Thread William Fulmer
I was trying to compile Apache/2.0.50 mod_perl/1.99_14 Perl/v5.6.2 under
HP-UX with HP's ANSI C compiler.  Everything compiled fine, but during
make test, any test that tried to do a stat on __FILE__ would hang. 
Running the same type of code under perl worked fine.  I had previously
compiled mod_perl/1.99_14 with perl 5.8.2 and that worked fine.  I had
some other priorities at work that prevented me from pursuing this, so I
am just getting back to it.

The problem turned out to be related to my perl install, but I don't
understand why.  The thing that made it work was turning off large file
support in my perl 5.6.2 install.  The reason that I don't understand is
that my perl 5.8.2 install had large file support enabled and the
mod_perl tested fine (which is to say test completes with errors without
hanging).  I'm not even sure whether this is a problem with perl 5.6.2
or mod_perl.  Any insight on this?

---
Will Fulmer
Database Administrator
Northampton Community College
Bethlehem, PA

 Stas Bekman [EMAIL PROTECTED] 5/6/2004 1:09:52 AM 
William Fulmer wrote:
Ouch, William, are you aware that you've sent a 1MB attachment to 
a public mailing list, potentially causing lots of problems to
people
with limited account sizes and slow dialup access? Please don't that

in the future. If you want to show some big file, upload it 
somewhere and post a link to it.
 
 
 Sorry.  I didn't look at the size before I sent it.  Will be more
 carefull in the future.  

Cool!

 The end of your trace is:
 
 
 open(/usr/lib/nls/loc/locales.2/C, O_RDONLY, 0) 
 .. ERR#2 ENOENT
 time(0x7f71cd0c) 
 ...
=
 1083792204
 sigsetstatemask(0x17, NULL, 2139033120) 
  = 0
 write(2, N o   - M   a l l o w e d   w h .., 36) 

Aha! It says -M is not allowed. (stat __FILE__)[9]; is the same as

   -M __FILE__

 write(2, p e r l _ p a r s e :   N o   s .., 38) 

this perl_parse() thing is interesting. It writes to STDERR that
perl_parse() 
has failed. BTW, any difference if you change your code to be:

my $file = /tmp;
my $mtime = (stat $file)[9];

and:

my $file = __FILE__;
my $mtime = (stat $file)[9];

and:

-M __FILE__;

and

-M /tmp;


 
but I see that the process is exiting. Is it still hanging? Or is it
 
 the 
 
client process?
 
 
 Yes it did exit when I ran it this way.  May be a fluke with my
compile
 of tusc however.  When I run it without the tusc comand (ie
 /usr/opt/httpd-2.0.49/bin/httpd -d t -f conf/httpd.conf  -DAPACHE2
 -DONE_PROCESS -DNO_DETATCH) it hangs.  Helpful of it, yes?

It's possible. I've seen processes exiting when attaching to or
detaching from 
them with strace. another way to check where the process is hanging is
to 
attach to it with gdb (using -p $pid) and then run 'bt'.

I see that you also run with mod_perl tracing enabled, you may want 
to turn it off to make the strace output smaller.
 
 
 I'll do that in the morning.  It may help for me to mention that I'm
 using HP's ANSI C compiler for the compiles.  The version is quite
old
 (enough so that I cannot apply the patches listed on the
troubleshooting
 web page).  May be a useful exercise to update my compiler and try
 again.  May take a while as I have to Weedle CODEWORDS out of HP
 support to accomplish this.  Let me also say that I was able to
compile
 and run mod_perl-1.99_12 with this same install of apache and an
install
 of perl 5.8.2 with the same basic config options as my perl 5.6.2. 
I
 think I'll try compiling this version with the 5.8.2 perl and see if
 that works better. 

What's important is that you compile perl, apache and mod_perl with the
same 
compiler. Though I'm not familiar with HP's ANSI C compiler, so it's
possible 
that it's a problem there.

__
Stas BekmanJAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide --- http://perl.apache.org 
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com 
http://modperlbook.org http://apache.org   http://ticketmaster.com 

-- 
Report problems: http://perl.apache.org/bugs/ 
Mail list info: http://perl.apache.org/maillist/modperl.html 
List etiquette: http://perl.apache.org/maillist/email-etiquette.html 


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html



Re: make test hangs

2004-08-05 Thread Stas Bekman
William Fulmer wrote:
I was trying to compile Apache/2.0.50 mod_perl/1.99_14 Perl/v5.6.2 under
HP-UX with HP's ANSI C compiler.  Everything compiled fine, but during
make test, any test that tried to do a stat on __FILE__ would hang. 
Running the same type of code under perl worked fine. 
Was it really the same under perl? e.g. mod_perl's test suite runs with 
-T. any difference if you add -T to your perl test/remove -T from 
mod_perl's test suite?

I had previously
compiled mod_perl/1.99_14 with perl 5.8.2 and that worked fine.  I had
some other priorities at work that prevented me from pursuing this, so I
am just getting back to it.
The problem turned out to be related to my perl install, but I don't
understand why.  The thing that made it work was turning off large file
support in my perl 5.6.2 install.  The reason that I don't understand is
that my perl 5.8.2 install had large file support enabled and the
mod_perl tested fine (which is to say test completes with errors without
hanging).  I'm not even sure whether this is a problem with perl 5.6.2
or mod_perl.  Any insight on this?
I don't know. It's possible. I've checked your previous Apache config 
report and it doesn't seem to have LFS-support enabled. So may be that 
was the problem? Perl had it, but not Apache? Can you send a new report 
to see the up-to-date config?
http://perl.apache.org/docs/2.0/user/help/help.html#Important_Information

--
__
Stas BekmanJAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide --- http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: Trouble installing Apache::VMonitor

2004-08-05 Thread Stas Bekman
Nathan L. Kugland wrote:
Hi all,
I've hit a problem with installing Apache::VMonitor for apache 1.3.31 
and mp 1.29:

[  error] configure() has failed:
find_apache_module: module name argument is required at 
/usr/lib/perl5/site_perl/5.8.1/i386-linux-thread-multi/Apache/TestConfig.pm 
line 702.

Some googling of the error string didn't turn up anything useful. Prior 
to that I:

-Installed gnome-libs-devel and libgtop-devel
-Installed Apache::Scoreboard 0.10 and GTop from CPAN
Any thoughts?
well, it's not a problem of installing A-VM, but its test suite. Sounds 
like some problem with Apache-Test. Which A-T version are you using?

perl -MApache::Test -le 'print Apache::Test-VERSION'
try the latest one.
While we figure out what the problem is, go ahead and install A-VM. Use 
'force install' in CPAN shell to ignore the test's failure.

--
__
Stas BekmanJAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide --- http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: Perl not allowed here

2004-08-05 Thread Philippe M. Chiasson

Stas Bekman wrote:
Evert Meulie wrote:
Hi everyone!
When trying to start Apache I get:
Syntax error on line 376 of
/usr/local/apache-freeside/conf/Apache-Freeside.conf:
Perl not allowed here
The relevant paragraph from Apache-Freeside.conf:
PerlModule HTML::Mason
Directory /usr/local/apache/htdocs/freeside-mason
Files ~ (\.cgi)
AddHandler perl-script .cgi
PerlHandler HTML::Mason
/Files
Perl
require /usr/local/etc/freeside/handler.pl;
/Perl
/Directory 

(the 'require' line is 376).
This paragraph I've cut/pasted from:
http://www.sisd.com/freeside/docs/install.html
My apache version is: Apache/2.0.50 (Unix) mod_perl/1.99_14 Perl/v5.8.4
DAV/2

Is there anyone out there who can enlighten me? I'm lost...   :-/

Evert, just take:
  Perl
  require /usr/local/etc/freeside/handler.pl;
  /Perl
out of the directory container and it will work.
Philippe, has the allowed placement of Perl sections changed in mp2?
For now, Perl sections are still limited to server scope. I have a patch
to open that up to OR_ALL (Location .htaccess and all) but I am not sure
of exactly what behaviour a user would expect from a Perl section in a
Location  container. For example
Location /foo
  Perl
$Global::SomeVar = 'foo';
  /Perl
/Location
Location /bar
  Perl
$Global::SomeVar = 'bar';
  /Perl
/Location
Would certainly _not_ behave like people might expect. See what I mean ?
--

Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5
http://gozer.ectoplasm.org/ F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5


signature.asc
Description: OpenPGP digital signature


Re: AuthenNTLM and login

2004-08-05 Thread Shannon Eric Peevey
Quoting Arnaud Blancher [EMAIL PROTECTED]:
I'll use an openldap server or a local bdd in this case.
BUT i wish get the login (and password)
without demand again to user (they must log only once on their window)
When the AD is  down, do you know a way to get login (and pasword) ?
Not that I know of...  You might be able to manipulate it into openldap using
Net::LDAP, but that is for another list ;)  I would check out the homepage at:
http://ldap.perl.org/
--
Shannon Eric Peevey
President - EriKin Corporation
[EMAIL PROTECTED]
(940) 391-6777
http://www.erikin.com

This message was sent using IMP, the Internet Messaging Program.
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: Perl not allowed here

2004-08-05 Thread Geoffrey Young

 out of the directory container and it will work.
 
 Philippe, has the allowed placement of Perl sections changed in mp2?

yes.

  http://marc.theaimsgroup.com/?l=apache-modperl-devm=105370080722053w=2

but I'm sure that we have talked about it since then as well.

--Geoff

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html



Re: Trouble installing Apache::VMonitor

2004-08-05 Thread Nathan L. Kugland
Stas,
I'm using Apache::Test 1.12, which appears to be the latest available 
from CPAN.

Force installing appears to have worked, so I'm back in business. Thanks!
Cheers,
Nathan
Stas Bekman wrote:
Nathan L. Kugland wrote:
Hi all,
I've hit a problem with installing Apache::VMonitor for apache 1.3.31 
and mp 1.29:

[  error] configure() has failed:
find_apache_module: module name argument is required at 
/usr/lib/perl5/site_perl/5.8.1/i386-linux-thread-multi/Apache/TestConfig.pm 
line 702.

Some googling of the error string didn't turn up anything useful. 
Prior to that I:

-Installed gnome-libs-devel and libgtop-devel
-Installed Apache::Scoreboard 0.10 and GTop from CPAN
Any thoughts?

well, it's not a problem of installing A-VM, but its test suite. 
Sounds like some problem with Apache-Test. Which A-T version are you 
using?

perl -MApache::Test -le 'print Apache::Test-VERSION'
try the latest one.
While we figure out what the problem is, go ahead and install A-VM. 
Use 'force install' in CPAN shell to ignore the test's failure.

--
Nathan L. Kugland
[EMAIL PROTECTED]
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: Trouble installing Apache::VMonitor

2004-08-05 Thread Stas Bekman
Nathan L. Kugland wrote:
Stas,
I'm using Apache::Test 1.12, which appears to be the latest available 
from CPAN.

Force installing appears to have worked, so I'm back in business. Thanks!
Good. And I was able to reproduce the problem you have reported. So I'll 
take care of it.

--
__
Stas BekmanJAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide --- http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: Perl not allowed here

2004-08-05 Thread Philippe M. Chiasson

Stas Bekman wrote:
Philippe M. Chiasson wrote:
[...]
Philippe, has the allowed placement of Perl sections changed in mp2?
For now, Perl sections are still limited to server scope. I have a patch
to open that up to OR_ALL (Location .htaccess and all) but I am not sure
of exactly what behaviour a user would expect from a Perl section in a
Location  container. For example
Location /foo
 Perl
   $Global::SomeVar = 'foo';
 /Perl
/Location
Location /bar
 Perl
   $Global::SomeVar = 'bar';
 /Perl
/Location
Would certainly _not_ behave like people might expect. See what I mean ?

True. I suppose in mp1 it was just running them all at the server 
startup, having the latest value override the previous, isn't it?
Yup!
So we should either keep it as it was in mp1, or make it DWIM. If we 
keep the mp1 behavior we ought to allow it everywhere, but document that 
it's not DWIM. How hard would it be to make it DWIM? I suppose one will 
need to stash code-refs into the dir/r struct and run them at request 
time, which won't work across threads, so the source will need to be 
stored. doesn't seem very effective to me. 
Yes, exactly! If it were a simple matter to get them to run per directory/
location, I might have tried it. It just doesn't seem like it would be worth
spending time on implementing such a feature that, really, would just be
misusing what Perl sections were for.
One is ought to use the 
PerlHeaderParserHandler to accomplish DWIM in the example above.
Yes, I was just making a bad example of what someone _might_ do.
So I think it's the most sane to keep mp1's behavior. i.e.:
- allow Perl everywhere
Yes, and like I pointed out before, they would be executed for every
requests in the .htaccess cases.
- document that it's not DWIM (i.e. everythings is run at the server 
startup)
+1
--

Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5
http://gozer.ectoplasm.org/ F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5


signature.asc
Description: OpenPGP digital signature


Re: Perl not allowed here

2004-08-05 Thread Stas Bekman
Philippe M. Chiasson wrote:
Hmm, I think we ought to start with:
- PerlModule, PerlRequire, Perl in .htaccess is missing
   http://marc.theaimsgroup.com/?t=10537008871r=1w=2
   Owner: geoff

Perl sections in .htaccess would be executed on every request, so that's
quite DWIM. In other containers, like Location and others, on server 
startup
only, so not DWIM at all.
As long as this is clearly documented, I think it's fine.
--
__
Stas BekmanJAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide --- http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: make test hangs

2004-08-05 Thread William Fulmer
Here's the report:

-8-- Start Bug Report 8--
1. Problem Description:

  [DESCRIBE THE PROBLEM HERE]

2. Used Components and their Configuration:

*** mod_perl version 1.9914

*** using lib/Apache/BuildConfig.pm
*** Makefile.PL options:
  MP_APXS= /usr/opt/httpd-2.0.50/bin/apxs
  MP_COMPAT_1X   = 1
  MP_GENERATE_XS = 1
  MP_LIBNAME = mod_perl
  MP_USE_DSO = 1
  MP_USE_STATIC  = 1


*** /usr/opt/httpd-2.0.50/bin/httpd -V
Server version: Apache/2.0.50
Server built:   Jul 15 2004 17:03:42
Server's Module Magic Number: 20020903:8
Architecture:   32-bit
Server compiled with
 -D APACHE_MPM_DIR=server/mpm/prefork
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_SYSVSEM_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D HTTPD_ROOT=/usr/opt/httpd-2.0.50
 -D SUEXEC_BIN=/usr/opt/httpd-2.0.50/bin/suexec
 -D DEFAULT_PIDLOG=logs/httpd.pid
 -D DEFAULT_SCOREBOARD=logs/apache_runtime_status
 -D DEFAULT_LOCKFILE=logs/accept.lock
 -D DEFAULT_ERRORLOG=logs/error_log
 -D AP_TYPES_CONFIG_FILE=conf/mime.types
 -D SERVER_CONFIG_FILE=conf/httpd.conf


*** /usr/opt/perl-5.6.2/bin/perl -V
Summary of my perl5 (revision 5.0 version 6 subversion 2)
configuration:
  Platform:
osname=hpux, osvers=11.11, archname=PA-RISC2.0
uname='hp-ux cars-l b.11.11 u 9000800 134921527 unlimited-user
license '
config_args='-Accflags=+Z -Accflags=-DPERL_POLLUTE
-Dprefix=/usr/opt/perl-5.6.2 -Doptimize=-g
-Dloclibpth=/usr/opt/perl-5.6.2/lib /lib /usr/lib /usr/ccs/lib
/usr/opt/libiconv-1.9.1/lib /usr/opt/readline-4.3/lib
/usr/opt/openssl-0.9.7d/lib /usr/opt/ncurses-5.3/lib
/usr/opt/gettext-0.12.1/lib /usr/opt/jpeg.v6b/lib /opt/informix/lib
/usr/opt/zlib-1.1.4/lib /usr/opt/db-4.1.25/lib /usr/opt/expat-1.95.6/lib
/usr/opt/gzip-1.2.4/lib /usr/opt/freetds-0.61/lib
/usr/opt/libpng-1.2.6rc1/lib /usr/opt/bzip2-1.0.2/lib
/usr/opt/gdbm-1.8.3/lib /usr/opt/freetype-2.1.5/lib
/usr/opt/gd-2.0.15/lib /usr/opt/tiff-v3.5.7/lib
-Dlocincpth=/usr/opt/perl-5.6.2/include /include /usr/include
/usr/ccs/include /usr/opt/libiconv-1.9.1/include
/usr/opt/readline-4.3/include /usr/opt/openssl-0.9.7d/include
/usr/opt/ncurses-5.3/include /usr/opt/gettext-0.12.1/include
/usr/opt/jpeg.v6b/include /opt/informix/incl /usr/opt/zlib-1.1.4/include
/usr/opt/db-4.1.25/include /usr/opt/expat-1.95.6/include /usr/opt/gzi!
 p-1.2.4/include /usr/opt/freetds-0.61/include
/usr/opt/libpng-1.2.6rc1/include /usr/opt/bzip2-1.0.2/include
/usr/opt/gdbm-1.8.3/include /usr/opt/freetype-2.1.5/include
/usr/opt/gd-2.0.15/include /usr/opt/tiff-v3.5.7/include
-Dcc=/opt/ansic/bin/cc -Dlibs=-lnsl -lnm -lndbm -lgdbm -ldb -lmalloc
-ldld -lm -lcrypt -lsec -lpthread -lc -lcl -e'
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef
usemultiplicity=undef
useperlio=undef d_sfio=undef uselargefiles=undef usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
  Compiler:
cc='/opt/ansic/bin/cc', ccflags ='-Ae -D_HPUX_SOURCE
-Wl,+vnocompatwarnings +Z -DPERL_POLLUTE -DDEBUGGING
-I/usr/opt/libiconv-1.9.1/include -I/usr/opt/readline-4.3/include
-I/usr/opt/openssl-0.9.7d/include -I/usr/opt/ncurses-5.3/include
-I/usr/opt/gettext-0.12.1/include -I/usr/opt/jpeg.v6b/include
-I/opt/informix/incl -I/usr/opt/zlib-1.1.4/include
-I/usr/opt/db-4.1.25/include -I/usr/opt/expat-1.95.6/include
-I/usr/opt/freetds-0.61/include -I/usr/opt/libpng-1.2.6rc1/include
-I/usr/opt/bzip2-1.0.2/include -I/usr/opt/gdbm-1.8.3/include
-I/usr/opt/freetype-2.1.5/include -I/usr/opt/gd-2.0.15/include
-I/usr/opt/tiff-v3.5.7/include',
optimize='-g',
cppflags='-Ae -D_HPUX_SOURCE -Wl,+vnocompatwarnings +Z
-DPERL_POLLUTE -DDEBUGGING -I/usr/opt/libiconv-1.9.1/include
-I/usr/opt/readline-4.3/include -I/usr/opt/openssl-0.9.7d/include
-I/usr/opt/ncurses-5.3/include -I/usr/opt/gettext-0.12.1/include
-I/usr/opt/jpeg.v6b/include -I/opt/informix/incl
-I/usr/opt/zlib-1.1.4/include -I/usr/opt/db-4.1.25/include
-I/usr/opt/expat-1.95.6/include -I/usr/opt/freetds-0.61/include
-I/usr/opt/libpng-1.2.6rc1/include -I/usr/opt/bzip2-1.0.2/include
-I/usr/opt/gdbm-1.8.3/include -I/usr/opt/freetype-2.1.5/include
-I/usr/opt/gd-2.0.15/include -I/usr/opt/tiff-v3.5.7/include'
ccversion='B.11.11.29484.GP', gccversion='', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
d_longlong=define, longlongsize=8, d_longdbl=define,
longdblsize=16
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=4
alignbytes=8, usemymalloc=n, prototype=define
  Linker and Libraries:
ld='/usr/bin/ld', ldflags =' -L/usr/opt/perl-5.6.2/lib -L/lib
-L/usr/lib -L/usr/ccs/lib -L/usr/opt/libiconv-1.9.1/lib
-L/usr/opt/readline-4.3/lib -L/usr/opt/openssl-0.9.7d/lib
-L/usr/opt/ncurses-5.3/lib -L/usr/opt/gettext-0.12.1/lib
-L/usr/opt/jpeg.v6b/lib -L/opt/informix/lib 

RE: ModPerl::Registry: Software caused connection abort

2004-08-05 Thread Jeff Finn
Ok; I have generated a semi-self-contained Apache-test that will produce
this error.

This only happens on an SSL-enabled server

I was't able to get the alarm block working, but we can work around that
by starting the test, sleeping for a minute or so, and then in another
shell getting the url and ctrl-c'ing before the transfer completes.

in one shell
# make test TEST_VERBOSE=1

once the server starts, in another shell:
#  curl -o /tmp/curl.out https://127.0.0.1:8530/handler

here's the apache test file

Jeff

-Original Message-
From: Stas Bekman [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 04, 2004 11:45 PM
To: Jeff Finn
Cc: [EMAIL PROTECTED]
Subject: Re: ModPerl::Registry: Software caused connection abort


Jeff Finn wrote:
 I'm joining this thread a little late, but I just noticed I have a similar
 problem to this with Apache 2.0.49/50 and mp1.99_14.

 I have the server set up for responses to pass thru a filter:

 PerlOutputFilterHandler Apache::FileProtector::output

 When I use curl to access the server and hit ctrl-c during the data xfer,
 I get a message in the error log:

 [Wed Aug 04 22:17:34 2004] [error] [client 192.168.123.32] Software caused
 connection abort at /usr/webstoreit/perl/Apache/FileProtector.pm line
61.\n
 Software caused connection abort.

 I didn't notice this behavior with previous versions of Apache 2.

 i'm not sure how to go about working around this problem, does
 anyone have some suggestions?

Yes, they should be internal to mod_perl. Give us a self contained
Apache-Test test that we can reproduce the problem with and we will find
some good solution for it. Please use:
http://apache.org/~geoff/Apache-Test-skeleton-mp2.tar.gz
As suggested before you should be able to emulate Ctrl-C with alarm
block. Please make it as simple as possible. Thanks.

--
__
Stas BekmanJAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide --- http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


SoftwareCausedConnectionAbortMP2.tar.gz
Description: GNU Zip compressed data
-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html

Re: Perl not allowed here

2004-08-05 Thread Philippe M. Chiasson

Stas Bekman wrote:
Philippe M. Chiasson wrote:

Hmm, I think we ought to start with:
- PerlModule, PerlRequire, Perl in .htaccess is missing
  http://marc.theaimsgroup.com/?t=10537008871r=1w=2
  Owner: geoff

Perl sections in .htaccess would be executed on every request, so that's
quite DWIM. In other containers, like Location and others, on server 
startup
only, so not DWIM at all.

As long as this is clearly documented, I think it's fine.
Unless geoff takes this one, I'll take care of it by tomorrow.
--

Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5
http://gozer.ectoplasm.org/ F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5


signature.asc
Description: OpenPGP digital signature


Re: Perl not allowed here

2004-08-05 Thread Geoffrey Young


Philippe M. Chiasson wrote:

 Unless geoff takes this one, I'll take care of it by tomorrow.

it's all yours :)

--Geoff

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html



Re: Trouble installing Apache::VMonitor

2004-08-05 Thread Stefan Cars
On Thu, 5 Aug 2004, Nathan L. Kugland wrote:

 Hi all,

 I've hit a problem with installing Apache::VMonitor for apache 1.3.31
 and mp 1.29:

 [  error] configure() has failed:
 find_apache_module: module name argument is required at
 /usr/lib/perl5/site_perl/5.8.1/i386-linux-thread-multi/Apache/TestConfig.pm
 line 702.

 Some googling of the error string didn't turn up anything useful. Prior
 to that I:

 -Installed gnome-libs-devel and libgtop-devel
 -Installed Apache::Scoreboard 0.10 and GTop from CPAN

 Any thoughts?

 Thanks,

 Nathan




 Full CPAN output:
 ---
   CPAN.pm: Going to build S/ST/STAS/Apache-VMonitor-2.0.tar.gz

 Goind to build against mod_perl/1.29 Perl/5.008001
 [   info] generating script t/TEST
 Checking if your kit is complete...
 Looks good
 Writing Makefile for Apache::VMonitor
 cp lib/Apache/VMonitor.pm blib/lib/Apache/VMonitor.pm
 Manifying blib/man3/Apache::VMonitor.3pm
   /usr/bin/make  -- OK
 Running make test
 /usr/bin/perl -Iblib/arch -Iblib/lib \
 t/TEST -clean
 [warning] setting ulimit to allow core files
 ulimit -c unlimited; /usr/bin/perl
 /root/.cpan/build/Apache-VMonitor-2.0/t/TEST -clean
 APACHE_TEST_PORT= APACHE_TEST_HTTPD= APACHE_TEST_APXS= APACHE_TEST_USER=
 APACHE_TEST_GROUP= \
 /usr/bin/perl -Iblib/arch -Iblib/lib \
 t/TEST -bugreport -verbose=0
 [warning] setting ulimit to allow core files
 ulimit -c unlimited; /usr/bin/perl
 /root/.cpan/build/Apache-VMonitor-2.0/t/TEST -bugreport -verbose=0
 [  error] configure() has failed:
 find_apache_module: module name argument is required at
 /usr/lib/perl5/site_perl/5.8.1/i386-linux-thread-multi/Apache/TestConfig.pm
 line 702.

 [warning] forcing Apache::TestConfig object save
 [warning] run 't/TEST -clean' to clean up before continuing
 make: *** [run_tests] Error 1
   /usr/bin/make test -- NOT OK
 Running make install
   make test had returned bad status, won't install without force

 --


 Nathan L. Kugland
 [EMAIL PROTECTED]


 --
 Report problems: http://perl.apache.org/bugs/
 Mail list info: http://perl.apache.org/maillist/modperl.html
 List etiquette: http://perl.apache.org/maillist/email-etiquette.html


I have come across a problem installing Apache::VMonitor with Apache
2.0.50 and mod_perl-1.99_14. I saw some old posting regarding this which
suggested that mod_perl wasn't installed properly. I think it is, it's
built from sources and installed properly. What can cause this problem ?


perl Makefile.PL says:

Goind to build against mod_perl/1.9914 Perl/5.008002
[   info] generating script t/TEST
Can't find the mod_perl include dir at
/usr/local/lib/perl5/site_perl/5.8.2/mach/Apache/Build.pm line 1593.


Kind Regards,
Stefan Cars

--
Stefan Cars
Snowfall Communications
http://www.snowfall.se
Tel: +46 (0)18 430 80 50 - Direct: +46 (0)18 430 80 51
Mobile: +46 (0)708 44 36 00 - Fax: +46 (0)708 44 36 04

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html



Re: Trouble installing Apache::VMonitor

2004-08-05 Thread Stas Bekman
Stefan Cars wrote:
[...]
I have come across a problem installing Apache::VMonitor with Apache
2.0.50 and mod_perl-1.99_14. I saw some old posting regarding this which
suggested that mod_perl wasn't installed properly. I think it is, it's
built from sources and installed properly. What can cause this problem ?
I think you may have installed mp2 w/o using MP_APXS, as explained here:
http://perl.apache.org/docs/2.0/user/intro/start_fast.html#Installation
It's not an Apache::VMonitor problem, but a mod_perl's one. We need to 
improve diagnostics. The patch below attempts to do that.

perl Makefile.PL says:
Goind to build against mod_perl/1.9914 Perl/5.008002
[   info] generating script t/TEST
Can't find the mod_perl include dir at
/usr/local/lib/perl5/site_perl/5.8.2/mach/Apache/Build.pm line 1593.
Stefan, please follow the guidelines on bug submitting 
http://perl.apache.org/bugs/ as we need to know how your mp2 was built.

Also please apply this patch against:
/usr/local/lib/perl5/site_perl/5.8.2/mach/Apache/Build.pm
and try again, show us what the new error message will be emitted.
Index: lib/Apache/Build.pm
===
RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
retrieving revision 1.166
diff -u -r1.166 Build.pm
--- lib/Apache/Build.pm 1 Aug 2004 19:44:00 -   1.166
+++ lib/Apache/Build.pm 5 Aug 2004 23:28:07 -
@@ -81,7 +81,7 @@
 my $include_dir = $self-apxs(-q = 'INCLUDEDIR');
-unless (-e $include_dir) {
+unless (-d $include_dir) {
 return include/ directory not found in $prefix;
 }
@@ -157,11 +157,19 @@
 }
 }
+# only during mod_perl build we may guess the locations of things
+# after the build we need apxs, since the source will be gone, by
+# that time
 unless ($apxs) {
-my $prefix = $self-{MP_AP_PREFIX} || ;
-return '' unless -d $prefix and $is_query;
-my $val = $apxs_query{$_[1]};
-return defined $val ? ($val ? $prefix/$val : $prefix) : ;
+if (IS_MOD_PERL_BUILD) {
+my $prefix = $self-{MP_AP_PREFIX} || ;
+return '' unless -d $prefix and $is_query;
+my $val = $apxs_query{$_[1]};
+return defined $val ? ($val ? $prefix/$val : $prefix) : ;
+}
+else {
+die can't proceed without -apxs;
+}
 }
 my $devnull = devnull();
@@ -1667,12 +1675,14 @@
 my $ap_inc = $self-apxs('-q' = 'INCLUDEDIR');
 if ($ap_inc  -d $ap_inc) {
 push @inc, $ap_inc;
-} else {
-# this is fatal
-die Can't find the mod_perl include dir;
+return [EMAIL PROTECTED];
 }
-return [EMAIL PROTECTED];
+# this is fatal
+my $reason = $ap_inc
+? path $ap_inc doesn't exist
+: apxs -q INCLUDEDIR didn't return a value;
+die Can't find the mod_perl include dir (reason: $reason);
 }
 my $src = $self-dir;
--
__
Stas BekmanJAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide --- http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: Trouble installing Apache::VMonitor

2004-08-05 Thread Stefan Cars
Hi!

You are correct. I did compile it with MP_APXS and it worked! Thanks!

Kind Regards,
Stefan Cars


On Thu, 5 Aug 2004, Stas Bekman wrote:

 Stefan Cars wrote:
 [...]
  I have come across a problem installing Apache::VMonitor with Apache
  2.0.50 and mod_perl-1.99_14. I saw some old posting regarding this which
  suggested that mod_perl wasn't installed properly. I think it is, it's
  built from sources and installed properly. What can cause this problem ?

 I think you may have installed mp2 w/o using MP_APXS, as explained here:
 http://perl.apache.org/docs/2.0/user/intro/start_fast.html#Installation

 It's not an Apache::VMonitor problem, but a mod_perl's one. We need to
 improve diagnostics. The patch below attempts to do that.

  perl Makefile.PL says:
 
  Goind to build against mod_perl/1.9914 Perl/5.008002
  [   info] generating script t/TEST
  Can't find the mod_perl include dir at
  /usr/local/lib/perl5/site_perl/5.8.2/mach/Apache/Build.pm line 1593.

 Stefan, please follow the guidelines on bug submitting
 http://perl.apache.org/bugs/ as we need to know how your mp2 was built.

 Also please apply this patch against:
 /usr/local/lib/perl5/site_perl/5.8.2/mach/Apache/Build.pm

 and try again, show us what the new error message will be emitted.

 Index: lib/Apache/Build.pm
 ===
 RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
 retrieving revision 1.166
 diff -u -r1.166 Build.pm
 --- lib/Apache/Build.pm   1 Aug 2004 19:44:00 -   1.166
 +++ lib/Apache/Build.pm   5 Aug 2004 23:28:07 -
 @@ -81,7 +81,7 @@

   my $include_dir = $self-apxs(-q = 'INCLUDEDIR');

 -unless (-e $include_dir) {
 +unless (-d $include_dir) {
   return include/ directory not found in $prefix;
   }

 @@ -157,11 +157,19 @@
   }
   }

 +# only during mod_perl build we may guess the locations of things
 +# after the build we need apxs, since the source will be gone, by
 +# that time
   unless ($apxs) {
 -my $prefix = $self-{MP_AP_PREFIX} || ;
 -return '' unless -d $prefix and $is_query;
 -my $val = $apxs_query{$_[1]};
 -return defined $val ? ($val ? $prefix/$val : $prefix) : ;
 +if (IS_MOD_PERL_BUILD) {
 +my $prefix = $self-{MP_AP_PREFIX} || ;
 +return '' unless -d $prefix and $is_query;
 +my $val = $apxs_query{$_[1]};
 +return defined $val ? ($val ? $prefix/$val : $prefix) : ;
 +}
 +else {
 +die can't proceed without -apxs;
 +}
   }

   my $devnull = devnull();
 @@ -1667,12 +1675,14 @@
   my $ap_inc = $self-apxs('-q' = 'INCLUDEDIR');
   if ($ap_inc  -d $ap_inc) {
   push @inc, $ap_inc;
 -} else {
 -# this is fatal
 -die Can't find the mod_perl include dir;
 +return [EMAIL PROTECTED];
   }

 -return [EMAIL PROTECTED];
 +# this is fatal
 +my $reason = $ap_inc
 +? path $ap_inc doesn't exist
 +: apxs -q INCLUDEDIR didn't return a value;
 +die Can't find the mod_perl include dir (reason: $reason);
   }

   my $src = $self-dir;


 --
 __
 Stas BekmanJAm_pH -- Just Another mod_perl Hacker
 http://stason.org/ mod_perl Guide --- http://perl.apache.org
 mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
 http://modperlbook.org http://apache.org   http://ticketmaster.com

 --
 Report problems: http://perl.apache.org/bugs/
 Mail list info: http://perl.apache.org/maillist/modperl.html
 List etiquette: http://perl.apache.org/maillist/email-etiquette.html


--
Stefan Cars
Snowfall Communications
http://www.snowfall.se
Tel: +46 (0)18 430 80 50 - Direct: +46 (0)18 430 80 51
Mobile: +46 (0)708 44 36 00 - Fax: +46 (0)708 44 36 04

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html



Re: make test hangs

2004-08-05 Thread William Fulmer
The first test it hangs on is t/api/request_rec.  The line of code it
stops on is pretty uncomplicated:
my $mtime = (stat __FILE__)[9]; #line 124

adding the -T under perl doesn't change a thing.  I'm not quite sure
where to remove it for modperl so I haven't tried that.  '

I just realized that the bug report I sent was from the compile the
build without large file support in perl.  

I did recompile apache with large file support sort of.  There's no
configure option to enable it so I added -D_LARGEFILE_SOURCE in the
ccflags.  httpd still doesn't advertise that is supports large files. 
The other thing I notice is that modperl doesn't respect perl's ccflags
(as advertised by perl -V).  It drops the -D_LARGEFILE_SOURCE.  I forced
it in using MP_CCOPTS, but it didn't help.

Let me just clarify things a bit regarding what does and does not work
for make test.

my perl 5.8.2 install with LFS works fine with modperl.  compiles, test
and runs sucessfully.

perl 5.6.2  with LFS hangs in make test.

perl 5.6.2 without LFS finishes make test with errors.

The bug report that I sent earlier was from the  perl 5.6.2 without LFS.

This one is from perl 5.6.2 with LFS.  The apache doesn't advertise LFS
but it was compiled with -D_LARGEFILE_SOURCE:

-8-- Start Bug Report 8--
1. Problem Description:

  [DESCRIBE THE PROBLEM HERE]

2. Used Components and their Configuration:

*** mod_perl version 1.9914

*** using lib/Apache/BuildConfig.pm
*** Makefile.PL options:
  MP_APXS= /usr/opt/httpd-2.0.50/bin/apxs
  MP_COMPAT_1X   = 1
  MP_GENERATE_XS = 1
  MP_LIBNAME = mod_perl
  MP_USE_DSO = 1
  MP_USE_STATIC  = 1


*** /usr/opt/httpd-2.0.50/bin/httpd -V
Server version: Apache/2.0.50
Server built:   Aug  5 2004 16:06:12
Server's Module Magic Number: 20020903:8
Architecture:   32-bit
Server compiled with
 -D APACHE_MPM_DIR=server/mpm/prefork
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_SYSVSEM_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D HTTPD_ROOT=/usr/opt/httpd-2.0.50
 -D SUEXEC_BIN=/usr/opt/httpd-2.0.50/bin/suexec
 -D DEFAULT_PIDLOG=logs/httpd.pid
 -D DEFAULT_SCOREBOARD=logs/apache_runtime_status
 -D DEFAULT_LOCKFILE=logs/accept.lock
 -D DEFAULT_ERRORLOG=logs/error_log
 -D AP_TYPES_CONFIG_FILE=conf/mime.types
 -D SERVER_CONFIG_FILE=conf/httpd.conf


*** /usr/opt/perl-5.6.2/bin/perl -V
Summary of my perl5 (revision 5.0 version 6 subversion 2) configuration:
  Platform:
osname=hpux, osvers=11.11, archname=PA-RISC2.0
uname='hp-ux cars-l b.11.11 u 9000800 134921527 unlimited-user
license '
config_args='-Accflags=+Z -Accflags=-DPERL_POLLUTE
-Dprefix=/usr/opt/perl-5.6.2 -Doptimize=-g
-Dloclibpth=/usr/opt/perl-5.6.2/lib /lib /usr/lib /usr/ccs/lib
/usr/opt/libiconv-1.9.1/lib /usr/opt/readline-4.3/lib
/usr/opt/openssl-0.9.7d/lib /usr/opt/ncurses-5.3/lib
/usr/opt/gettext-0.12.1/lib /usr/opt/jpeg.v6b/lib /opt/informix/lib
/usr/opt/zlib-1.1.4/lib /usr/opt/db-4.1.25/lib /usr/opt/expat-1.95.6/lib
/usr/opt/gzip-1.2.4/lib /usr/opt/freetds-0.61/lib
/usr/opt/libpng-1.2.6rc1/lib /usr/opt/bzip2-1.0.2/lib
/usr/opt/gdbm-1.8.3/lib /usr/opt/freetype-2.1.5/lib
/usr/opt/gd-2.0.15/lib /usr/opt/tiff-v3.5.7/lib
-Dlocincpth=/usr/opt/perl-5.6.2/include /include /usr/include
/usr/ccs/include /usr/opt/libiconv-1.9.1/include
/usr/opt/readline-4.3/include /usr/opt/openssl-0.9.7d/include
/usr/opt/ncurses-5.3/include /usr/opt/gettext-0.12.1/include
/usr/opt/jpeg.v6b/include /opt/informix/incl /usr/opt/zlib-1.1.4/include
/usr/opt/db-4.1.25/include /usr/opt/expat-1.95.6/include
/usr/opt/gzip-1.2.4/include /usr/opt/freetds-0.61/include
/usr/opt/libpng-1.2.6rc1/include /usr/opt/bzip2-1.0.2/include
/usr/opt/gdbm-1.8.3/include /usr/opt/freetype-2.1.5/include
/usr/opt/gd-2.0.15/include /usr/opt/tiff-v3.5.7/include
-Dcc=/opt/ansic/bin/cc -Dlibs=-lnsl -lnm -lndbm -lgdbm -ldb -lmalloc
-ldld -lm -lcrypt -lsec -lpthread -lc -lcl -e -Duselargefiles'
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef
usemultiplicity=undef
useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
  Compiler:
cc='/opt/ansic/bin/cc', ccflags =' -Ae -D_HPUX_SOURCE
-Wl,+vnocompatwarnings +Z -DPERL_POLLUTE -DDEBUGGING
-I/usr/opt/libiconv-1.9.1/include -I/usr/opt/readline-4.3/include
-I/usr/opt/openssl-0.9.7d/include -I/usr/opt/ncurses-5.3/include
-I/usr/opt/gettext-0.12.1/include -I/usr/opt/jpeg.v6b/include
-I/opt/informix/incl -I/usr/opt/zlib-1.1.4/include
-I/usr/opt/db-4.1.25/include -I/usr/opt/expat-1.95.6/include
-I/usr/opt/freetds-0.61/include -I/usr/opt/libpng-1.2.6rc1/include
-I/usr/opt/bzip2-1.0.2/include -I/usr/opt/gdbm-1.8.3/include
-I/usr/opt/freetype-2.1.5/include -I/usr/opt/gd-2.0.15/include
-I/usr/opt/tiff-v3.5.7/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 ',
 

cvs commit: modperl-2.0/lib/Apache Build.pm

2004-08-05 Thread stas
stas2004/08/05 17:54:35

  Modified:lib/Apache Build.pm
  Log:
  improve the diagnostics of failing to find modperl include dir
  
  Revision  ChangesPath
  1.167 +7 -5  modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.166
  retrieving revision 1.167
  diff -u -u -r1.166 -r1.167
  --- Build.pm  1 Aug 2004 19:44:00 -   1.166
  +++ Build.pm  6 Aug 2004 00:54:35 -   1.167
  @@ -81,7 +81,7 @@
   
   my $include_dir = $self-apxs(-q = 'INCLUDEDIR');
   
  -unless (-e $include_dir) {
  +unless (-d $include_dir) {
   return include/ directory not found in $prefix;
   }
   
  @@ -1667,12 +1667,14 @@
   my $ap_inc = $self-apxs('-q' = 'INCLUDEDIR');
   if ($ap_inc  -d $ap_inc) {
   push @inc, $ap_inc;
  -} else {
  -# this is fatal
  -die Can't find the mod_perl include dir;
  +return [EMAIL PROTECTED];
   }
   
  -return [EMAIL PROTECTED];
  +# this is fatal
  +my $reason = $ap_inc
  +? path $ap_inc doesn't exist
  +: apxs -q INCLUDEDIR didn't return a value;
  +die Can't find the mod_perl include dir (reason: $reason);
   }
   
   my $src = $self-dir;