Re: Interpreting HTML

2003-08-26 Thread Patrick Galbraith
Hey, I just noticed the first email that you sent, I must've thought it 
was a question - I must really need sleep since I've been mispelling and 
reading incorrectly today ;) Sorry for replying to it as though it was a 
question.

Josh Chamas wrote:
js wrote:

I have apache2 and mod_perl2 setup and running without any problems 
with .PL
files.

In apache2 I have my test directory setup like the following:

Alias /test/ C:/apache2/htdocs/
  
  SetHandler perl-script
  PerlResponseHandler ModPerl::Registry
  PerlOptions +ParseHeaders
  Options +ExecCGI
  
 > How do I stop .HTML files from being interpreted?
 >
You could always just match on .pl, like:

   
   SetHandler perl-script
   PerlResponseHandler ModPerl::Registry
   PerlOptions +ParseHeaders
   Options +ExecCGI
   
For more on using , please see:

  http://httpd.apache.org/docs-2.0/mod/core.html#location

Regards,

Josh

Josh Chamas, Founder   phone:925-552-0128
Chamas Enterprises Inc.http://www.chamas.com
NodeWorks Link Checker http://www.nodeworks.com


--
--
Patrick Galbraith
Senior Software Developer
[EMAIL PROTECTED] [EMAIL PROTECTED]
206.719.2461


--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html


AuthenNTLM

2003-08-26 Thread Brett Hales
I am having problems with Apache-AuthenNTLM-0.23. In apache's error.log
I am getting the following errors reported.


AuthenNTLM: timed out while waiting for lock (key = 23754)

This also seems to cause the web server to go _very_ slow. I have looked
through the AuthenNTLM.pm and found the section where this is evaluated.
There is a comment above it.

# smb aborts any connection that where no user is looged on as soon as somebody
# tries to open another one. So we have to make sure two request, do not start
# two auth cycles at the same time. To avoid a hang of the whole server
we wrap it with
# a small timeout

Maybe this is actually happening and I am getting two auth cycles.

Does anybody have an idea why this is happening?


Thanks,

-- 
Brett Hales <[EMAIL PROTECTED]>



-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html



installing Apache::Test via CPAN impossible as root

2003-08-26 Thread Udo Rader
hi all,

I'm trying to setup Apache::Test with our apaches and have run into major 
troubles.

CPAN refuses to install the mod without force, because all tests completely 
fail. t/logs/error_log then contained error messages like these:

-error_log--
[...]
[Tue Aug 26 14:23:47 2003] [error] [client 127.0.0.1] (13)Permission denied: 
access to /index.html failed because search permissions are missing on a 
component of the path 
[...]
-error_log--

never saw such an apache error message ... ? search permissions are 
missing ? what kind of stuff is that?

But a google search quickly pointed me to the source of the problem:
In a default linux & perl installation Apache::Test is very unlikely
to be installable by root (http://dbforums.com/t859484.html).

I tried to make && make test the package as a "normal" user and I succeded.
Depending on my security settings this is however just luck:

If the above posting on dbforums is correct, then the problem is because
the unpacking and building is done by user root whereas all files below t/
are chowned to the actual apache test user.

Now this works fine as long as the _apache test user_ is allowed to access
root's .cpan build area at all, and I doubt that on most systems a normal
user (such as the apache test user) will be allowed to access anything
within ~root and thus "make test" will fail.

Are there arguments against running those tests as root?

for the record:
get this for apache 1.3.28 and mp1.28 as well as with apache 2.0.47 and 
mp1.99_09.

udo


-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html



Ticket/cookie based authentication for mod_perl and static frontend

2003-08-26 Thread Charlie Garrison
Good evening,

I have done a bit of research and found some possible solutions, but none of
them seem to be exactly what I want. First, the problem I need to solve...

I need to protect resources in both the static (proxy) front-end and the
mod_perl back-end. I have been using standard http authentication which works
pretty well except for not allowing a proper logout function and some caching
issues which result in occasional false FORBIDDEN responses. Since a proper
logout has become an important requirement, I am looking for other solutions.

Since I need the user credentials in the mod_perl app, I'm not happy to leave
all authentication to the front-end proxy server unless it sets the user
credentials (or some other values) before passing along the request.

I have looked at the following apache modules (for v1.3):

Cookie Authentication   Version 1.9
Fake Basic Authentication using Cookies
Module homepage at ftp://ftp.kciLink.com/pub/mod_auth_cookie.c.gz

Cookie Authentication with MySQLVersion 1.0
Authentication against a MySQL database with a
cryptographically secure cookie.
Module homepage at http://www.qwk.net/opensource/mod_auth_cookie_mysql/

mod_auth_mdaVersion 2.1
Realms for document tree and fast login for user using MD5 signed cookies.
Module homepage at http://www.frogdot.org/mod_auth_mda/


The first one, Cookie Authentication, looks nice and simple and should do what
I want. It sets the user credentials from a cookie to be processed by another
module in the request chain. But I'd prefer to have the authentication handled
by the same module. There are some caching issues with the current auth module
which I'd like to avoid (by not using the current module any longer).

The second one, Cookie Authentication with MySQL, looks like a very good
option, except for two issues. Fist, it doesn't support the 'require group...'
directive. And second, it doesn't appear to cache mysql connections so I am
concerned about the increased load from lots of quick connections.

The third one, mod_auth_mda, is probably my favourite choice (for a variety of
reasons). But it doesn't have any sample code for creating the MD5 signed
cookies with perl, and I'm not sure I feel confident about creating the needed
functions myself. All the sample code is written in Java.

Additionally, all of the above solutions require the use of cookies. It would
be nice if I could also use a URI (eg. path info) rather than just a cookie
solution.


I feel that someone must have already solved this issue so any suggestions or
advice would be appreciated. Are there any modules which I have missed? Are
the perceived problems with the above modules really an issue, or should I be
able to use one of them without any problems.

Thanks,
Charlie

-- 
   Charlie Garrison[EMAIL PROTECTED]
   PO Box 141, Windsor, NSW 2756, Australia 


-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html



Re: installing Apache::Test via CPAN impossible as root

2003-08-26 Thread Udo Rader
hmm, and as I just found out, the same applies for many other Apache:: mods
(libapreq ...)

This looks like a major problem to me.

Temporary workaround is to give read access to all users for ~root, but 
that makes me "a bit" nervous ...

udo




-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html



Re: installing Apache::Test via CPAN impossible as root

2003-08-26 Thread Stas Bekman
Udo Rader wrote:
hi all,

I'm trying to setup Apache::Test with our apaches and have run into major 
troubles.

CPAN refuses to install the mod without force, because all tests completely 
fail. t/logs/error_log then contained error messages like these:

-error_log--
[...]
[Tue Aug 26 14:23:47 2003] [error] [client 127.0.0.1] (13)Permission denied: 
access to /index.html failed because search permissions are missing on a 
component of the path 
[...]
-error_log--
As you posted in the followup, this is a problem with all Apache:: modules. 
The problem originates within Apache, not us.

FWIW, the cvs version of Apache::Test warns you early whether this is going to 
work or not, rather than just failing during 'make test'.

Ideas how to solve this are *very* welcome.

As of this moment per your observation you need to either put the data in the 
directory readable by the apache user, or build/run the tests as a non-root.

If you configure your CPAN to put the build dir not under /root, but let's say 
/tmp/ (probably can come up with a better choice), it'll work.

__
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


--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html


Re: SubRequest in Filter MP2 [QUESTION]

2003-08-26 Thread Craig Shelley

> I'll take a look at it. But you didn't supply a complete bug report as 
> explained http://perl.apache.org/bugs/. Please do so.

Hi, 

Here is that bug report related to the earlier postings. 


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

  [DESCRIBE THE PROBLEM HERE]

2. Used Components and their Configuration:

*** using lib/Apache/BuildConfig.pm
*** Makefile.PL options:
  MP_AP_PREFIX   => /home/craig/temp/mod_perl-1.99_09/
  MP_COMPAT_1X   => 1
  MP_GENERATE_XS => 1
  MP_LIBNAME => mod_perl
  MP_USE_DSO => 1
  MP_USE_STATIC  => 1
 
 
*** /usr/local/bin/httpd -V
Server version: Apache/2.0.47
Server built:   Jul 15 2003 14:07:14
Server's Module Magic Number: 20020903:4
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 SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D HTTPD_ROOT=""
 -D SUEXEC_BIN="/usr/lib/apache2/suexec2"
 -D DEFAULT_PIDLOG="/var/run/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_LOCKFILE="/var/run/accept.lock"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="/etc/apache2/mime.types"
 -D SERVER_CONFIG_FILE="/etc/apache2/apache2.conf"
 
 
*** /usr/bin/perl -V
Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration:
  Platform:
osname=linux, osvers=2.4.21-xfs+ti1211,
archname=i386-linux-thread-multi
uname='linux kosh 2.4.21-xfs+ti1211 #1 sat jul 12 10:35:04 est 2003
i686 gnulinux '
config_args='-Dusethreads -Duselargefiles -Dccflags=-DDEBIAN
-Dcccdlflags=-fPIC -Darchname=i386-linux -Dprefix=/usr
-Dprivlib=/usr/share/perl/5.8.0 -Darchlib=/usr/lib/perl/5.8.0
-Dvendorprefix=/usr -Dvendorlib=/usr/share/perl5
-Dvendorarch=/usr/lib/perl5 -Dsiteprefix=/usr/local
-Dsitelib=/usr/local/share/perl/5.8.0
-Dsitearch=/usr/local/lib/perl/5.8.0 -Dman1dir=/usr/share/man/man1
-Dman3dir=/usr/share/man/man3 -Dman1ext=1 -Dman3ext=3perl
-Dpager=/usr/bin/sensible-pager -Uafs -Ud_csh -Uusesfio -Uusenm
-Duseshrplib -Dlibperl=libperl.so.5.8.0 -Dd_dosuid -des'
hint=recommended, useposix=true, d_sigaction=define
usethreads=define use5005threads=undef useithreads=define
usemultiplicity=define
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat5005=undef
  Compiler:
cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DDEBIAN
-fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-O3',
cppflags='-D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing'
ccversion='', gccversion='3.3.1 20030722 (Debian prerelease)',
gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
alignbytes=4, prototype=define
  Linker and Libraries:
ld='cc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lgdbm -ldb -ldl -lm -lpthread -lc -lcrypt
perllibs=-ldl -lm -lpthread -lc -lcrypt
libc=/lib/libc-2.3.1.so, so=so, useshrplib=true,
libperl=libperl.so.5.8.0
gnulibc_version='2.3.1'
  Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib'
 
 
Characteristics of this binary (from libperl):
  Compile-time options: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES
PERL_IMPLICIT_CONTEXT
  Built under linux
  Compiled at Jul 30 2003 10:52:58
  %ENV:
PERL_LWP_USE_HTTP_10="1"
  @INC:
/etc/perl
/usr/local/lib/perl/5.8.0
/usr/local/share/perl/5.8.0
/usr/lib/perl5
/usr/share/perl5
/usr/lib/perl/5.8.0
/usr/share/perl/5.8.0
/usr/local/lib/site_perl
.
 
 
3. This is the core dump trace: (if you get a core dump):
 
  [CORE TRACE COMES HERE]
 
This report was generated by t/REPORT on Tue Aug 26 17:17:34 2003 GMT.
 
-8<-- End Bug Report --8<--


__
> 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
-- 
Craig Shelley <[EMAIL PROTECTED]>



-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html



Re: SubRequest in Filter MP2 [QUESTION]

2003-08-26 Thread Stas Bekman
Craig Shelley wrote:
I'll take a look at it. But you didn't supply a complete bug report as 
explained http://perl.apache.org/bugs/. Please do so.

Here is that bug report related to the earlier postings. 

-8<-- Start Bug Report 8<--
1. Problem Description:
[...]
3. This is the core dump trace: (if you get a core dump):
 
  [CORE TRACE COMES HERE]
Thanks, but you have missed the core dump's backtrace.

__
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


--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html


Re: installing Apache::Test via CPAN impossible as root

2003-08-26 Thread nathan
On Tue, 26 Aug 2003 09:07:21 -0700, Stas Bekman wrote:

[snip]
> 
> As you posted in the followup, this is a problem with
> all Apache:: modules. 
> The problem originates within Apache, not us.
> 
> FWIW, the cvs version of Apache::Test warns you early
> whether this is going to 
> work or not, rather than just failing during 'make
> test'.
> 
> Ideas how to solve this are *very* welcome.
> 
[snip]

Stas,

One thing we're working on implementing in Apache::PAR
to solve this kind of problem is to use File::Spec's
tmpdir to get the platform specific temp directory. 
This function appears to be available in File::Spec at
least as of Perl 5.6.0 as part of the distribution.

This could be used (maybe overridable via a env
variable, etc) to determine a temporary directory to
copy the t/ directory to in cases where permissions
would deny reading from the working directory or a
parent directory.  Of course, it would still have to
fail in cases where a temp directory isn't available
(either File::Spec doesn't support the platform or a
new enough version of File::Spec isn't available on an
old version of Perl) and the env variable isn't set,
but should handle almost all common cases.

Once the content is copied, Apache::Test would then use
that directory to serve test files, scripts, etc out
of.  This temporary directory could then also be
cleaned up when the Apache server is shutdown.

Of course, I haven't looked at the code for
Apache::Test enough to know whether this would be
easily implemented, but just thought I would throw out
the idea. 

Thanks,

Nathan Byrd


-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html



Re: Ticket/cookie based authentication for mod_perl and static frontend

2003-08-26 Thread Thomas Klausner
Hi!

On Die, Aug 26, 2003 at 09:06:05 +1000, Charlie Garrison wrote:

> I need to protect resources in both the static (proxy) front-end and the
> mod_perl back-end. I have been using standard http authentication which works
> pretty well except for not allowing a proper logout function and some caching
> issues which result in occasional false FORBIDDEN responses. Since a proper
> logout has become an important requirement, I am looking for other solutions.

Did you take a look at Apache::AuthCookie?
  http://search.cpan.org/author/MSCHOUT/Apache-AuthCookie-3.04/

> Since I need the user credentials in the mod_perl app, I'm not happy to leave
> all authentication to the front-end proxy server unless it sets the user
> credentials (or some other values) before passing along the request.

As AuthCookie is a mod_perl handler, you would have to put the
Authentification into the backend. Depending on how you generate the session
key (i.e. the value of the Auth Cookie), you should be able to use the
cookie in the frontend using one of the modules you mentioned (although I
don't know any of them..)


-- 
#!/usr/bin/perl   http://domm.zsi.at
for(ref bless{},just'another'perl'hacker){s-:+-$"-g&&print$_.$/}


-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html



Re: installing Apache::Test via CPAN impossible as root

2003-08-26 Thread Stas Bekman
[EMAIL PROTECTED] wrote:
On Tue, 26 Aug 2003 09:07:21 -0700, Stas Bekman wrote:

[snip]

As you posted in the followup, this is a problem with
all Apache:: modules. 
The problem originates within Apache, not us.

FWIW, the cvs version of Apache::Test warns you early
whether this is going to 
work or not, rather than just failing during 'make
test'.

Ideas how to solve this are *very* welcome.

[snip]

Stas,

One thing we're working on implementing in Apache::PAR
to solve this kind of problem is to use File::Spec's
tmpdir to get the platform specific temp directory. 
This function appears to be available in File::Spec at
least as of Perl 5.6.0 as part of the distribution.

This could be used (maybe overridable via a env
variable, etc) to determine a temporary directory to
copy the t/ directory to in cases where permissions
would deny reading from the working directory or a
parent directory.  Of course, it would still have to
fail in cases where a temp directory isn't available
(either File::Spec doesn't support the platform or a
new enough version of File::Spec isn't available on an
old version of Perl) and the env variable isn't set,
but should handle almost all common cases.
Once the content is copied, Apache::Test would then use
that directory to serve test files, scripts, etc out
of.  This temporary directory could then also be
cleaned up when the Apache server is shutdown.
Of course, I haven't looked at the code for
Apache::Test enough to know whether this would be
easily implemented, but just thought I would throw out
the idea. 
Thanks Nathan,

We have discussed this idea at the dev list, and will probably resort to it if 
no better solution is found. I didn't mention it on purpose in hope to get 
some new, better ideas.

The problem with copy and cleanup to a temp dir is that some project may have 
a pretty big t/ directory (mp2's one is almost 2MB and growing), so copying is 
going to be quite slow. Another problem is the cleanup, which may not always 
work very well.

Moreover, let's say that you run under 'root'. Most likely 
File::Temp/File::Spec::tmpdir will return /root/tmp as the temp dir, so it 
solves nothing. What we really want is an equivalent of /tmp.

What we could do is prompt root for two inputs: a username of a real user 
(e.g. 'stas' on my machine) and a dir where 'stas' can write to (e.g. 
/home/stas/tmp) and then copy the files there and use that username to run the 
test with.

In my original reply the best advise so far to avoid this problem is to 
configure your .cpan dir to be under /tmp in which case running tests as root 
is not a problem. However /tmp is often setup to be cleaned up on reboot, so 
you may want to configure only 'build_dir' to be on that filesystem, e.g.:

#~/.cpan/CPAN/MyConfig.pm
#
$CPAN::Config = {
 'cpan_home' => q[/root/.cpan],
 'build_dir' => q[/tmp/.cpan/build],
  ...
};
__
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


--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html


Re: SubRequest in Filter MP2 [QUESTION]

2003-08-26 Thread Craig Shelley
On Tue, 2003-08-26 at 19:03, Stas Bekman wrote:

> Thanks, but you have missed the core dump's backtrace.


I am sorry but I have never used core files before, so forgive me if I
have done this all wrong.

I configured apache to only have one server process.
Then using gdb, I connected to the server process and told it to
continue execution.
I then made a request to the server, causing it to crash.
Heres what I got:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 22572)]
0x4051cf58 in modperl_wbucket_flush () from
/usr/lib/apache2/modules/mod_perl.so

(gdb) backtrace
#0  0x4051cf58 in modperl_wbucket_flush () from
/usr/lib/apache2/modules/mod_perl.so
#1  0x4066f5de in ?? ()

(gdb) generate-core-file
Saved corefile core.22572
(gdb) quit

# gdb /usr/sbin/apache2 core.22572

#0  0x4051cf58 in modperl_wbucket_flush () from
/usr/lib/apache2/modules/mod_perl.so


(gdb) backtrace
#0  0x4051cf58 in modperl_wbucket_flush () from
/usr/lib/apache2/modules/mod_perl.so
#1  0x4066f5de in XS_Apache__SubRequest_run () from
/usr/local/lib/perl/5.8.0/auto/Apache/SubRequest/SubRequest.so
#2  0x405ad7ef in Perl_pp_entersub () from /usr/lib/libperl.so.5.8
#3  0x405a720a in Perl_runops_standard () from /usr/lib/libperl.so.5.8
#4  0x4054fa32 in Perl_call_sv () from /usr/lib/libperl.so.5.8
#5  0x4054f837 in Perl_call_sv () from /usr/lib/libperl.so.5.8
#6  0x405195da in modperl_callback () from
/usr/lib/apache2/modules/mod_perl.so
#7  0x4051c7ae in modperl_run_filter () from
/usr/lib/apache2/modules/mod_perl.so
#8  0x4051cba7 in modperl_output_filter_handler () from
/usr/lib/apache2/modules/mod_perl.so
#9  0x0807e66b in ap_pass_brigade ()
#10 0x08084c15 in ap_core_translate ()
#11 0x08073b0a in ap_run_handler ()
#12 0x0807401e in ap_invoke_handler ()
#13 0x0806767f in ap_process_request ()
#14 0x080638ed in _start ()
#15 0x0815e3f8 in ?? ()
#16 0x0004 in ?? ()
#17 0x0815e3f8 in ?? ()

I have not included the core file here because it was ~ 3Mb
If you need it please let me know

-- 
Craig Shelley <[EMAIL PROTECTED]>



-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html



Installation problem

2003-08-26 Thread Alan Rafagudinov

Hello!

I've downloaded apache_1.3.28.tar.gz & mod_perl-1.28.tar.gz
and unarchive it to /usr/src/httpd_perl for back-end server

then when I make

perl Makefile.PL APACHE_SRC=../apache_1.3.28/src/ DO_HTTPD=1 USE_APACI=1 EVERYTHING=1 
APACI_ARGS='-
-prefix=/usr/local/httpd_perl'

and

make && make test

tests failed:

done
/usr/bin/perl t/TEST 0
modules/actions.ok
modules/cgi.ok
modules/constants...ok
modules/cookie..ok
modules/fileok
modules/httpdconf...ok
modules/include.ok
modules/log.ok
modules/module..skipped test on this platform
modules/perlrun.ok
modules/psections...ok
modules/request.Use of uninitialized value in numeric eq (==) at modules/request.t 
line 147.
Use of uninitialized value in concatenation (.) at modules/request.t line 147.
Use of uninitialized value in numeric eq (==) at modules/request.t line 149.
Use of uninitialized value in numeric eq (==) at modules/request.t line 147.
Use of uninitialized value in concatenation (.) at modules/request.t line 147.
Use of uninitialized value in numeric eq (==) at modules/request.t line 149.
Use of uninitialized value in numeric eq (==) at modules/request.t line 147.
Use of uninitialized value in concatenation (.) at modules/request.t line 147.
Use of uninitialized value in numeric eq (==) at modules/request.t line 149.
Use of uninitialized value in numeric eq (==) at modules/request.t line 147.
Use of uninitialized value in concatenation (.) at modules/request.t line 147.
Use of uninitialized value in numeric eq (==) at modules/request.t line 149.
modules/request.NOK 10FAILED tests 1-10
Failed 10/10 tests, 0.00% okay
modules/src.ok
modules/ssi.skipped test on this platform
modules/stage...skipped test on this platform
modules/status..fetch /perl/perl-status failed!
modules/status..dubious
Test returned status 111 (wstat 28416, 0x6f00)
DIED. FAILED tests 1-10
Failed 10/10 tests, 0.00% okay
modules/symbol..FAILED before any test output arrived
modules/uri.FAILED before any test output arrived
modules/utilFAILED before any test output arrived
internal/apiFAILED before any test output arrived
internal/auth...ok 2/2FAILED test 1
Failed 1/2 tests, 50.00% okay
internal/croak..NOK 12FAILED tests 1, 3-4, 6-7, 9-10, 12
Failed 8/12 tests, 33.33% okay
internal/dirmagic...FAILED before any test output arrived
internal/error..ok
internal/headersArgument "" isn't numeric in numeric eq (==) at internal/headers.t 
line 29.
Argument "" isn't numeric in numeric eq (==) at internal/headers.t line 29.
Argument "" isn't numeric in numeric eq (==) at internal/headers.t line 29.
Argument "" isn't numeric in numeric eq (==) at internal/headers.t line 29.
Use of uninitialized value in string eq at internal/headers.t line 42.
Use of uninitialized value in string eq at internal/headers.t line 48.
Use of uninitialized value in string eq at internal/headers.t line 54.
internal/headersNOK 13FAILED tests 1-11, 13
Failed 12/13 tests, 7.69% okay
internal/hooks..500 (Internal Server Error) Can't connect to localhost:8529 
(Timeout)
Client-Date: Mon, 25 Aug 2003 05:12:29 GMT



internal/hooks..dubious
Test returned status 111 (wstat 28416, 0x6f00)
internal/http-get...Internal Server Error
internal/http-get...dubious
Test returned status 111 (wstat 28416, 0x6f00)
DIED. FAILED tests 1-16
Failed 16/16 tests, 0.00% okay
internal/http-post..Internal Server Error
internal/http-post..dubious
Test returned status 111 (wstat 28416, 0x6f00)
DIED. FAILED tests 1-7
Failed 7/7 tests, 0.00% okay
internal/proxy..ok
internal/redirect...NOK 6FAILED tests 1-4, 6
Failed 5/6 tests, 16.67% okay
internal/rwrite.NOK 2FAILED tests 1-2
Failed 2/2 tests, 0.00% okay
internal/stackedcan't open http://localhost:8529//perl/stacked
internal/stackeddubious
Test returned status 111 (wstat 28416, 0x6f00)
internal/table..FAILED before any test output arrived
internal/taint..Internal Server Error
internal/taint..dubious
Test returned status 111 (wstat 28416, 0x6f00)
DIED. FAILED tests 1-3
Failed 3/3 tests, 0.00% okay
Failed Test  Status Wstat Total Fail  Failed  List of failed
---
internal/api.t   ??   ??   %  ??
internal/auth.t   21  50.00%  1
internal/croak.  128  66.67%  1, 3-4, 6-7, 9-10, 12
internal/dirmag  ??   ??   %  ??
internal/header  13   12  92.31%  1-11, 13
internal/hooks. 111 28416??   ??   %  ??
internal/http-g 111 2841616   16 100.00%  1-16
internal/http-p 111 28416 77 100.00%  1-7
internal/redire   65  83.33%  1-4, 6
internal/rwrite   22 100.00%  1-2
internal/stacke 111 28416??   ??   %  ??
internal/table.

problems with Apache::Filter

2003-08-26 Thread Drox



 
Hi
I am having troubles trying to 
install the Apache module Apache::Filter
I need this module installed, so I 
can use Apache::SSI with Apache::ASP
I already have mod_perl installed. 
It seems to be installed ok.
 
But when I try to install or 
test Apache::Filter, I get the following:
"Can't locate object method "boot" 
via package "mod_perl" at C:/Perl/site/lib/Apache/Constants.pm line 
8"
 
Any ideas? Could it mean 
that mod_perl is installed incorrectly? But I have checked it and it seems 
ok.
But there is no boot method in the 
mod_perl directory, for some reason.
Thanks
Peter
 


RE: Interpreting HTML

2003-08-26 Thread Jeremy
Thanks guys,



Worked like a charm!

I appreciate the help for a newbie!

JS

-Original Message-
From: Patrick Galbraith [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 25, 2003 6:22 PM
To: Josh Chamas
Cc: js; [EMAIL PROTECTED]
Subject: Re: Interpreting HTML

Hey, I just noticed the first email that you sent, I must've thought it 
was a question - I must really need sleep since I've been mispelling and

reading incorrectly today ;) Sorry for replying to it as though it was a

question.

Josh Chamas wrote:
> js wrote:
> 
>> I have apache2 and mod_perl2 setup and running without any problems 
>> with .PL
>> files.
>>
>> In apache2 I have my test directory setup like the following:
>>
>> Alias /test/ C:/apache2/htdocs/
>>   
>>   SetHandler perl-script
>>   PerlResponseHandler ModPerl::Registry
>>   PerlOptions +ParseHeaders
>>   Options +ExecCGI
>>   
>>
>  > How do I stop .HTML files from being interpreted?
>  >
> 
> You could always just match on .pl, like:
> 
>
>SetHandler perl-script
>PerlResponseHandler ModPerl::Registry
>PerlOptions +ParseHeaders
>Options +ExecCGI
>
> 
> For more on using , please see:
> 
>   http://httpd.apache.org/docs-2.0/mod/core.html#location
> 
> Regards,
> 
> Josh
> 
> Josh Chamas, Founder   phone:925-552-0128
> Chamas Enterprises Inc.http://www.chamas.com
> NodeWorks Link Checker http://www.nodeworks.com
> 
> 
> 

-- 
--
Patrick Galbraith
Senior Software Developer
[EMAIL PROTECTED] [EMAIL PROTECTED]
206.719.2461





-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html



Re: problems with Apache::Filter

2003-08-26 Thread Stas Bekman
Drox wrote:
 
Hi
I am having troubles trying to install the Apache module Apache::Filter
I need this module installed, so I can use Apache::SSI with Apache::ASP
I already have mod_perl installed. It seems to be installed ok.
 
But when I try to install or test Apache::Filter, I get the following:
"Can't locate object method "boot" via package "mod_perl" at 
C:/Perl/site/lib/Apache/Constants.pm line 8"
 
Any ideas? Could it mean that mod_perl is installed incorrectly? But I 
have checked it and it seems ok.
But there is no boot method in the mod_perl directory, for some reason.
It seems that you are trying to run mod_perl 1.0 modules with mod_perl 2.0. In 
order to help us to help you, you must always submit a complete bug report as 
explained here: http://perl.apache.org/bugs/

__
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


--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html


Re: SubRequest in Filter MP2 [QUESTION]

2003-08-26 Thread Stas Bekman
Craig Shelley wrote:
On Tue, 2003-08-26 at 19:03, Stas Bekman wrote: 

Thanks, but you have missed the core dump's backtrace.
I am sorry but I have never used core files before, so forgive me if I
have done this all wrong.
No worries, this task is not trivial. Your trace is almost perfect. The only 
missing things are the arguments to the functions in the trace. In order to 
get the arguments you need to rebuild mp with MP_DEBUG=1 as explained here:
http://perl.apache.org/docs/2.0/user/help/help.html#Resolving_Segmentation_Faults

(gdb) backtrace
#0  0x4051cf58 in modperl_wbucket_flush () from
/usr/lib/apache2/modules/mod_perl.so
#1  0x4066f5de in XS_Apache__SubRequest_run () from
/usr/local/lib/perl/5.8.0/auto/Apache/SubRequest/SubRequest.so
Normally you should rebuild perl and apache with appropriate options as 
explained at the URL above to get the arguments for the perl and apache 
functions, but in this case the bug is most likely in mod_perl, so only 
rebuilding mod_perl with MP_DEBUG=1, getting a new segfault and a new trace 
will do.

#2  0x405ad7ef in Perl_pp_entersub () from /usr/lib/libperl.so.5.8
#3  0x405a720a in Perl_runops_standard () from /usr/lib/libperl.so.5.8
#4  0x4054fa32 in Perl_call_sv () from /usr/lib/libperl.so.5.8
#5  0x4054f837 in Perl_call_sv () from /usr/lib/libperl.so.5.8
#6  0x405195da in modperl_callback () from
/usr/lib/apache2/modules/mod_perl.so
#7  0x4051c7ae in modperl_run_filter () from
/usr/lib/apache2/modules/mod_perl.so
#8  0x4051cba7 in modperl_output_filter_handler () from
/usr/lib/apache2/modules/mod_perl.so
#9  0x0807e66b in ap_pass_brigade ()
#10 0x08084c15 in ap_core_translate ()
#11 0x08073b0a in ap_run_handler ()
#12 0x0807401e in ap_invoke_handler ()
#13 0x0806767f in ap_process_request ()
#14 0x080638ed in _start ()
#15 0x0815e3f8 in ?? ()
#16 0x0004 in ?? ()
#17 0x0815e3f8 in ?? ()
I have not included the core file here because it was ~ 3Mb
If you need it please let me know
That was a wise decision. A core file is not very useful for our purposes if 
taken away from the setup it was originated from. Not talking about the fact 
that posting large emails is not appreciated. If such a need rises, one needs 
to upload the file somewhere on the web and post the URL to that file instead.

__
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


--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html


Installation/test problems - mod_perl-1.27

2003-08-26 Thread Patrick West
I've installed apache_1.3.27 and mod_perl-1.27. When I go to run the 
tests in mod_perl-1.27/t (just running the first one), first it 
complains that it couldn't start the server. But the server is actually 
running. So I run modules/actions (commenting out the part of TEST that 
tries to start the server) and I get the following:

./TEST -v modules/actions
modules/actions1..1
fetch: `'
not ok 1
FAILED test 1
   Failed 1/1 tests, 0.00% okay
Failed Test   Stat Wstat Total Fail  Failed  List of Failed
---
modules/actions.t11 100.00%  1
Failed 1/1 test scripts, 0.00% okay. 1/1 subtests failed, 0.00% okay.
OKAY ... this is actually different from what I was getting before hand. 
Before I would get the LoadClass.pm file dumped out on the screen 
between the ''

So ... I go to the browser and type in the followiung URL: 
http://localhost:8529/LoadClass.pm

I get the following:

OK /LoadClass.pm

What's going on here? Why can't I run the test programs. Most of them 
are failing, with a few exceptions. And a lot of them are being skipped 
with no explanation (saw an earlier post that didn't list any tests 
being skipped). Why are they being skipped?

modules/actions...FAILED test 1
   Failed 1/1 tests, 0.00% okay
modules/cgi...FAILED tests 2-5
   Failed 4/5 tests, 20.00% okay
modules/constants.skipped
   all skipped: no reason given
modules/cookieskipped
   all skipped: no reason given
modules/file..skipped
   all skipped: no reason given
modules/httpdconf.ok
modules/include...skipped
   all skipped: no reason given
modules/log...skipped
   all skipped: no reason given
modules/moduleskipped
   all skipped: no reason given
modules/perlrun...ok
modules/psections.skipped
   all skipped: no reason given
modules/request...skipped
   all skipped: no reason given
modules/src...ok
modules/ssi...skipped
   all skipped: no reason given
modules/stage.skipped
   all skipped: no reason given
modules/statusok
modules/symbolskipped
   all skipped: no reason given
modules/uri...skipped
   all skipped: no reason given
modules/util..skipped
   all skipped: no reason given
internal/api..skipped
   all skipped: no reason given
internal/auth.FAILED test 1
   Failed 1/2 tests, 50.00% okay
internal/croakFAILED tests 1, 3-4, 6-7, 9-10, 12
   Failed 8/12 tests, 33.33% okay
internal/dirmagic.ok
internal/errorok
internal/headers..FAILED tests 1-11, 13
   Failed 12/13 tests, 7.69% okay
internal/hooks500 (Internal Server Error) Can't connect to 
localhost:8080 (connect: Connection refused)
Client-Date: Tue, 26 Aug 2003 20:44:54 GMT



dubious
   Test returned status 146 (wstat 37376, 0x9200)
internal/http-get.Internal Server Error
dubious
   Test returned status 146 (wstat 37376, 0x9200)
DIED. FAILED tests 1-16
   Failed 16/16 tests, 0.00% okay
internal/http-postInternal Server Error
dubious
   Test returned status 146 (wstat 37376, 0x9200)
DIED. FAILED tests 1-7
   Failed 7/7 tests, 0.00% okay
internal/proxyok
internal/redirect.FAILED tests 1-4, 6
   Failed 5/6 tests, 16.67% okay
internal/rwrite...ok
internal/stacked..can't open http://localhost:8080//perl/stacked
dubious
   Test returned status 146 (wstat 37376, 0x9200)
internal/tableok
internal/taintInternal Server Error
dubious
   Test returned status 146 (wstat 37376, 0x9200)
DIED. FAILED tests 1-3
   Failed 3/3 tests, 0.00% okay
Failed Test  Stat Wstat Total Fail  Failed  List of Failed
---
internal/auth.t 21  50.00%  1
internal/croak.t   128  66.67%  1 3-4 6-7 9-10 12
internal/headers.t 13   12  92.31%  1-11 13
internal/hooks.t  146 37376??   ??   %  ??
internal/http-get.t   146 3737616   16 100.00%  1-16
internal/http-post.t  146 37376 77 100.00%  1-7
internal/redirect.t 65  83.33%  1-4 6
internal/stacked.t146 37376??   ??   %  ??
internal/taint.t  146 37376 33 100.00%  1-3
modules/actions.t   11 100.00%  1
modules/cgi.t   54  80.00%  2-5
14 tests skipped.
httpd terminated
Failed 11/34 test scripts, 67.65% okay. 57/131 subtests failed, 56.49% okay.


--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html


Re: Installation/test problems - mod_perl-1.27

2003-08-26 Thread Bruce Tennant
Can we fix the "list" so that when a person replies, it defaults to the list address and not the posters?  This I think is what many of the "keep it on the list" comments come from.
 
This is the only list I am on that doesn't have a reply-to that defaults to the list (and I'm on more than 10).
 
Just my 2 cents here.Ged Haywood <[EMAIL PROTECTED]> wrote:
Hi thereOn Tue, 26 Aug 2003, Patrick West wrote:> Apparently $net::httpserver is set incorrectly,> [snip]> So ... where is $net::httpserver being set?t/net/config.pl73,Ged.PS: Please keep it on the list... :)-- Reporting bugs: http://perl.apache.org/bugs/Mail list info: http://perl.apache.org/maillist/modperl.htmlwww.bluewolverine.com
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software

Re: Installation problem

2003-08-26 Thread Stas Bekman
Ged Haywood wrote:
Hello there,

On Mon, 25 Aug 2003, Alan Rafagudinov wrote:


I've downloaded apache_1.3.28.tar.gz & mod_perl-1.28.tar.gz
and unarchive it to /usr/src/httpd_perl for back-end server
then when I make

perl Makefile.PL APACHE_SRC=../apache_1.3.28/src/ DO_HTTPD=1 USE_APACI=1 EVERYTHING=1 
APACI_ARGS='-
-prefix=/usr/local/httpd_perl'
[snip]
modules/psections...ok
modules/request.Use of uninitialized value in numeric eq (==) at modules/request.t 
line 147.
Use of uninitialized value in concatenation (.) at modules/request.t line 147.
[snip]


Can you tell us a bit more about your system?  The documentation
gives you information about what information you need to give...
What compiler was used to build your Perl, and was it the same
compiler that you used to build mod_perl and Apache?
Folks, please point bug reporters to http://perl.apache.org/bugs/, which 
provides the exact information we need to help them.

__
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


--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html


Re: problems with Apache::Filter

2003-08-26 Thread Stas Bekman
[ Please post all the replies back to the list! ]

Drox wrote:
Hi Stas
Thanks for your reply. Sorry I didn't send the bug stuff. I just joined the
list today. I'll try to send a report later.
No need to any longer, Apache::Filter doesn't work with mp2.

I'm using Apache:Filter version 1.022 (31 Jan 2003). I thought that it was
suitable for use with mod_perl 2.0.
Would you know how I can check if its compatible with mod_perl 2.0?
mod_perl 2.0 comes with built-in filtering mechanism.
http://perl.apache.org/docs/2.0/user/handlers/filters.html
__
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


--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html


Re: Installation/test problems - mod_perl-1.27

2003-08-26 Thread Perrin Harkins
On Tue, 2003-08-26 at 18:41, Bruce Tennant wrote:
> Can we fix the "list" so that when a person replies, it defaults to
> the list address and not the posters?

Read the following thread:
http://marc.theaimsgroup.com/?l=apache-modperl&m=99790842623617&w=2

- Perrin


-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html



Re: Installation/test problems - mod_perl-1.27

2003-08-26 Thread Stas Bekman
Bruce Tennant wrote:
Can we fix the "list" so that when a person replies, it defaults to the 
list address and not the posters?  This I think is what many of the 
"keep it on the list" comments come from.
It worked quite well without this feature untill now. But the number of 
offlist replies is getting too high nowadays. So we probably will add the 
Reply-To header.

This is the only list I am on that doesn't have a reply-to that defaults 
to the list (and I'm on more than 10).
 
Just my 2 cents here.

*/Ged Haywood <[EMAIL PROTECTED]>/* wrote:

PS: Please keep it on the list... :)


__
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


--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html


Re: Installation/test problems - mod_perl-1.27

2003-08-26 Thread Ged Haywood
Hi there,

On Tue, 26 Aug 2003, Patrick West wrote:

> I've installed apache_1.3.27 and mod_perl-1.27. When I go to run the
> tests in mod_perl-1.27/t (just running the first one), first it
> complains that it couldn't start the server. But the server is
> actually running.

Are you sure you have the right server running?  Did you check that
there were no httpd processes running before you started the test?
You might want to check which ports 80, 8080, 8259... are being used
as this might lead you to the answer.  Have you checked the error_log
files for the server(s)?  Pay particular attention to dates and times,
both when you give the commands to start servers, run tests etc.  and
also when you look in the log files.  This may help you to understand
what happened and when.

73,
Ged.



-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html



Re: Installation problem

2003-08-26 Thread Stas Bekman
[EMAIL PROTECTED] wrote:
Hello!

Your letter successfully arrived to my mailbox and I'll read it in the nearest future.

--

Здравствуйте!

Ваше письмо благополучно дошло до моего почтового ящика и я его обязательно прочту в ближайшее время.
Like we don't have enough spam and virus emails already. If you ask a question 
in a public forum and expect an answer, please at least consider to turn off 
any autoresponders that you may have. :(

__
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


--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html


Re: Installation problem

2003-08-26 Thread Ged Haywood
Hello there,

On Mon, 25 Aug 2003, Alan Rafagudinov wrote:

> I've downloaded apache_1.3.28.tar.gz & mod_perl-1.28.tar.gz
> and unarchive it to /usr/src/httpd_perl for back-end server
> 
> then when I make
> 
> perl Makefile.PL APACHE_SRC=../apache_1.3.28/src/ DO_HTTPD=1 USE_APACI=1 
> EVERYTHING=1 APACI_ARGS='-
> -prefix=/usr/local/httpd_perl'
> 
> [snip]
> modules/psections...ok
> modules/request.Use of uninitialized value in numeric eq (==) at 
> modules/request.t line 147.
> Use of uninitialized value in concatenation (.) at modules/request.t line 147.
> [snip]

Can you tell us a bit more about your system?  The documentation
gives you information about what information you need to give...

What compiler was used to build your Perl, and was it the same
compiler that you used to build mod_perl and Apache?

73,
Ged.



-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html



Re: Installation/test problems - mod_perl-1.27

2003-08-26 Thread Ged Haywood
Hi there

On Tue, 26 Aug 2003, Patrick West wrote:

> Apparently $net::httpserver is set incorrectly,
> [snip]
> So ... where is $net::httpserver being set?

t/net/config.pl

73,
Ged.

PS: Please keep it on the list... :)



-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html



why you should reply to the list

2003-08-26 Thread Stas Bekman
Perrin Harkins wrote:
On Tue, 2003-08-26 at 18:41, Bruce Tennant wrote:

Can we fix the "list" so that when a person replies, it defaults to
the list address and not the posters?


Read the following thread:
http://marc.theaimsgroup.com/?l=apache-modperl&m=99790842623617&w=2
Please advise on another way to tell people to respond to the list and not in 
private. I used to receive much less off-list replies earlier.

Normally when people followup to my reply in private, I don't know what to do 
about it. I simply bounce it back to the list if it's obvious that the poster 
just didn't know better. However in some cases an off-list email means that 
the poster did *not* want it to be seen in public, so I end up asking the 
person whether she ment to send it to the list in first place, but hit 'Reply' 
instead of 'Reply-All'. So we have another 2 emails going back in forth. So 
instead of generating 1 email we end up with 4 in the best case. Now multiply 
by the number of misdirected emails.

Moreover when people correct their mistake they usually end up forwarding the 
email, they sent to off-list, losing all reference email ids, which breaks the 
thread in the archives.

Purhaps adding a list signature:

Always post followups back to the list!

will help, but who reads that.

__
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


--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html


Re: problem with mod_perl 2.0 + apache 2.0 and proxyreq

2003-08-26 Thread Stas Bekman
John Chiu wrote:
Thanks in advance. I've tried all the archives and google'd but I have 
not found anything that would help.

 

I'm running RH 8.0, httpd-2.0.40-11.5 and mod_perl-1.99_05-3 from the 
RedHat distribution. I'm trying to create a small proxy module that will 
check a non-proxy request and depending on "stuff" dynamically transform 
it into a proxy request using mod_proxy.
1.99_05 is a way too old. Lots of bugs were fixed since that release. Upgrade 
to at least 1.99_09 or better the current cvs. 1.99_10 will be released as 
soon as perl-5.8.1 is released.

I'm following the example in Chapter 7 (page 370) of the "Writing Apache 
Modules with Perl and C". I know that the book is based on the older 
apache 1.3 server and associated mod_perl. However, I have not found 
anything in my readings to indicate that this would not work any more.

my $r =3D shift;
[... code snipped ...]

BTW, you mailer has mangled the source code, s/=/=3D/

Additionally, a 502 Bad Gateway error was encountered while trying to 
use an ErrorDocument to handle the request.

 

The apache error log indicates (with some debugging) that it is looping 
on the "GET" of goodbye.html. Additional debuging indicates that 
$r->proxyreq is always 0, so it's looping. My questions are:

 

1.Did sometime change in apache 2 or mod_perl 2 so that you cannot

set proxyreq anymore: ie. $r->proxyreq(1).

2.How do you set proxyreq if $r->proxyreq(1) is not the correct

method?

3.Is the logic wrong in this proxy example?
How can we possible know what the problem is if you don't show the relevant 
configuration section? Most likely you have a broken configuration and should 
advise first the mod_proxy documentation.
http://httpd.apache.org/docs-2.0/mod/mod_proxy.html

To make sure that the problem is not in mod_perl, I've added a new 
modules/proxy test to the mp2 test suite, based on that example from the eagle 
book. Try it and if you succeed to break it, then we will fix it. You will 
need to retrieve the cvs version in order to get it.
http://perl.apache.org/download/source.html#Development_mod_perl_2_0_Source_Distribution
(note: I have just committed the test, so if you use the snapshot, which is 
updated every 6 hours, it may not be there, so use the normal cvs checkout)

__
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


--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html


Re: SubRequest in Filter MP2 [QUESTION]

2003-08-26 Thread Geoffrey Young


Stas Bekman wrote:
Craig Shelley wrote:

I'll take a look at it. But you didn't supply a complete bug report 
as explained http://perl.apache.org/bugs/. Please do so.
I think I've got this figured out.

the problem is with the r->main logic in mpxs_ap_run_sub_req.

with that logic, what ends up happening is that the data currently being 
operated on is explicity flushed.  this is bad within a (streaming) filter 
where you are expected to call $f->print yourself, as the data is sent 
without your permission (you may be operating on it or not want to send it 
at all).  it also seemed to cause infinite loop in my tests because the 
filter was seeing the same data over and over again.

I can't really understand the reason behind the code anyway, since I can't 
see anywhere in core where such logic is applied before ap_run_sub_request - 
everyone seems to call without regard to where in the data stream they 
happen to be, so I don't get why mod_perl should be any different.  indeed 
commenting it out fixes the problem for me.

however, removing that logic causes api/lookup_uri2.t to fail, but I suspect 
this is an issue with puts() rather than the subrequest mechanism - changing 
puts() to print() makes everything work just fine. does puts() write 
directly to the wire, bypassing filters?

anyway, attached is a patch against current cvs - fixes and a few filtering 
subrequest tests.  note that the patch does not mention the removal of 
xs/Apache/SubRequest/Apache__SubRequest.h, which is no longer needed, so I 
guess you should remove that file by hand before compiling.

craig - note that this patch affects the autogenerated code, so in order to 
get it to work you'll need to apply it, then run make realclean, perl 
Makefile.PL, etc.

--Geoff
Index: t/response/TestAPI/lookup_uri2.pm
===
RCS file: /home/cvspublic/modperl-2.0/t/response/TestAPI/lookup_uri2.pm,v
retrieving revision 1.3
diff -u -r1.3 lookup_uri2.pm
--- t/response/TestAPI/lookup_uri2.pm   27 Apr 2003 04:19:18 -  1.3
+++ t/response/TestAPI/lookup_uri2.pm   26 Aug 2003 19:55:50 -
@@ -11,7 +11,7 @@
 sub myplan {
 my $r = shift;
 
-$r->puts("1..3\nok 1\n");
+$r->print("1..3\nok 1\n");
 
 Apache::OK;
 }
@@ -19,7 +19,7 @@
 sub ok3 {
 my $r = shift;
 
-$r->puts("ok 3\n");
+$r->print("ok 3\n");
 
 Apache::OK;
 }
@@ -35,7 +35,7 @@
 
 subrequest($r, 'myplan');
 
-$r->puts("ok 2\n");
+$r->print("ok 2\n");
 
 subrequest($r, 'ok3');
 
Index: xs/maps/apache_functions.map
===
RCS file: /home/cvspublic/modperl-2.0/xs/maps/apache_functions.map,v
retrieving revision 1.64
diff -u -r1.64 apache_functions.map
--- xs/maps/apache_functions.map12 Jun 2003 23:27:03 -  1.64
+++ xs/maps/apache_functions.map26 Aug 2003 19:55:51 -
@@ -95,7 +95,7 @@
 
 PACKAGE=Apache::SubRequest   ISA=Apache::RequestRec
  ap_destroy_sub_req  | | r | DESTROY
- ap_run_sub_req  | mpxs_ | | run
+ ap_run_sub_req  | | r | run
 
 MODULE=Apache::RequestIO   PACKAGE=Apache::RequestRec
  ap_discard_request_body
Index: xs/tables/current/ModPerl/FunctionTable.pm
===
RCS file: /home/cvspublic/modperl-2.0/xs/tables/current/ModPerl/FunctionTable.pm,v
retrieving revision 1.119
diff -u -r1.119 FunctionTable.pm
--- xs/tables/current/ModPerl/FunctionTable.pm  20 Aug 2003 23:20:14 -  1.119
+++ xs/tables/current/ModPerl/FunctionTable.pm  26 Aug 2003 19:55:56 -
@@ -6170,24 +6170,6 @@
 ]
   },
   {
-'return_type' => 'int',
-'name' => 'mpxs_ap_run_sub_req',
-'attr' => [
-  'static',
-  '__inline__'
-],
-'args' => [
-  {
-'type' => 'PerlInterpreter *',
-'name' => 'my_perl'
-  },
-  {
-'type' => 'request_rec *',
-'name' => 'r'
-  }
-]
-  },
-  {
 'return_type' => 'apr_size_t',
 'name' => 'mpxs_ap_rvputs',
 'attr' => [

--- /dev/null   2003-01-30 05:24:37.0 -0500
+++ t/filter/TestFilter/out_str_sub_core.pm 2003-08-26 15:51:40.0 -0400
@@ -0,0 +1,78 @@
+package TestFilter::out_str_sub_core;
+
+use strict;
+use warnings FATAL => 'all';
+
+use Apache::Test;
+use Apache::TestUtil;
+
+use Apache::RequestRec ();
+use Apache::RequestIO ();
+use Apache::SubRequest ();
+
+use Apache::Filter ();
+
+use Apache::Const -compile => qw(OK);
+
+# include the contents of a subrequest
+# in the filter, a la mod_include's 
+# 
+
+sub include {
+
+my $filter = shift;
+
+unless ($filter->ctx) {
+# don't forget to remove the C-L header
+$filter->r->headers_out->unset('Content-Length');
+
+$filter->ctx(1);
+}
+
+while ($filter->read(my $buffer, 1024)){
+
+if ($buffer eq "\n") {
+my $sub = $filter->r->lookup_uri('/core_subrequest/subrequest.txt');
+my $rc = $sub->run