Re: modperl 2.0: apache crashes when running modperl script

2003-06-03 Thread arunappa
-8-- Start Bug Report 8--
1. Problem Description:

apache crashes when accessing this modperl script:

package Apache::hello;

use strict;

use Apache::RequestRec ();
use Apache::RequestIO ();
use Apache::Const -compile = 'OK';

sub handler {
  my $request = shift;  # what does shift operate on @_?
  $request-content_type('text/html');

  $request-print(END);
HTML
BODY
H1Hello There/H1
/BODY
/HTML
END

return Apache::OK;
}

2. Used Components and their Configuration:

*** using /usr/download/modperl/mod_perl-1.99_09/t/../lib/Apache/BuildConfig.pm
*** Makefile.PL options:
  MP_AP_PREFIX= /usr/httpd20
  MP_COMPAT_1X= 1
  MP_GENERATE_XS  = 1
  MP_INST_APACHE2 = 1
  MP_LIBNAME  = mod_perl
  MP_USE_DSO  = 1
  MP_USE_STATIC   = 1


__
McAfee VirusScan Online from the Netscape Network.
Comprehensive protection for your entire computer. Get your free trial today!
http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397

Get AOL Instant Messenger 5.1 free of charge.  Download Now!
http://aim.aol.com/aimnew/Aim/register.adp?promo=380455


Apache::Cookie

2003-06-03 Thread cap
i have an application that uses CGI and sets the cookie values as a hashref.
im then attempting to retreive the values with Apache::Cookie with:

$cookies = Apache::Cookie-fetch;

$ccokies is a hashref so i should be able to get the individual values with:

$cookies-{uid};

right?  however, this doesn't appear to work.




Re: Apache::Cookie

2003-06-03 Thread Jason Galea
Have you consulted the documentation?

http://search.cpan.org/author/JIMW/libapreq-1.1/Cookie/Cookie.pm#value

cap wrote:
i have an application that uses CGI and sets the cookie values as a hashref.
im then attempting to retreive the values with Apache::Cookie with:
$cookies = Apache::Cookie-fetch;

$ccokies is a hashref so i should be able to get the individual values with:

$cookies-{uid};

right?  however, this doesn't appear to work.







Not reading $ENV variable

2003-06-03 Thread Chris Pizzo
Hi all,
I'm seeing a weird thing.  Sometimes my script sees nothing in the 
$ENV{HTTP_REFERER} variable.  Im not sure what is causing this.  It works 
some of the time.

I do this at the begining of the script...heres the code:

my $r = Apache-request;

use DBI;# for connecting to the database

my $refer_url = $ENV{HTTP_REFERER};

basically the script takes form data and inserts it to a db then returns 
back to the refering page.

Thanks for any ideas
Chris


Re: Missing html code using dynagzip

2003-06-03 Thread Slava Bizyayev
I guess, your problem is out of Apache::Dynagzip. Please, try to follow:

1. Make sure your script is producing correct response under
Apache::Registry.

2. Make sure your script does not have any internal conditional branches on
whether it runs under Apache::Registry, or under Apache::RegistryFilter -
Apache::Dynagzip.

3. Do your transition from Apache::Registry configuration to
Apache::RegistryFilter - Apache::Dynagzip configuration by simple
replacement of the line:

PerlHandler Apache::Registry

with the following two lines:

PerlHandler Apache::RegistryFilter Apache::Dynagzip
PerlSetVar Filter On

You may optionally add light compression finally if you want. You are not
supposed to change any other settings.

4. Let us know details of what you finally have.

Thanks,
Slava


- Original Message -
From: Scott Alexander [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, June 02, 2003 5:26 AM
Subject: Missing html code using dynagzip


 Hi,

 When using

 Files *.pl
 SetHandler perl-script
 PerlHandler Apache::RegistryFilter Apache::Dynagzip
 PerlSetVar Filter On

 PerlSetVar LightCompression On
 Options +ExecCGI

 PerlSetVar UseCGIHeadersFromScript Off
 PerlSendHeader Off
 PerlSetupEnv On
 /Files

 this setup with NN 6+ the code ends with

 /html/html (yes twice) and in IE 6.0 it has just /html  (missing the
 last '' With NN 4.8 it is the same as IE 6.0.

 Does anyone know why this happens?

 I've tried putting all my output into one print statement. Makes no
 difference.

 Scott









Using Apache::ReadConfig and method handlers

2003-06-03 Thread Issac Goldstand
I want to assign a method handler from within the Apache::ReadConfig
namespace.  Right now, what I have is some function which somewhat
resembles:

package My::Object;
sub method1 {
  my $self=shift;
  package Apache::ReadConfig;
  no strict;
  $Location{'/some/URL/'} = {
 Options = '+ExecCGI',
 PerlHeaderParserHandler = sub {$self-some_other_method;}
};

But when I browse to /some/URL, some_other_method never gets called, let
alone by $self

Any advice?

  Issac



[ANNOUNCE] Mason-CM 1.1, Current Mason Adaption and Fixes

2003-06-03 Thread Christian Hauser
Finally I upgraded all my sites to Mason 1.20 and so Mason-CM has
been updated too. At the same time I could fix a few little things.

DESCRIPTION
Mason-CM is a web content management system built on Apache/
mod_perl. It's optimized arbitrary any file based web productions.
It’s optimized to manage multiple sites of SMB’s together with
multiple graphic designer companies or professional content
contributors.

CHANGES/FEATURES/FIXES

 * Made it Mason 1.20 (1.14-1.19) compatible.
 * Optimized behavior of Branch parameter 'compile' and
   'data_dir' and added 'object'.
 - Enabled that Branch parameter 'path' can reside deeper
   in a Mason comp_root
 - Renewed checking for Mason compilation errors
 - Fixed some caching irregularities
 - Fixed cookie problem sometimes not been set
 - Fixed reload list
 - Fixed triggering out of search
 - Optimized all the redirect cases; external, internal, request
 - Enhanced install documentation

RESOURCES
Visit the web site of Mason-CM:
 - http://mason-cm.itassistance.biz/index
Try the online demo:
 - http://demo.mason-cm.itassistance.biz/index
   ID: demo
   PWD: demo
Download the tarball or browse CVS:
 - http://sourceforge.net/projects/mason-cm/

DOCUMENTATION
Find documentation files on installation,
changes, configuration ...
 - http://mason-cm.itassistance.biz/doc/readme

NEWS
Using the latest Mason version:
 - http://sourceforge.net/forum/forum.php?forum_id=279789

LIMITATIONS
The display has only been tested on major browsers. Please
tell me if you discover a really bad display ... Thanks.


Enjoy, Christian  -  [EMAIL PROTECTED]  -



Re: Not reading $ENV variable

2003-06-03 Thread Andrew Ho
Hello,

CPI'm seeing a weird thing. Sometimes my script sees nothing in the
CP$ENV{HTTP_REFERER} variable. Im not sure what is causing this. It
CPworks some of the time.

You are never guaranteed to receive a Referer header; first of all, it is
sent by the client, and the HTTP client involved has no obligation to set
it at all on outgoing requests--it's just a convention that most desktop
browsers follow. Second, some application level HTTP proxies block
outgoing Referer headers for security reasons. Finally, it's possible that
a user bookmarked a page or typed in a URL and hence no Referer was
involved at all.

Humbly,

Andrew

--
Andrew Ho   http://www.tellme.com/   [EMAIL PROTECTED]
Engineer1-800-555-TELL  Voice 650-930-9062
Tellme Networks, Inc. Fax 650-930-9101
--



Re: Using Apache::ReadConfig and method handlers

2003-06-03 Thread Perrin Harkins
On Mon, 2003-06-02 at 11:36, Issac Goldstand wrote:
 I want to assign a method handler from within the Apache::ReadConfig
 namespace.  Right now, what I have is some function which somewhat
 resembles:
 
 package My::Object;
 sub method1 {
   my $self=shift;
   package Apache::ReadConfig;
   no strict;
   $Location{'/some/URL/'} = {
  Options = '+ExecCGI',
  PerlHeaderParserHandler = sub {$self-some_other_method;}
 };
 
 But when I browse to /some/URL, some_other_method never gets called, let
 alone by $self

What are you trying to do?  You know you can only do this sort of thing
during server startup, right?  After startup, you can still push
handlers but you have to do it differently.

- Perrin


Re: Using Apache::ReadConfig and method handlers

2003-06-03 Thread Issac Goldstand
- Original Message - 
From: Perrin Harkins [EMAIL PROTECTED]
 On Mon, 2003-06-02 at 11:36, Issac Goldstand wrote:
  I want to assign a method handler from within the Apache::ReadConfig
  namespace.  Right now, what I have is some function which somewhat
  resembles:
 
  package My::Object;
  sub method1 {
my $self=shift;
package Apache::ReadConfig;
no strict;
$Location{'/some/URL/'} = {
   Options = '+ExecCGI',
   PerlHeaderParserHandler = sub {$self-some_other_method;}
  };
 
  But when I browse to /some/URL, some_other_method never gets called, let
  alone by $self

 What are you trying to do?  You know you can only do this sort of thing
 during server startup, right?  After startup, you can still push
 handlers but you have to do it differently.


No - this is at startup.  It's also, to the best of my knowledge, the *only*
way to push handlers onto a dynamic URL (eg, where the URL is a variable) -
which is what I'm trying to do.

This worked fine when it was just:
PerlHeaderParserHandler = __PACKAGE__.::some_handler;

Now, I'm realizing it should be something more akin to:

PerlHeaderParserHandler = ref($self).-some_method;

But even that's not working...

  Issac



Re: Using Apache::ReadConfig and method handlers

2003-06-03 Thread Perrin Harkins
On Mon, 2003-06-02 at 15:19, Issac Goldstand wrote:
 No - this is at startup.  It's also, to the best of my knowledge, the *only*
 way to push handlers onto a dynamic URL (eg, where the URL is a variable) -
 which is what I'm trying to do.

I was referring to the $r-push_handlers method which you can use when
handling a request.

 
 This worked fine when it was just:
 PerlHeaderParserHandler = __PACKAGE__.::some_handler;
 
 Now, I'm realizing it should be something more akin to:
 
 PerlHeaderParserHandler = ref($self).-some_method;
 
 But even that's not working...

That doesn't look like the syntax in the docs:
http://perl.apache.org/docs/1.0/guide/config.html#Perl_Method_Handlers

Or here:
http://perl.apache.org/docs/1.0/guide/method_handlers.html

If you really want an object method and not a class method, you need to
do something like this:

PerlHeaderParserHandler = sub {
 my $r = shift;
 $self-some_method($r);
 }

I never use Apache::ReadConfig, so my syntax could be off, but hopefully you get the 
idea.

- Perrin


[mp2] make test fails on redhat 8.0 with 1.99_09 and 1.99_10-devsources

2003-06-03 Thread Haroon Rafique
system details are posted as cut-and-paste from t/REPORT output at the end 
of the email.

Background:

1. make test passes 100% with 1.99_08
2. make test fails to start the webservers with 1.99_09
3. make test fails to start the webservers with 1.99_10-dev (cvs)

In the case of 1.99_09, following happens after running make test

[Mon Jun 02 15:55:16 2003] [error] Invalid CODE attribute: 
TestFilter::out_init_basic at 
/home/haroon/src/build/mod_perl-1.99_09/t/filter/TestFilter/out_init_basic.pm 
line 33
BEGIN failed--compilation aborted at 
/home/haroon/src/build/mod_perl-1.99_09/t/filter/TestFilter/out_init_basic.pm 
line 33.
Compilation failed in require at (eval 21) line 3.

[Mon Jun 02 15:55:16 2003] [error] Can't load Perl module 
TestFilter::out_init_basic for server localhost.localdomain:8529, 
exiting...

Strangely enough, line 33 in the offending file is a closing curly brace 
for sub init : FilterInitHandler.

Similar error but slightly different filenames/line numbers with 
1.99_10-dev, as follows:

[Mon Jun 02 16:00:07 2003] [error] Invalid CODE attribute: 
TestFilter::in_init_basic at 
/home/haroon/src/build/modperl-2.0/t/filter/TestFilter/in_init_basic.pm 
line 30
BEGIN failed--compilation aborted at 
/home/haroon/src/build/modperl-2.0/t/filter/TestFilter/in_init_basic.pm 
line 30.
Compilation failed in require at (eval 35) line 3.

[Mon Jun 02 16:00:07 2003] [error] Can't load Perl module 
TestFilter::in_init_basic for server localhost.localdomain:8529, 
exiting...

Similarly, line 30 in the offending file is a closing curly brace for sub 
init : FilterInitHandler.

Used Components and their Configuration:

*** mod_perl version 1.9910

*** using lib/Apache/BuildConfig.pm
*** Makefile.PL options:
  MP_AP_PREFIX   = /servers/httpd-2.0.44-pl
  MP_COMPAT_1X   = 1
  MP_GENERATE_XS = 1
  MP_LIBNAME = mod_perl
  MP_USE_DSO = 1
  MP_USE_STATIC  = 1


*** /servers/httpd-2.0.44-pl/bin/httpd -V
Server version: Apache/2.0.44
Server built:   Feb 18 2003 14:18:08
Server's Module Magic Number: 20020903:0
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
 -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=/servers/httpd-2.0.44-pl
 -D SUEXEC_BIN=/servers/httpd-2.0.44-pl/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/bin/perl -V
Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration:
  Platform:
osname=linux, osvers=2.4.18-11smp, archname=i386-linux-thread-multi
uname='linux daffy.perf.redhat.com 2.4.18-11smp #1 smp thu aug 15 
06:41:59 edt 2002 i686 i686 i386 gnulinux '
config_args='-des -Doptimize=-O2 -march=i386 -mcpu=i686 
-Dmyhostname=localhost [EMAIL PROTECTED] -Dcc=gcc -Dcf_by=Red 
Hat, Inc. -Dinstallprefix=/usr -Dprefix=/usr -Darchname=i386-linux 
-Dvendorprefix=/usr -Dsiteprefix=/usr -Duseshrplib -Dusethreads 
-Duseithreads -Duselargefiles -Dd_dosuid -Dd_semctl_semun -Di_db -Ui_ndbm 
-Di_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm -Duseperlio 
-Dinstallusrbinperl -Ubincompat5005 -Uversiononly -Dpager=/usr/bin/less 
-isr'
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='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing 
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm',
optimize='-O2 -march=i386 -mcpu=i686',
cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing 
-I/usr/include/gdbm'
ccversion='', gccversion='3.2 20020822 (Red Hat Linux Rawhide 3.2-5)', 
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='gcc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lnsl -lgdbm -ldb -ldl -lm -lpthread -lc -lcrypt -lutil
perllibs=-lnsl -ldl -lm -lpthread -lc -lcrypt -lutil
libc=/lib/libc-2.2.92.so, so=so, useshrplib=true, libperl=libperl.so
gnulibc_version='2.2.92'
  Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic 
-Wl,-rpath,/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE'
cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'


Characteristics of this binary (from libperl): 
  Compile-time options: 

Re: Using Apache::ReadConfig and method handlers

2003-06-03 Thread Issac Goldstand
- Original Message - 
From: Perrin Harkins [EMAIL PROTECTED]
 On Mon, 2003-06-02 at 15:19, Issac Goldstand wrote:
  No - this is at startup.  It's also, to the best of my knowledge, the
*only*
  way to push handlers onto a dynamic URL (eg, where the URL is a
variable) -
  which is what I'm trying to do.

 I was referring to the $r-push_handlers method which you can use when
 handling a request.

 
  This worked fine when it was just:
  PerlHeaderParserHandler = __PACKAGE__.::some_handler;
 
  Now, I'm realizing it should be something more akin to:
 
  PerlHeaderParserHandler = ref($self).-some_method;
 
  But even that's not working...

 That doesn't look like the syntax in the docs:
 http://perl.apache.org/docs/1.0/guide/config.html#Perl_Method_Handlers

 Or here:
 http://perl.apache.org/docs/1.0/guide/method_handlers.html

 If you really want an object method and not a class method, you need to
 do something like this:

 PerlHeaderParserHandler = sub {
  my $r = shift;
  $self-some_method($r);
  }
Right - for $r-push_handlers, I  do that:.

$r-push_handlers(PerlFixupHandler,sub {return $self-uf_handler(@_);});
# A lot more elegant than the example in the Guide, IMHO

But that's not what's needed for Apache::ReadConfig, I think - Here, we
don't expect a sub reference, but rather the *name* of the routine (in the
Apache::ReadConfig namespace) which we want to run...  I'm still
experimenting.

  Issac



[DIGEST] mod_perl digest 2003/05/19

2003-06-03 Thread jgsmith
--

  mod_perl digest
 
May 19, 2003 - June 1, 2003

--

Recent happenings in the mod_perl world...


Features

  o mod_perl status
  o mailing list highlights
  o mp2 porting tips / documentation
  o links
  o problem reporting guidelines


mod_perl status

  o mod_perl
- stable: 1.27 (released June 1, 2002) [1]
- development: 1.27_01-dev [2]
  o Apache
- stable: 1.3.27 (released October 3, 2002) [3]
- development: 1.3.28-dev [4]
  o mod_perl 2.0
- beta: 1.99_09 (released April 28, 2003) [5]
- development: 1.99_10-dev [6]
  o Apache 2.0
- stable: 2.0.45 (released March 30, 2003) [7]
- developement: 2.0.46-dev
- new-territories: 2.1.xx
  o Perl
- stable: 5.8.0 (released July 18, 2002) [8]
- development: ...towards 5.9.0 has started [9]


mailing list highlights

  o mod_perl 1.28-tobe pending issues [10]

  o perl.com article on Apache::Test [11]


mp2 porting tips / documentation

  o filtering tutorial / manpages updated [12]

  o [OT] NTLM Authentication for Apache 2 [13]

  o Blocking / throttling clients [14]

  o perl.apache.org documents [15]
  o Apache::compat [16]


links

  o The Apache/Perl Integration Project [17]
  o mod_perl documentation [18]
  o Apache modules on CPAN [19]
  o _Writing Apache Modules with Perl and C_ homepage [20]
  o  _mod_perl Developer's Cookbook_ homepage [21]
  o Other mod_perl-related books [22]
  o mod_perl news and advocacy [23]
  o mod_perl list archives
  - modperl@ [24]
  - dev@ [25]
  - docs-dev@ [26]
  - advocacy@ [27]


problem reporting guidelines

  Whenever you have a problem that you want to ask about on the
  modperl list, please be sure to read the instructions on how to
  report problems:

For mod_perl 1.0 [28]
For mod_perl 2.0 [29]

  For your convenience, these are located in the shortcuts menu on
  all pages at http://perl.apache.org/.  You will save yourself and
  us a lot of time by following the instructions on these pages.

  Thank you!

happy mod_perling...

--James
[EMAIL PROTECTED]

--
[1] http://perl.apache.org/dist/
[2] http://cvs.apache.org/snapshots/modperl/
[3] http://www.apache.org/dist/httpd/
[4] http://cvs.apache.org/snapshots/apache-1.3/
[5] http://perl.apache.org/dist/mod_perl-1.99_04.tar.gz
[6] http://cvs.apache.org/snapshots/modperl-2.0/
[7] http://www.apache.org/dist/httpd/
[8] http://www.cpan.org/src/stable.tar.gz
[9] http://www.cpan.org/src/README.html

[10] http://mathforum.org/epigone/modperl/feespouzom
[11] http://mathforum.org/epigone/modperl/plongplendswing

[12] http://mathforum.org/epigone/modperl/philgrolnil
[13] http://mathforum.org/epigone/modperl/whermquerdflah
[14] http://mathforum.org/epigone/modperl/strorzhenplimp

[15] http://perl.apache.org/docs/2.0/devel/porting/porting.html
[16] http://perl.apache.org/docs/2.0/api/Apache/compat.html

[17] http://perl.apache.org/
[18] http://perl.apache.org/docs/
[19] http://www.cpan.org/modules/by-module/Apache/
[20] http://www.modperl.com/
[21] http://www.modperlcookbook.org/
[22] http://perl.apache.org/docs/offsite/books.html
[23] http://www.take23.org/
[24] http://perl.apache.org/maillist/modperl.html#Searchable_Archives
[25] http://perl.apache.org/maillist/dev.html#Searchable_Archives
[26] http://perl.apache.org/maillist/docs-dev.html#Searchable_Archives
[27] http://perl.apache.org/maillist/advocacy.html#Searchable_Archives

[28] http://perl.apache.org/docs/1.0/guide/help.html#How_to_Report_Problems
[29] http://perl.apache.org/docs/2.0/user/help/help.html#Reporting_Problems


RE: Apache::Cookie

2003-06-03 Thread cap
Yes, but:

use Apache::Cookie;

my $cookie = Apache::Cookie-fetch;
my @values = $cookie-value;

returns errors.




-Original Message-
From: Jason Galea [mailto:[EMAIL PROTECTED]
Sent: Monday, June 02, 2003 5:56 AM
To: [EMAIL PROTECTED]
Cc: modperl
Subject: Re: Apache::Cookie


Have you consulted the documentation?

http://search.cpan.org/author/JIMW/libapreq-1.1/Cookie/Cookie.pm#value


cap wrote:
 i have an application that uses CGI and sets the cookie values 
as a hashref.
 im then attempting to retreive the values with Apache::Cookie with:
 
 $cookies = Apache::Cookie-fetch;
 
 $ccokies is a hashref so i should be able to get the individual 
values with:
 
 $cookies-{uid};
 
 right?  however, this doesn't appear to work.
 
 
 
 




[patch] Apache::DBI can't be made to always ping

2003-06-03 Thread dennis . ingram
We've been having some problems with our Oracle 8.1.5 database on AIX, which has
highlighted what looks like a problem with Apache::DBI. To cut a very long story
short, due to an Oracle problem database handles are becoming invalid reasonably
frequently. In this case, we would expect Apache::DBI to ping on each connect
request as the ping timeout is set to zero. However, it has been returning dead
handles. Enabling the trace feature showed that it did not always ping, the
problem being that if there is a request for a handle within one second, even if
the ping timeout is zero it will not ping.

A patch for this follows, it is simply a matter of changing the time test from a
 to a = in line 103 of version 0.88:

my $needping = (($PingTimeOut{$dsn} == 0 or $PingTimeOut{$dsn}  0) and $now -
$LastPingTime{$dsn} = PingTimeOut{$dsn}) ? 1 : 0;

So far as I can tell this still applies to the most recent version. I would like
to ask the maintainer of this module if this patch or equivalent fix could be
included in the next release of the module.

Apologies if this message is posted to the wrong place, I think I got it
right...

Regards
Dennis Ingram




**
This email with any attachments is confidential and may be
subject to legal privilege.  If it is not intended for you please
reply immediately, destroy it and do not copy, disclose or use
it in any way.
**



RE: Apache::Cookie

2003-06-03 Thread Perrin Harkins
On Mon, 2003-06-02 at 16:30, cap wrote:
 Yes, but:
 
 use Apache::Cookie;
 
 my $cookie = Apache::Cookie-fetch;
 my @values = $cookie-value;
 
 returns errors.

The value() call isn't meant to be used with fetch().  Your original
example looked fine to me.  What was not working about it?  Did you
verify that there was an actual cookie header coming in?

- Perrin


Re: trouble with using $r-lookup_uri()

2003-06-03 Thread Ryan Muldoon
Aaron,

It looks like this did the trickmy module doesn't quite work yet,
but it isn't segfaulting anymore.  Thanks!

--Ryan

On Fri, 2003-05-30 at 22:24, Aaron Ross wrote:
  my $uri = $r-uri;
  my $subr = $r-lookup_uri($uri);
 
 Is this recursing? the subrequest will run all phases but the content
 handler, so
 i would think you'll need to add
 
 return unless $r-is_main();
 
 or something like it at the beginning of the routine.
 
 -- Aaron
 
 


Re: Apache::Cookie

2003-06-03 Thread Perrin Harkins
On Mon, 2003-06-02 at 09:05, cap wrote:
 i have an application that uses CGI and sets the cookie values as a hashref.
 im then attempting to retreive the values with Apache::Cookie with:
 
 $cookies = Apache::Cookie-fetch;
 
 $ccokies is a hashref so i should be able to get the individual values with:
 
 $cookies-{uid};
 
 right?  however, this doesn't appear to work.

I see the problem.  There is mistake in the Apache::Cookie
documentation, but the correct way to do this is shown in the mod_perl
guide:
http://perl.apache.org/docs/1.0/guide/porting.html#Converting_to_use_Apache_Perl_Modules

Change your last line to this:

my $uid = defined $cookies-{'uid'} ? $cookies-{'uid'}-value() :
undef;

- Perrin


Re: modperl 2.0: apache crashes when running modperl script

2003-06-03 Thread Stas Bekman
[EMAIL PROTECTED] wrote:
-8-- Start Bug Report 8--
1. Problem Description:
apache crashes when accessing this modperl script:

package Apache::hello;

use strict;

use Apache::RequestRec ();
use Apache::RequestIO ();
use Apache::Const -compile = 'OK';
sub handler {
  my $request = shift;  # what does shift operate on @_?
  $request-content_type('text/html');
  $request-print(END);
HTML
BODY
H1Hello There/H1
/BODY
/HTML
END
return Apache::OK;
}
2. Used Components and their Configuration:

*** using /usr/download/modperl/mod_perl-1.99_09/t/../lib/Apache/BuildConfig.pm
*** Makefile.PL options:
  MP_AP_PREFIX= /usr/httpd20
  MP_COMPAT_1X= 1
  MP_GENERATE_XS  = 1
  MP_INST_APACHE2 = 1
  MP_LIBNAME  = mod_perl
  MP_USE_DSO  = 1
  MP_USE_STATIC   = 1
that's only a beginning of the report. Where is the rest? Why is it so hard to 
copy-n-paste the report? OK, I'll do that for you.

 3. This is the core dump trace: (if you get a core dump):

 Apache crashes but does not dump core. I set unlimit to unlimited,
 made sure the filesystem from which 'httpd -X' is run has enough free space.
 Still no core. Could not find Bad::Segv module either in modperl or in
 CPAN and therefore could not try to dump using a script like core_dump.pl
 mentioned in 'Debugging mod_perl C Internals' document.
Yeah, I need to update the Bad::Segv part. It's called Debug::DumpCore.

 I was able to run 'httpd -X' from inside gbd and got a stack trace:

 (gdb) bt
 #0  0x402f1f47 in modperl_wbucket_write ()
from /usr/httpd20/modules/mod_perl.so
 #1  0x40638701 in mpxs_Apache__RequestRec_print ()
from 
/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi/auto/Apache/RequestIO/RequestIO.so
 #2  0x406368c6 in XS_Apache__RequestRec_print ()
from 
/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi/auto/Apache/RequestIO/RequestIO.so
 #3  0x403868c5 in Perl_pp_entersub ()
from /usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE/libperl.so
 #4  0x4037f059 in Perl_runops_standard ()
from /usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE/libperl.so
 #5  0x40327139 in S_call_body ()
from /usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE/libperl.so
 #6  0x40326eb6 in Perl_call_sv ()
from /usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE/libperl.so
 #7  0x402ed4e2 in modperl_callback () from /usr/httpd20/modules/mod_perl.so
 #8  0x402ed9e4 in modperl_callback_run_handlers ()
from /usr/httpd20/modules/mod_perl.so
 #9  0x402edc25 in modperl_callback_per_dir ()
from /usr/httpd20/modules/mod_perl.so
 #10 0x402e9105 in modperl_response_handler_run ()
from /usr/httpd20/modules/mod_perl.so
 #11 0x402e9325 in modperl_response_handler_cgi ()
from /usr/httpd20/modules/mod_perl.so
 #12 0x0807b67e in ap_run_handler (r=0x81a9268) at config.c:195
 #13 0x0807bb96 in ap_invoke_handler (r=0x81a9268) at config.c:401
 #14 0x0806baab in ap_process_request (r=0x81a9268) at http_request.c:288
 #15 0x08067ce9 in ap_process_http_connection (c=0x816d458) at http_core.c:293
 #16 0x08084476 in ap_run_process_connection (c=0x816d458) at connection.c:85
 #17 0x0807a234 in child_main (child_num_arg=1080249231) at prefork.c:696
 #18 0x0807a3de in make_child (s=0x80b6178, slot=0) at prefork.c:736
 #19 0x0807a437 in startup_children (number_to_start=5) at prefork.c:808
 #20 0x0807ab29 in ap_mpm_run (_pconf=0x8079b10, plog=0x80ebb50, s=0x80b6178)
 at prefork.c:1024
 #21 0x0807f842 in main (argc=2, argv=0xba74) at main.c:660
 #22 0x420158d4 in __libc_start_main () from /lib/i686/libc.so.6

The problem with this trace is that it doesn't show the arguments. You need to 
build mod_perl with MP_DEBUG=1 and generate it again.

__
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


Apache::Status for 2.0 ?

2003-06-03 Thread WC -Sx- Jones
Please bear with me -- I have recently picked up Apache2 and now trying 
out mod_perl2

I see Apache::Status listed under the mod_perl2 docs -
http://perl.apache.org/docs/2.0/api/Apache/Status.html
But I only see mod_perl 1.27 on the CPAN site;

Is there another place to obtain a mod_perl2 type module?

( I did search the archives as best I was able - but I only see 
postings about Apache::Status since 1999... )

I am not real sure I want to install mod_perl1 over my mod_perl2 
Apache2 server code...

???/Sx ?



Re: Apache::Status for 2.0 ?

2003-06-03 Thread Stas Bekman
WC -Sx- Jones wrote:
Please bear with me -- I have recently picked up Apache2 and now trying 
out mod_perl2

I see Apache::Status listed under the mod_perl2 docs -
http://perl.apache.org/docs/2.0/api/Apache/Status.html
But I only see mod_perl 1.27 on the CPAN site;
mod_perl-1.99_09 is not indexed by PAUSE, hence you can't see it. (because of 
_09). If you have installed it, you already have it. It's part of the distro.

Is there another place to obtain a mod_perl2 type module?

( I did search the archives as best I was able - but I only see postings 
about Apache::Status since 1999... )
Grab it from here:
http://perl.apache.org/download/index.html
I am not real sure I want to install mod_perl1 over my mod_perl2 Apache2 
server code...
;)



__
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


Re: Apache::Status for 2.0 ?

2003-06-03 Thread WC -Sx- Jones
On Monday, June 2, 2003, at 08:29  PM, Stas Bekman wrote:

WC -Sx- Jones wrote:

I see Apache::Status listed under the mod_perl2 docs -
http://perl.apache.org/docs/2.0/api/Apache/Status.html


mod_perl-1.99_09 is not indexed by PAUSE, hence you can't see it. 
(because of _09). If you have installed it, you already have it. It's 
part of the distro.


You mean Apache::Status is in the mod_perl-1.99_09 build I downloaded ?

???/Sx ?



Re: Apache::Status for 2.0 ?

2003-06-03 Thread Stas Bekman
WC -Sx- Jones wrote:
On Monday, June 2, 2003, at 08:29  PM, Stas Bekman wrote:

WC -Sx- Jones wrote:


I see Apache::Status listed under the mod_perl2 docs -
http://perl.apache.org/docs/2.0/api/Apache/Status.html



mod_perl-1.99_09 is not indexed by PAUSE, hence you can't see it. 
(because of _09). If you have installed it, you already have it. It's 
part of the distro.


You mean Apache::Status is in the mod_perl-1.99_09 build I downloaded ?
Have you looked?

http://perl.apache.org/dist/mod_perl-2.0-current/lib/Apache/Status.pm

__
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


Re: Apache::Status for 2.0 ?

2003-06-03 Thread WC -Sx- Jones
On Monday, June 2, 2003, at 09:19  PM, Stas Bekman wrote:
Have you looked?

http://perl.apache.org/dist/mod_perl-2.0-current/lib/Apache/Status.pm


Yes, of course.  :)

My question:  Was it not installed when I built mod_perl2 ?

So, on my server I looked for Apache --
[ results edited to remove ../docs and $HOME matches ]
# find / -name Apache -print
...
/usr/local/lib/perl5/site_perl/5.8.0/sun4-solaris-thread-multi-64int/ 
auto/Apache
/usr/local/lib/perl5/site_perl/5.8.0/sun4-solaris-thread-multi-64int/ 
Apache
...

Then I looked for Status -

# find / -name Status -print

( nothing is returned... )

Therefore it was not built when I installed mod_perl 2.

-Sx-



Re: Apache::Status for 2.0 ?

2003-06-03 Thread WC -Sx- Jones
On Monday, June 2, 2003, at 09:19  PM, Stas Bekman wrote:
http://perl.apache.org/download/index.html


Shouldn't there be a warning about mod_perl2 and CPAN then?  CPAN 
definitely wants to download and install mod_perl1 -- even over a 
valid mod_perl2 installation...

Regarding the following off the Other Modules link on the download 
page:

 There are several other Perl modules that you might wish to have 
installed, to take full advantage of mod_perl functionality. Provided 
you have Andreas König's CPAN.pm  module, simply run:

  cpan install Bundle::Apache

This will fetch and install mod_perl and related packages for you all 
at once. Otherwise, once you've installed mod_perl see the listing by 
running

  % perldoc Bundle::Apache


I mean I have already built and used mod_perl2 now for a week -- can I 
cast a vote to have CPAN updated?

-Sx-  :)



Re: Apache::Status for 2.0 ?

2003-06-03 Thread WC -Sx- Jones
Ignore me -

On Monday, June 2, 2003, at 09:37  PM, WC -Sx- Jones wrote:


Yes, of course.  :)

My question:  Was it not installed when I built mod_perl2 ?
I found (something) at

/usr/local/lib/perl5/site_perl/5.8.0/sun4-solaris-thread-multi-64int/ 
Apache/Status.pm

Now all I have to do is figure out why it doesn't seem to want to  
work...

Sorry/Sx



Re: Apache::Status for 2.0 ?

2003-06-03 Thread Stas Bekman
WC -Sx- Jones wrote:
On Monday, June 2, 2003, at 09:19  PM, Stas Bekman wrote:

Have you looked?

http://perl.apache.org/dist/mod_perl-2.0-current/lib/Apache/Status.pm


Yes, of course.  :)

My question:  Was it not installed when I built mod_perl2 ?

So, on my server I looked for Apache --
[ results edited to remove ../docs and $HOME matches ]
# find / -name Apache -print
...
/usr/local/lib/perl5/site_perl/5.8.0/sun4-solaris-thread-multi-64int/ 
auto/Apache
/usr/local/lib/perl5/site_perl/5.8.0/sun4-solaris-thread-multi-64int/ 
Apache
...

Then I looked for Status -

# find / -name Status -print
it should be either:

find / -name Status.pm -print

or

find / -name Status* -print

( nothing is returned... )

Therefore it was not built when I installed mod_perl 2.
run 'make install' and see whether it gets installed. I think if you correctly 
use find's syntax you will find it.

It sure thing gets installed on my machine:

find /home/stas/perl/blead | grep Apache/Status.pm
/home/stas/perl/blead/lib/site_perl/5.9.0/i686-linux/Apache/Status.pm
/home/stas/perl/blead/lib/site_perl/5.9.0/i686-linux/Apache2/Apache/Status.pm
The first one is from mod_perl-1.27 distro, the second one is from 
mod_perl-1.99_09 distro.

__
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


Re: Apache::Status for 2.0 ?

2003-06-03 Thread Stas Bekman
WC -Sx- Jones wrote:
On Monday, June 2, 2003, at 09:19  PM, Stas Bekman wrote:

http://perl.apache.org/download/index.html


Shouldn't there be a warning about mod_perl2 and CPAN then?  CPAN 
definitely wants to download and install mod_perl1 -- even over a 
valid mod_perl2 installation...

Regarding the following off the Other Modules link on the download page:

 There are several other Perl modules that you might wish to have 
installed, to take full advantage of mod_perl functionality. Provided 
you have Andreas König's CPAN.pm  module, simply run:

  cpan install Bundle::Apache

This will fetch and install mod_perl and related packages for you all 
at once. Otherwise, once you've installed mod_perl see the listing by 
running

  % perldoc Bundle::Apache


I mean I have already built and used mod_perl2 now for a week -- can I 
cast a vote to have CPAN updated?
CPAN is updated. But it's not indexed. It won't get indexed untill mod_perl 
2.0 is released (that's _ is dropped from the distro name) and we aren't ready 
 for this yet.

You can get it from my CPAN dir: 
http://search.cpan.org/author/STAS/mod_perl-1.99_09/

__
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


Re: Apache::Status for 2.0 ?

2003-06-03 Thread Stas Bekman
WC -Sx- Jones wrote:
Ignore me -

On Monday, June 2, 2003, at 09:37  PM, WC -Sx- Jones wrote:


Yes, of course.  :)

My question:  Was it not installed when I built mod_perl2 ?


I found (something) at

/usr/local/lib/perl5/site_perl/5.8.0/sun4-solaris-thread-multi-64int/ 
Apache/Status.pm

Now all I have to do is figure out why it doesn't seem to want to  work...
because it's a version for mod_perl 1. You should have used Apache2 to get the 
new module. See:
http://perl.apache.org/docs/2.0/user/intro/start_fast.html#Configuration



__
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


Re: [mp2] make test fails on redhat 8.0 with 1.99_09 and 1.99_10-devsources

2003-06-03 Thread Stas Bekman
Haroon Rafique wrote:
system details are posted as cut-and-paste from t/REPORT output at the end 
of the email.

Background:

1. make test passes 100% with 1.99_08
2. make test fails to start the webservers with 1.99_09
3. make test fails to start the webservers with 1.99_10-dev (cvs)
Right, the new feature was introduced in 1.99_09

In the case of 1.99_09, following happens after running make test

[Mon Jun 02 15:55:16 2003] [error] Invalid CODE attribute: 
TestFilter::out_init_basic at 
/home/haroon/src/build/mod_perl-1.99_09/t/filter/TestFilter/out_init_basic.pm 
line 33
BEGIN failed--compilation aborted at 
/home/haroon/src/build/mod_perl-1.99_09/t/filter/TestFilter/out_init_basic.pm 
line 33.
Compilation failed in require at (eval 21) line 3.
I hate when this happens :( I remember seeing this problem at some point, but 
I wasn't able to reproduce it since then. I have exactly the same perl build 
as in your report. The only difference is that I've built it with: 
-Doptimize='-g'. I'm not sure if it'd make any difference. But can you try 
building a custom perl using -Doptimize='-g' and all the options that you had:

config_args='-des -Doptimize=-O2 -march=i386 -mcpu=i686 
-Dmyhostname=localhost [EMAIL PROTECTED] -Dcc=gcc -Dcf_by=Red 
Hat, Inc. -Dinstallprefix=/usr -Dprefix=/usr -Darchname=i386-linux 
-Dvendorprefix=/usr -Dsiteprefix=/usr -Duseshrplib -Dusethreads 
-Duseithreads -Duselargefiles -Dd_dosuid -Dd_semctl_semun -Di_db -Ui_ndbm 
-Di_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm -Duseperlio 
-Dinstallusrbinperl -Ubincompat5005 -Uversiononly -Dpager=/usr/bin/less 
-isr'
and give it another try?

Anybody else sees this problem?

Another difference from perl -v is
-libc=/lib/libc-2.2.92.so, so=so, useshrplib=true, libperl=libperl.so
-gnulibc_version='2.2.92'
+libc=/lib/libc-2.2.5.so, so=so, useshrplib=true, libperl=libperl.so
+gnulibc_version='2.2.5'
but I doubt this has anything to do with 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


RE: Apache::Cookie

2003-06-03 Thread cap
Well, here's what I have to do to get direct access to values from the
original cookie hash:

my $cookies = Apache::Cookie-fetch;
my %hash = defined $cookies-{'session'} ? $cookies-{'session'}-value :
undef;

Strange. Thanks for the lead.




-Original Message-
From: Perrin Harkins [mailto:[EMAIL PROTECTED]
Sent: Monday, June 02, 2003 2:41 PM
To: [EMAIL PROTECTED]
Cc: modperl
Subject: Re: Apache::Cookie


On Mon, 2003-06-02 at 09:05, cap wrote:
 i have an application that uses CGI and sets the cookie values
as a hashref.
 im then attempting to retreive the values with Apache::Cookie with:

 $cookies = Apache::Cookie-fetch;

 $ccokies is a hashref so i should be able to get the individual
values with:

 $cookies-{uid};

 right?  however, this doesn't appear to work.

I see the problem.  There is mistake in the Apache::Cookie
documentation, but the correct way to do this is shown in the mod_perl
guide:
http://perl.apache.org/docs/1.0/guide/porting.html#Converting_to_us
e_Apache_Perl_Modules

Change your last line to this:

my $uid = defined $cookies-{'uid'} ? $cookies-{'uid'}-value() :
undef;

- Perrin




Re: Apache::Cookie

2003-06-03 Thread Stas Bekman
cap wrote:
Well, here's what I have to do to get direct access to values from the
original cookie hash:
my $cookies = Apache::Cookie-fetch;
my %hash = defined $cookies-{'session'} ? $cookies-{'session'}-value :
undef;
Strange. Thanks for the lead.
That's a bogus code. Obviously you are running without warnings mode on. Add:

use warnings;

and you will see why it is bogus. Perhaps your cookie was always valid so you 
didn't notice it. Howerer:

perl -lwe '%h = undef'
Name main::h used only once: possible typo at -e line 1.
Odd number of elements in hash assignment at -e line 1.
Use of uninitialized value in list assignment at -e line 1.



-Original Message-
From: Perrin Harkins [mailto:[EMAIL PROTECTED]
Sent: Monday, June 02, 2003 2:41 PM
To: [EMAIL PROTECTED]
Cc: modperl
Subject: Re: Apache::Cookie
On Mon, 2003-06-02 at 09:05, cap wrote:

i have an application that uses CGI and sets the cookie values
as a hashref.

im then attempting to retreive the values with Apache::Cookie with:

$cookies = Apache::Cookie-fetch;

$ccokies is a hashref so i should be able to get the individual
values with:

$cookies-{uid};

right?  however, this doesn't appear to work.
I see the problem.  There is mistake in the Apache::Cookie
documentation, but the correct way to do this is shown in the mod_perl
guide:
http://perl.apache.org/docs/1.0/guide/porting.html#Converting_to_us
e_Apache_Perl_Modules
Change your last line to this:

my $uid = defined $cookies-{'uid'} ? $cookies-{'uid'}-value() :
undef;
- Perrin




--

__
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


Re: Missing html code using dynagzip

2003-06-03 Thread Scott Alexander
On Mon, 2 Jun 2003, Slava Bizyayev wrote:

 I guess, your problem is out of Apache::Dynagzip. Please, try to follow:

 1. Make sure your script is producing correct response under
 Apache::Registry.

Yes it does


 2. Make sure your script does not have any internal conditional branches on
 whether it runs under Apache::Registry, or under Apache::RegistryFilter -
 Apache::Dynagzip.


No it doesn't

 3. Do your transition from Apache::Registry configuration to
 Apache::RegistryFilter - Apache::Dynagzip configuration by simple
 replacement of the line:

 PerlHandler Apache::Registry

 with the following two lines:

 PerlHandler Apache::RegistryFilter Apache::Dynagzip
 PerlSetVar Filter On


Okay now it works! So problem was in my httpd.conf file.

Now I only have

Directory /usr/local/systems/work/

   # AUTH
AuthType Apache::Authenticate
AuthName protected
PerlAccessHandler Apache::OpenAccess
PerlAuthenHandler Apache::Authenticate-authenticate
require valid-user

   Files *.html
PerlSendHeader On
SetHandler perl-script
PerlHandler Apache::Registry
Options +ExecCGI
   /Files

## DYNA
Files *.pl
 PerlSendHeader On
 SetHandler perl-script
 PerlHandler Apache::RegistryFilter Apache::Dynagzip
 PerlSetVar Filter On
 Options +ExecCGI
#PerlSetVar LightCompression On

# Below not needed ??
#PerlSetVar UseCGIHeadersFromScript Off
#PerlSendHeader Off
#PerlSetupEnv On

/Files
/Directory



 You may optionally add light compression finally if you want. You are not
 supposed to change any other settings.


But if I turn on PerlSetVar LightCompression On the problem comes back.
I had tested having this line commented out but it made no difference.

Anyway good that it is working.

Thanks.

Regards
Scott

 4. Let us know details of what you finally have.

 Thanks,
 Slava


 - Original Message -
 From: Scott Alexander [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, June 02, 2003 5:26 AM
 Subject: Missing html code using dynagzip


  Hi,
 
  When using
 
  Files *.pl
  SetHandler perl-script
  PerlHandler Apache::RegistryFilter Apache::Dynagzip
  PerlSetVar Filter On
 
  PerlSetVar LightCompression On
  Options +ExecCGI
 
  PerlSetVar UseCGIHeadersFromScript Off
  PerlSendHeader Off
  PerlSetupEnv On
  /Files
 
  this setup with NN 6+ the code ends with
 
  /html/html (yes twice) and in IE 6.0 it has just /html  (missing the
  last '' With NN 4.8 it is the same as IE 6.0.
 
  Does anyone know why this happens?
 
  I've tried putting all my output into one print statement. Makes no
  difference.
 
  Scott
 
 
 
 
 
 




Re: Missing html code using dynagzip

2003-06-03 Thread Slava Bizyayev
From: Scott Alexander [EMAIL PROTECTED]
To: Slava Bizyayev [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 12:31 AM
Subject: Re: Missing html code using dynagzip


 Okay now it works! So problem was in my httpd.conf file.

 Now I only have

 Directory /usr/local/systems/work/

# AUTH
 AuthType Apache::Authenticate
 AuthName protected
 PerlAccessHandler Apache::OpenAccess
 PerlAuthenHandler Apache::Authenticate-authenticate
 require valid-user

Files *.html
 PerlSendHeader On
 SetHandler perl-script
 PerlHandler Apache::Registry
 Options +ExecCGI
/Files

 ## DYNA
 Files *.pl
  PerlSendHeader On
  SetHandler perl-script
  PerlHandler Apache::RegistryFilter Apache::Dynagzip
  PerlSetVar Filter On
  Options +ExecCGI
 #PerlSetVar LightCompression On

 # Below not needed ??
 #PerlSetVar UseCGIHeadersFromScript Off
 #PerlSendHeader Off
 #PerlSetupEnv On

These depend on your global settings, and on requirements of your script
only. You should never add them for Apache::Dynagzip exclusively.

 /Files
 /Directory

 But if I turn on PerlSetVar LightCompression On the problem comes back.
 I had tested having this line commented out but it made no difference.

Wow! Sounds like the first bug in Compress::LeadingBlankSpaces...

Let's talk about that. Compress::LeadingBlankSpaces is prutty simple class.
It is not that important when your content is really gzipped, because blank
spaces are compressed very effectively. It is mostly required for some old
and buggy clients who does not understand gzip really (NN-4.X for instance).

BTW do you use Apache::CompressClientFixup? It should help to serve NN-4.X
appropriately.

Back to Compress::LeadingBlankSpaces, could you send me your version number?

Thanks,
Slava




USE_ENVIRON_ARRAY

2003-06-03 Thread Beau E. Cox
Hi -

I'm working on an embedding project, and using mod_perl
as a tutorial (OK, I'm sometimes blatantly stealing code :)).
My tests on a WIN32 box (Win2K) are somewhat flaky.
Linux is solid. A grep of mod perl source on WIN32 led me
to so pretty strange environment array spoofing based upon
#ifdef USE_ENVIRON_ARRAY in modperl_perl.c.

The only greps to USE_ENVIRON_ARRAY are in
modperl_perl.c. NO greps in the Perl source. NO references
(that I could find) on the mod_perl web site.

Does anyone know if this is used? If so, where can I look to get
an idea of what it is for (my guess is to tell whether or not to
pass the environment array to perl_... calls)?

Aloha = Beau;



ANNOUNCE: CGI::Application 3.1

2003-06-03 Thread Jesse Erlbaum
Version 3.1 of CGI::Application is now available via CPAN!


Download site for CGI::Application:

  http://search.cpan.org/dist/CGI-Application/


CHANGES SINCE VERSION 3.0:
- Changed dump_html default run-mode to be referenced by name 
  instead of sub-ref.  This allows dump_html() to be overridden 
  in sub-class.
- Added current run-mode to output of dump() and dump_html().
  (Thanks to Mark Stosberg for the suggestion.)
- Added example of doing an HTTP redirect (suggested by Sam Tregar)
- Fixed bug where non-CGI.pm query objects couldn't be set
  at initialization time via the new() method.  (Thanks to Steve 
  Hay for the catch.)
- Added header_type(none) to suppress HTTP header output.
  (Thanks to Steve Comrie for the suggestion.)
- Numerous typos corrected in POD.
- Added cgiapp_postrun() hook.  This hook allows run-mode output
  to be pipelined through optional filters, modifying the
  content and HTTP headers if so desired.


Read the article Using CGI::Application on Perl.com for an 
overview of this module and its usage:

  http://www.perl.com/pub/a/2001/06/05/cgi.html


CGI::Application is intended to make it easier to create sophisticated,
reusable web-based applications. This module implements a methodology
which,
if followed, will make your web software easier to design, easier to
document, easier to write, and easier to evolve.

CGI::Application builds on standard, non-proprietary technologies and 
techniques, such as the Common Gateway Interface and Lincoln D. Stein's 
excellent CGI.pm module.  CGI::Application judiciously avoids employing 
technologies and techniques which would bind a developer to any one set 
of tools, operating system or web server.

The guiding philosophy behind CGI::Application is that a web-based
application can be organized into a specific set of Run-Modes. Each
Run-Mode is roughly analogous to a single screen (a form, some output,
etc).
All the Run-Modes are managed by a single Application Module which is
a
Perl module. In your web server's document space there is an Instance
Script which is called by the web server as a CGI (or an
Apache::Registry
script if you're using Apache + mod_perl).

CGI::Application is an Object-Oriented Perl module which implements an
Abstract Class. It is not intended that this package be instantiated
directly. Instead, it is intended that your Application Module will be
implemented as a Sub-Class of CGI::Application.

If you have any questions, comments, bug reports or feature suggestions,

post them to the support mailing list!  To join the mailing list, simply
send a blank message to [EMAIL PROTECTED].


--

  Jesse Erlbaum
  The Erlbaum Group
  [EMAIL PROTECTED]
  Phone: 212-684-6161
  Fax: 212-684-6226





Problem with a custom response handler and mod_perl 2

2003-06-03 Thread Alejandro Galue

Hello,

I'm using redhat 8.0 (mod_perl-1.99_05-3, httpd-2.0.40-11.3). I created
a custom handler for http responses, and I get this error in httpd log:

[Tue Jun 03 07:42:53 2003] [error] [client 127.0.0.1] Can't locate
object method header_in via package Apache::RequestRec at
/usr/lib/perl5/site_perl/sgi/apache/cgi/init.pm line 27.!, referer:
http://localhost:8080/main.html

BUT, I have other redhat 8.0 implementation with the same handler and
does not have this problem.

Any suggestions
Thanks...

Alejandro




mod_perl and CGI.pm and version 1.x and hell

2003-06-03 Thread Henrique Pantarotto
Hello!

after being a long time away (over 4 years since my last post on this
list), I started again with some development with mod_perl for this
company that I currently work for.

I'm having some trouble with CGI.pm working with mod_perl2.  I searched
the mailing-list for this and I found many different point of views for
this problem, some say it should work, and some say it doesn't.  I've
tested it and it really doesn't work as is.  This guy clearly says
that CGI.pm is incompatible with mod_perl2:

http://marc.theaimsgroup.com/?l=apache-modperlm=103619647305553w=2

This isn't really a big problem, but I have 3 ways out:

1) help make CGI.pm compatible with mod_perl2 if at all possible

2) replace all CGI.pm calls with simple homemade cgi functions (not
difficult, it's just that we have to correct many scripts that already
count on CGI.pm), or use that Apache::compat thing

3) downgrade apache to 1.3.27 and mod_perl to 1.27 and be happy

Option 3 seems okay, excect for the fact that I am that kind of Linux
user that is always upgrading everything to the latest version possible. 
This applies to linux kernel, apache, etc.  I don't really have a reason
to do this, but I have always done it anyway.

So to use apache 1.3.27 and mod_perl 1.27 goes against my nature.  Am I
going to hell if I do this?  Seriously, does mod_perl2 offer much more
features and benefits then mod_perl1?  I really only care for speed and
stability for simple perl scripts that use CGI/DBI/DBD::mysql modules.

Is it okay if I use mod_perl and apache 1.x today, or it's better to
move to 2.x already?


Thanks, Henrique.