Re: [OT] Re: fancy perl2html replacement

2001-06-19 Thread brian moseley


neat! thanks for the info.

On Wed, 20 Jun 2001, Stas Bekman wrote:

> On Tue, 19 Jun 2001, brian moseley wrote:
>
> >
> > warning: these questions are completely off list topic, but
> > i bet they're still interesting to lots of you.
>
> You want to take these questions to a list designed especially for this
> purpose: [EMAIL PROTECTED] And check CPAN, there is a bunch of new
> packages extending pod (of course they are all discussed here).
>
> You can check the list's archive here:
>
> http:[EMAIL PROTECTED]/
>
> _
> Stas Bekman  JAm_pH --   Just Another mod_perl Hacker
> http://stason.org/   mod_perl Guide  http://perl.apache.org/guide
> mailto:[EMAIL PROTECTED]   http://apachetoday.com http://eXtropia.com/
> http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
>
>




[OT] Re: fancy perl2html replacement

2001-06-19 Thread Stas Bekman

On Tue, 19 Jun 2001, brian moseley wrote:

>
> warning: these questions are completely off list topic, but
> i bet they're still interesting to lots of you.

You want to take these questions to a list designed especially for this
purpose: [EMAIL PROTECTED] And check CPAN, there is a bunch of new
packages extending pod (of course they are all discussed here).

You can check the list's archive here:

http:[EMAIL PROTECTED]/

_
Stas Bekman  JAm_pH --   Just Another mod_perl Hacker
http://stason.org/   mod_perl Guide  http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]   http://apachetoday.com http://eXtropia.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/





fancy perl2html replacement

2001-06-19 Thread brian moseley


warning: these questions are completely off list topic, but
i bet they're still interesting to lots of you.

does anybody know if nice fancey pod2html replacements
exist? specifically, i want a tool that generates framesets
with package and class indexes like javadoc does.

also, what's the opinion on extending pod? my method
documentation currently looks like this:

  =head2 METHODS

  =over

  =item new()

  Construct and return an instance.

  =item setFooBar($value)

  Sets the value of the FooBar.

  B

  =over

  =item $value

  the value to set

  =back

  B

  =over

  =item B

  if something goes wrong

  =back

  =back

wouldn't it be nicer to have a set of compact constructs for
code documentation? maybe like so:

  =constructor new()

  Construct and return an instance.

  =method setFooBar($value)

  Sets the value of the FooBar.

  =param $value

  the value to set

  =exception B

  if something goes wrong

would enable the fancy javadoc-like tool to easily generate
constructor and method summary and detail lists and to
format all that stuff in attractive and easy to read ways,
rather than having big sets of lists that are semantically
meaningless.

i bet somebody's gonna say "hey, use xml instead!" but then
i lose all the pod support built into tools like makemaker.




Unable to build apache + mod_perl on AIX

2001-06-19 Thread Steven Lembark

 apache_1.3.20  mod_perl-1.25
AIX kbs80 3 4 000C30CD4C00 unknown

Problem:  regardless of what arg's I've tried or all-in-one, one-step I 
keep getting
xlC as the compier and CFLAGS which include "-qlonglong -q32 -maxmem'.   xlC
then fails to compile apache.

Running ./configure --blah in the apache directory w/ CC=/path/to/gcc and
CFLAGS='-O2 -I/blah -L/blah' gives me a working copy of apache -- sans 
mod_perl.

Running "find . -type f | xargs grep -il qlonglong" and '... grep -il xlC' 
in the mod_perl
and apache directories gets me NADA.   This includes the documentation, 
source,
Makefiles, inputs, you-name-it.

Question:  What is a way to run some combination of "perl Makefile.PL" with 
or
without ./configure for apache that will cause the result to use $CC and 
$CFLAGS
in my envoronment -- or which piece of code can I hack that is finding xlC 
in hte
first place (sorry, I don't have time to perl -d Makefile.pl at this 
point).

thanx.



Re: mod_perl bof Oreilly Conference TShirts

2001-06-19 Thread Gunther Birznieks

Apparently last year the quantity was 150 for US$10/shirt. This was a 2 
color shirt.

So the damage was US$1500.

However, there are two factors that may lower the cost.

One, perhaps not as many shirts have to produced because the conference 
attendence may be lower this year than last year (although I think the more 
TShirts the better!) ... So I'd rather this not be the case.

And two, Randal has generously proposed using a contact of us that may be 
able to produce similar or better quality for as low as US$5/shirt. Of 
course, so that I do not raise expectations falsely, I will add that this 
may depend on quantity and it remains to be made into a concrete 
negotiation with the supplier for these additional shirts.

So if the cost actually did go down to half, the cost for 150 shirts would 
be US$750.

Merely the cost of Windows 2000 Enterprise Edition. If a corporation out 
there can spend money on a proprietary operating system, surely they can 
help sponsor a rag-tag bunch of misfits on a mission to save the Earth... 
oh, sorry, got carried away while watching the SciFi channel...

Later,
Gunther

At 03:49 PM 6/19/01 -0700, James wrote:
>What's the qty? What's the price?
>
>James.
>
> > Jimi Thompson wrote:
> >
> > Gunther,
> >
> > We are still interested in doing the design.  If a corporate sponsor 
> for the
> > printing will step forward, we'd be happy to work their logo into the 
> design.
> >
> > Jimi
> >
> >  - Original Message -
> >  From: Gunther Birznieks
> >  To: mod_perl list
> >  Sent: Saturday, June 16, 2001 10:17 AM
> >  Subject: mod_perl bof Oreilly Conference TShirts
> >
> >  A month ago I posed a question about TShirts for mod_perl BOF.
> >
> >  One group of people did volunteer to do the design and posted
> >  interest on
> >  here. So if they are still up for it, it would be awesome to start
> >  discussing ideas/proof of concept.
> >
> >  However, before such a thing can be discussed, unfortunately no one
> >  has
> >  come up to be able to sponsor the cost for the T-Shirts. So I figure
> >  I
> >  would raise the question again in case someone has a company that
> >  would be
> >  willing to corporate sponsor such a thing.
> >
> >  __
> >  Gunther Birznieks ([EMAIL PROTECTED])
> >  eXtropia - The Open Web Technology Company
> >  http://www.eXtropia.com/

__
Gunther Birznieks ([EMAIL PROTECTED])
eXtropia - The Open Web Technology Company
http://www.eXtropia.com/




[ANNOUNCE] libapreq 0.33 released

2001-06-19 Thread Jim Winstead

(this is the package that provides Apache::Request and
Apache::Cookie.)

The URL

http://httpd.apache.org/dist/httpd/libapreq-0.33.tar.gz

has entered CPAN as

  file: $CPAN/authors/id/J/JI/JIMW/libapreq-0.33.tar.gz
  size: 156885 bytes
   md5: 48c4c244db77c1855c6e4a6185e6ccdf

more information is at:

  http://httpd.apache.org/apreq/

the changes since 0.31 (the last official full release):

=item 0.33 - June 17, 2001

$r->upload can be set to another Apache::Upload instance [dougm]
based on patch from Dave LaMacchia <[EMAIL PROTECTED]>

=item 0.32 - April 4, 2001

fix $r->param( key => [ 0..9 ] ), convert to XS. [Joe Schaefer
<[EMAIL PROTECTED]>] Thanks to Jody Biggs <[EMAIL PROTECTED]> for the
spot and suggested fix.

req->upload_hook, req->hook_data added. [David Welton
<[EMAIL PROTECTED]>]

upload->tempname, req->temp_dir; $upload->link(), $upload->tempname()
added. [Joe Schaefer <[EMAIL PROTECTED]>]

handle cookies containing "&", "=" in data. [Joe Schaefer
<[EMAIL PROTECTED]>]

$r->parms can be set to another Apache::Table instance [dougm]

fix compile errors when PerlIO is used [dougm, Randy Kobes
<[EMAIL PROTECTED]>]

fix subclassing mechanism so the the value of an `r' or `_r' key can
be a hash ref [dougm]

fix win32 build (requires mod_perl later than 1.24_01) [Randy Kobes
<[EMAIL PROTECTED]>]

Handle cookies with names but no value [David Welton
<[EMAIL PROTECTED]>]

AIX compile fixes [Jens-Uwe Mager <[EMAIL PROTECTED]>]

=item 0.31_03 - December 23, 2000

Apache::Request->instance [Matt Sergeant <[EMAIL PROTECTED]>]

=item 0.31_02 - December 17, 2000

autoconf support [Tom Vaughan <[EMAIL PROTECTED]>]

also parse r->args if content-type is multipart [Ville Skytt\xe4
<[EMAIL PROTECTED]>]

deal properly with Apache::Cookie->new(key => undef) thanks to Matt
Sergeant for the spot

fix parsing of Content-type header to deal with charsets [Artem
Chuprina <[EMAIL PROTECTED]>]

fix nasty bug when connection is broken during file upload thanks to
Jeff Baker for the spot

multipart_buffer.[ch] renamed to apache_multipart_buffer.[ch]

=item 0.31_01 - December 4, 2000

keep reusing same buffer when handling file uploads to prevent
overzealous memory allocation [Yeasah Pell, Jim Winstead
<[EMAIL PROTECTED]>]

handle internet explorer for the macintosh bug that sends corrupt mime
boundaries when image submit buttons are used in multipart/form-data
forms [Yeasah Pell]

fix uninitialized variable in ApacheRequest_parse_urlencoded [Yeasah
Pell]



Re: mod_perl bof Oreilly Conference TShirts

2001-06-19 Thread James

What's the qty? What's the price?

James.

> Jimi Thompson wrote:
> 
> Gunther,
> 
> We are still interested in doing the design.  If a corporate sponsor for the
> printing will step forward, we'd be happy to work their logo into the design.
> 
> Jimi
> 
>  - Original Message -
>  From: Gunther Birznieks
>  To: mod_perl list
>  Sent: Saturday, June 16, 2001 10:17 AM
>  Subject: mod_perl bof Oreilly Conference TShirts
> 
>  A month ago I posed a question about TShirts for mod_perl BOF.
> 
>  One group of people did volunteer to do the design and posted
>  interest on
>  here. So if they are still up for it, it would be awesome to start
>  discussing ideas/proof of concept.
> 
>  However, before such a thing can be discussed, unfortunately no one
>  has
>  come up to be able to sponsor the cost for the T-Shirts. So I figure
>  I
>  would raise the question again in case someone has a company that
>  would be
>  willing to corporate sponsor such a thing.
> 
>  __
>  Gunther Birznieks ([EMAIL PROTECTED])
>  eXtropia - The Open Web Technology Company
>  http://www.eXtropia.com/



Re: mod_perl bof Oreilly Conference TShirts

2001-06-19 Thread Jimi Thompson



Gunther,
 
We are still interested in doing the design.  
If a corporate sponsor for the printing will step forward, we'd be happy to work 
their logo into the design.
 
Jimi

  - Original Message - 
  From: 
  Gunther 
  Birznieks 
  To: mod_perl list 
  Sent: Saturday, June 16, 2001 10:17 
  AM
  Subject: mod_perl bof Oreilly Conference 
  TShirts
  A month ago I posed a question about TShirts for mod_perl 
  BOF.One group of people did volunteer to do the design and posted 
  interest on here. So if they are still up for it, it would be awesome to 
  start discussing ideas/proof of concept.However, before such a 
  thing can be discussed, unfortunately no one has come up to be able to 
  sponsor the cost for the T-Shirts. So I figure I would raise the question 
  again in case someone has a company that would be willing to corporate 
  sponsor such a 
  thing.__Gunther 
  Birznieks ([EMAIL PROTECTED])eXtropia 
  - The Open Web Technology Companyhttp://www.eXtropia.com/


Re: Cached Code Disappeared?

2001-06-19 Thread Perrin Harkins

> Still seeking assistance form anyone who is experienced with sockets and
> mod-perl /apache on NT.

No NT here, but...

> Anyway, as my previous email showed, I built a site which used a global
> filehandle to a socket. It worked great for about two hours, and then all
of
> a sudden stopped. After rebooting the apache server, all worked well
again.
>
> I am thinking that the cached code probably went away since no one hit it
> for a while? Does apache give back cached scripts after a certain time of
> not being used?

Not exactly.  An apache child process will eventually die if there's nothing
to keep it busy, but at least one process will always remain, and on Windows
there is always exactly one at any given time (with mod_perl).  If you're
using MaxRequestsPerChild or Apache::SizeLimit or something similar, the
process will eventually be killed and a new one will take it's place,
meaning that code cached during startup.pl/httpd.conf will still be cached
but anything cached in that child will be gone.

You probably don't want to try and change this behavior, since it keeps
processes from growing too large.  However, you should make sure that you
aren't trying to open a socket (or filehandle, or database handle) in the
parent process (during startup) and use it in the children.  Each child will
have to make a new socket the first time.

Hope that helps,
Perrin




Cached Code Disappeared?

2001-06-19 Thread Purcell, Scott

Hello,
Still seeking assistance form anyone who is experienced with sockets and
mod-perl /apache on NT.

Anyway, as my previous email showed, I built a site which used a global
filehandle to a socket. It worked great for about two hours, and then all of
a sudden stopped. After rebooting the apache server, all worked well again. 

I am thinking that the cached code probably went away since no one hit it
for a while? Does apache give back cached scripts after a certain time of
not being used?

And if that is the case, can I tell the server via the config that I want
to keep a certain script or perl module alive in cache for a set time?

Thanks

Scott Purcell




Re: Confusion resolved (was: mod_perl DSO leaking on restart)

2001-06-19 Thread Doug MacEachern

On 19 Jun 2001, Vivek Khera wrote:
 
> Drat.  Not here.  I just sucked down the latest mod_perl CVS with this
> patch, and I still lose 9M per USR1...  Lemme try some tracing to see
> what gives here.  (FreeBSD 4.3, perl 5.005_03)

i mentioned earlier in the thread 5.005_03 has leaks.  although, with the
t/ config (make start_httpd_fork), i see ~140k of leakage per USR1,
compared to 9M is a surprise, but i suppose the 5.005_03 leakage depends
on what you have loaded.





Re: Confusion resolved (was: mod_perl DSO leaking on restart)

2001-06-19 Thread Vivek Khera

> "DM" == Doug MacEachern <[EMAIL PROTECTED]> writes:

DM> On 19 Jun 2001, Vivek Khera wrote:
>> Drat.  Not here.  I just sucked down the latest mod_perl CVS with this
>> patch, and I still lose 9M per USR1...  Lemme try some tracing to see
>> what gives here.  (FreeBSD 4.3, perl 5.005_03)

DM> i mentioned earlier in the thread 5.005_03 has leaks.  although, with the
DM> t/ config (make start_httpd_fork), i see ~140k of leakage per USR1,

Right.  Apparently the size of Volvo semi-trucks.  I guess I'll just
not USR1 the back-end ;-)





SocketConnect

2001-06-19 Thread Purcell, Scott

This replace my earlier WebSiteQuestion post, in which maybe the question
was too broad.

Would there be any issues if I had a perl module called that creates a
global socket handle, and then use that handle throughout a bunch of
different web pages? Or is there any concerns I should be aware of when
doing this kind of persistant socket handle?

Thanks,

Scott Purcell




Re: Apache::AuthDBI

2001-06-19 Thread Douglas Leonard

Standard SQL allows for inserts without specifying field names.
Personally, I think that it is more readable to specify the field names
but it is quite common to not bother doing so.

-- 

<[EMAIL PROTECTED]>

On 19 Jun 2001, Alan E. Derhaag wrote:

> "Christian Heiss" <[EMAIL PROTECTED]> writes:
>
> > [1  ]
> > Hi,
> >
> > I'm using Apache::AuthDBI to verifying the users on my web site.
> >
> >
> >
> > I can connect to the the protected site, but there is a output in the error log:
> >
> > 
>
> > >Use of uninitialized value at /usr/lib/perl5/site_perl/5.005/Apache/AuthDBI.pm 
>line 450
> > >Use of uninitialized value at /usr/lib/perl5/site_perl/5.005/Apache/AuthDBI.pm 
>line 480
> > >Use of uninitialized value at /usr/lib/perl5/site_perl/5.005/Apache/AuthDBI.pm 
>line 481
>
> [...]
>
> > then I put it in the database with:
> > 
>
> > >my $sql = "INSERT INTO  VALUES($userid, $groupid, $pass, ...);
> > of course, before I'm using the quote funktion ($dbh->quote($userid)...)...
>
> What database manager allows SQL without supplying the fields the
> values go into?
>




Re: Requests using If-Modified-Since cause response Set-Cookie to be discarded

2001-06-19 Thread Andrew Gilmartin

> > How can I force Apache to send the Set-Cookie header even if the
> > document being delivered has not changed? I suspect that I am not
the
> > first person to run into this problem. A search of the list was
> > unsuccessful, unfortunately.
>
> i've not tested, but it looks like Set-Cookie is left out on purpose
> (maybe an http rfc compliance thing or just a bug), this patch might
> help..
>
> --- src/main/http_protocol.c~   Tue Apr 17 11:30:14 2001
> +++ src/main/http_protocol.cTue Jun 19 09:46:29 2001
> @@ -2637,6 +2637,7 @@
>  "Warning",
>  "WWW-Authenticate",
>  "Proxy-Authenticate",
> +"Set-Cookie",
>  NULL);
>
>  terminate_header(r->connection->client);

I tested it and it works. Thank you for such a quick and authoritative
answer.

-- Andrew

---
Andrew Gilmartin
Ingenta / Dynamic Diagrams
[EMAIL PROTECTED]





[ANNOUNCE] Apache::ASP v2.17

2001-06-19 Thread Joshua Chamas

Hey,

Apache::ASP v2.17 is in your local CPAN or

  http://www.perl.com/CPAN-local/modules/by-module/Apache/

Mostly this is a bug fix release, with a debugging
enhancement, and a bundled emacs mmm-mode.

The web site for Apache::ASP is http://www.apache-asp.org
and the CHANGES are listed below.

 Apache::ASP provides an Active Server Pages port to the Apache Web
 Server with Perl scripting only, and enables developing of dynamic web
 applications with session management and embedded perl code. There are
 also many powerful extensions, including XML taglibs, XSLT rendering,
 and new events not originally part of the ASP API!

-- Josh
_
Joshua Chamas   Chamas Enterprises Inc.
NodeWorks <- Web Link Checking  Huntington Beach, CA  USA 
http://www.nodeworks.com1-714-625-4051

 + = improvement; - = bug fix

=item $VERSION = 2.17; $DATE="6/17/2001";

 +Added ASP perl mmm-mode subclass and configuration
  in editors/mmm-asp-perl.el file for better emacs support.
  Updated SYNTAX/Editors documentation.

 +Better debugging error message for Debug 2 or 3 settings
  for global.asa errors.  Limit debug output for lines
  preceding rendered script.

 -In old inline include mode, there should no longer
  be the error "need id for includes" when using
  $Response->Include() ... if DynamicIncludes were
  enabled, this problem would not have likely occured
  anyway.  DynamicIncludes are preferrable to use so
  that compiled includes can be shared between scripts.
  This bug was likely introduced in version 2.11.

 -Removed logging from $Response->BinaryWrite() in regular
  debug mode 1 or 2.  Logging still enabled in system Debug mode, -1 or -2

 -Removed other extra system debugging call that is really not
  necessary.



Re: Apache::AuthDBI

2001-06-19 Thread Alan E. Derhaag

"Christian Heiss" <[EMAIL PROTECTED]> writes:

> [1  ]
> Hi,
> 
> I'm using Apache::AuthDBI to verifying the users on my web site.
> 
> 
> 
> I can connect to the the protected site, but there is a output in the error log:
> 
> 
>
> >Use of uninitialized value at /usr/lib/perl5/site_perl/5.005/Apache/AuthDBI.pm line 
>450
> >Use of uninitialized value at /usr/lib/perl5/site_perl/5.005/Apache/AuthDBI.pm line 
>480
> >Use of uninitialized value at /usr/lib/perl5/site_perl/5.005/Apache/AuthDBI.pm line 
>481

[...]

> then I put it in the database with:
> 
>
> >my $sql = "INSERT INTO  VALUES($userid, $groupid, $pass, ...);
> of course, before I'm using the quote funktion ($dbh->quote($userid)...)...

What database manager allows SQL without supplying the fields the
values go into?



Web Site Question

2001-06-19 Thread Purcell, Scott

Hello,

First: I am running apache/mod-perl on a NT box as a web server. Sorry it is
not unix, it is the only tool I can have.

Kind of a forward question, but I am curious about something. My large web
site talks to a back-end product that uses an API and I use the IO::Socket
to talk to it. It is a pure socket application. It takes the place of a
database back-end. 

So my question is, should I create a global socket handle, and then use it
all the time, or is it best to just call for the handle each time I need
request some data?

The reason I ask is as follows: I have the code below which works, but I
cannot seem to ask two socket calls back to back? I don't know why. Maybe it
is a learning curve I have to perfect.

Anyway, I figured I would ask people who would know for their input. So if
anyone has any opinions, could you fill me in?

Thanks for your time,
Scott Purcell

 code that works, called from another file with a &ask routine.
use strict;
use vars qw($socket);

$socket = IO::Socket::INET->new(Proto => 'tcp',PeerAddr =>
'208.238.162.204',PeerPort => '8000') or die ("Socket issue @!");
$socket->autoflush(1);


sub ask {
### perl apache notes for my sanity during testing
  my $counter = 0;
  for (1..5) {
increment_counter();
  }
  
  sub increment_counter{
$counter++;
print "Counter is equal to $counter !\r\n";
  }
    end counter eg for sanity
use IO::Socket;
use CGI;
use CGI::Carp qw(fatalsToBrowser);
# 
my $q = CGI->new;
print $q->header;
print $q->start_html;

my $querystring = "\' \'\$USER_NAME";
my $fieldlist   = "USER_NAME\nPASSWORD\n";
my $db = "/DISK2/VBank/bin/sysdbase/dbuser.dbf";

my $message  =
"DBASEQUERY\nSYSTEM\n$querystring\nLIST\tFIELDS\n$fieldlist\nENDLIST\nLIST\t
DBASES\n$db\nENDLIST\n";

my $msgid = int(rand(1000));
$message = $msgid . "\t" . $message;
my $msgsize = length($message);
print "$message IS OUR MESSAGE\n";
print $socket "\%BEGIN\t$msgsize\n$message";


my $err = 0;
my $header;
my $response;
my $cc;

while ($err < 50) {
if (read($socket, $cc, 1, 0) == 1) {
$header .= $cc;
print "$header is header\n";
if ($header =~ /^\%BEGIN\s+(\d+)\r?\n/) {
my $rspsize = $1;
read($socket, $response, $rspsize, 0);
print "$response is response\n";
exit;
}
} else {
print "NO data\n";
exit;
}
$err++;
}


}



Re: Changing "Normal" pl-scripts to mod_perl

2001-06-19 Thread Cody Sherr


Oliver,

There is a quick guide to doing exactly this at perl.apache.org:

http://perl.apache.org/dist/cgi_to_mod_perl.html

if you run into problems, there is a traps doc:

http://perl.apache.org/dist/mod_perl_traps.html

and if you want a more in depth document, read this:

http://perl.apache.org/guide/

Good luck,

-- 
Cody Sherr

Engineer
Covalent Technologies



On Tue, 19 Jun 2001, Oliver - GoodnGo.COM (R) wrote:

> Hello List,
>
> I know now to configure the apache httpd.conf so that i can use mod_perl.
> What I want to know is how I have to change my old CGI-script which are
> written in Perl so that they  work under mod-perl Apache???
>
> Who give me a hint?
> Are there any example Scripts?
> Oli Etzel
>





RE: Confusion resolved (was: mod_perl DSO leaking on restart)

2001-06-19 Thread Doug MacEachern

On Tue, 19 Jun 2001, Christian Gilmore wrote:

> Doug,
> 
> Will this patch make it into 1.26?

yes.

> If so, is there a slated release date for 1.26?

soon-ish.  you can always configure: PerlSetEnv PERL_DESTRUCT_LEVEL 2
in the meantime.




Re: Requests using If-Modified-Since cause response Set-Cookie tobe discarded

2001-06-19 Thread Doug MacEachern

On Mon, 18 Jun 2001, Andrew Gilmartin wrote:

> I have PerlAuthenHandler handler that sets a cookie on authentication
> success. The cookie records, in part, the time of the last access to
> the site. Therefore for each access the cookie is updated. When a new
> document is accessed or a CGI script is run the cookie is sent to the
> browser. However, if the browser is asking for a document it has
> cached it will send an If-Modified-Since header. The file delivery
> mechanism in Apache will do the right thing with If-Modified-Since
> information and only send the document if, in fact, it has changed.
> Unfortunately, if it has not changed the cookie I set in my handler is
> discarded (no matter if I use $r->header_out() or
> $r->err_header_out()).
> 
> How can I force Apache to send the Set-Cookie header even if the
> document being delivered has not changed? I suspect that I am not the
> first person to run into this problem. A search of the list was
> unsuccessful, unfortunately.

i've not tested, but it looks like Set-Cookie is left out on purpose
(maybe an http rfc compliance thing or just a bug), this patch might
help..

--- src/main/http_protocol.c~   Tue Apr 17 11:30:14 2001
+++ src/main/http_protocol.cTue Jun 19 09:46:29 2001
@@ -2637,6 +2637,7 @@
 "Warning",
 "WWW-Authenticate",
 "Proxy-Authenticate",
+"Set-Cookie",
 NULL);
 
 terminate_header(r->connection->client);





Re: Setting an auth realm dynamically

2001-06-19 Thread Doug MacEachern

On Fri, 15 Jun 2001, Rodney Broom wrote:

> I (like everybody else) have a site that is wholy dynamically
> generated. As such, I can't alway set an auth realm in the config or in
> .htaccess. What I'd like to do is an access handler like this: 
 
> sub handler {
> my $r = shift;
> if ($r->uri =~ m/$some_magic_pattern/|) {
> $r->auth_name($custom_realm);
> $r->auth_type('Basic');

those two should work.

> $r->dir_config('require valid-user');

this will not.  $r->requires could be made writable, but i worry about
getting used to that since it will not work with threaded-2.0 without
changes to apache.





Re: Advanced daemon allocation

2001-06-19 Thread Keith G. Murphy

Matthew Byng-Maddick wrote:
> 
> On Mon, Jun 18, 2001 at 10:41:50AM -0500, Keith G. Murphy wrote:
> >Trevor Phillips wrote:
> >>
> >>Is there any way to control which daemon handles a certain request with apache
> >>1.x?
> >>
> >>eg; Out of a pool of 50 daemons, restricting accesses to a certain mod_perl
> >>application to 10 specific daemons would improve the efficiency of data cached
> >>in those processes.
> >Making sure the browser supports HTTP 1.1 (persistent connections) will
> >get you a lot better performance in many cases, since a particular user
> >will tend to keep hitting the same daemon, so that helps if they're
> >hitting the same or a related script over and over.
> 
> This only works within the keepalive timeout. (default configuration 15s)

Yes, this can have negative implications, as Stas explained.  It's a
really good point, and one I wasn't fully aware of.  It worked well *in
my situation*.
> 
> >In one case, I was seeing really bad performance from an app, but it
> >seemed acceptable to the users, who were all running IE, where I was
> >running Netscape, which still doesn't support 1.1 in version 4
> >browsers.  :-(  Dunno about 6, Mozilla, etc.
> 
> This is only true if you're serving images off the mod_perl server which
> is crazy unless you're generating them.
> 
Well, it certainly also seemed to be true for rapid, *subsequent*
invocations of a script.  No images involved.



Re: Apache::Cookie->fetch fails silently

2001-06-19 Thread Doug MacEachern

On Fri, 15 Jun 2001, Rodney Broom wrote:

> I've got this handler that calls Apache::Cookie->fetch, no problem. It's
> tested and works fine. So I installed the same handler (same machine) on
> a second Apache instance, but now Apache::Cookie->fetch fails, causing
> the handler to terminate. No messages, no nothin'. It doesn't even get
> to the next print() statement after the fetch() call.

try Apache::Cookie->new($r)->parse;

Apache::Cookie->fetch uses the global request_rec which might not be setup
yet, depending on what phase you're in.  you could also set it up yourself
first: Apache->request($r);  Apache::Cookie->fetch;





Re: Advanced daemon allocation

2001-06-19 Thread Keith G. Murphy

Stas Bekman wrote:
> 
> On Mon, 18 Jun 2001, Keith G. Murphy wrote:
> 
> > Trevor Phillips wrote:
> > >
> > > Is there any way to control which daemon handles a certain request with apache
> > > 1.x?
> > >
> > > eg; Out of a pool of 50 daemons, restricting accesses to a certain mod_perl
> > > application to 10 specific daemons would improve the efficiency of data cached
> > > in those processes.
> > >
> > Making sure the browser supports HTTP 1.1 (persistent connections) will
> > get you a lot better performance in many cases, since a particular user
> > will tend to keep hitting the same daemon, so that helps if they're
> > hitting the same or a related script over and over.
> 
> I beg your pardon Keith, but probably in most cases this is a very bad
> suggestion. 

No offense taken.  Notice I said "many" cases, not "most" cases.  ;-) 
But your comment is appreciated:  I certainly wouldn't want to mislead
anyone.  It would be a very bad idea in a busy internet situation.

> By leaving the KeepAlive's on (I guess that's what you refer
> to by persistent connections) 

I say "persistent connections" because in my case, I saw a difference
coming into play between Netscape and IE browsers - and it was because
IE supported HTTP 1.1, thus persistent connections.  Yes, KeepAlive had
to be on to see the effect.

> you tie a server to a user. Which makes your
> service very unscalable. Given that you can afford X servers processes
> running, when X users will get their persistent connection open, your
> service becomes closed to any other users.
>
Of course.  For me it was really very much a poor man's alternative to
setting aside a certain number of daemons for mod_perl.  I really didn't
have enough system resources to do that!
> 
> Your solution is good though if you know that you can have at most X users
> over a long time span. Which is usually the case on the intranet servers
> in the small companies.

Which was exactly my situation.  :-)



Re: Sending Cookies on Page-Reload

2001-06-19 Thread Nenad Steric

Yes i tried it also with no_cache(1),
the problem (i think) is that the page has been sent already 
once without no_cache when the user hits reload.

I don't know if it would be a good idea to disable caching for all pages ..
could i just fake that the the filedate for this page has changed, so that 
only a browser which needs to refresh its cookie will really reload the page ?



Chip Turner wrote:
> 
> Do you have a $r->no_cache(1) somewhere before your send_headers call?
> 
> Chip
> 
> Nenad Steric <[EMAIL PROTECTED]> writes:
> 
> > Hi,
> >
> > i am using a Cookie which has a timeout as a "-value",
> > when it expires i want to send a new one which should replace this one.
> >
> > it the accesshandler is have a
> > "verify_cookie"-method which
> > checks the timeout, if it's expired then i call
> > ...
> > $cookie = CGI::Cookie->new(-name => 'myCookie',... etc -Value => {'Time' => 
>$newtime  })
> > $r->headers_out->add($cookie);
> > ...
> >
> > If the user is surfing to different pages this works,
> > but if he just hits reload the cookie is not being set by the browser
> > (Netscape seems to check the date of the file or something like that)
> > OR the browser gets the old cookie again - at least thats what Konqueror tells me.
> >
> > Is there a way to force a browser to set a new cookie on reload?
> >
> >
> > Thanks,
> >
> > Nenad
> 
> --
> Chip Turner   [EMAIL PROTECTED]
>   RHN Web Engineer



Re: Changing "Normal" pl-scripts to mod_perl

2001-06-19 Thread Stas Bekman

On Tue, 19 Jun 2001, Oliver - GoodnGo.COM (R) wrote:

> Hello List,
>
> I know now to configure the apache httpd.conf so that i can use mod_perl.
> What I want to know is how I have to change my old CGI-script which are
> written in Perl so that they  work under mod-perl Apache???
>
> Who give me a hint?
> Are there any example Scripts?

plenty: http://perl.apache.org/guide/

_
Stas Bekman  JAm_pH --   Just Another mod_perl Hacker
http://stason.org/   mod_perl Guide  http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]   http://apachetoday.com http://eXtropia.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/





Re: Advanced daemon allocation

2001-06-19 Thread Stas Bekman

On Tue, 19 Jun 2001, Keith G. Murphy wrote:

> Matthew Byng-Maddick wrote:
> >
> > On Mon, Jun 18, 2001 at 10:41:50AM -0500, Keith G. Murphy wrote:

> > This is only true if you're serving images off the mod_perl server which
> > is crazy unless you're generating them.
> >
> No images involved, but I was seeing a performance improvement under
> HTTP 1.1. What happened was that the user kept getting the same daemon
> for each invocation of the Apache::CGI script, which seemed to be due to
> HTTP 1.1's persistent connections.

Do you mind if I ask how many users were using the service?

Because if there were just a few, than it's true.


_
Stas Bekman  JAm_pH --   Just Another mod_perl Hacker
http://stason.org/   mod_perl Guide  http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]   http://apachetoday.com http://eXtropia.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/





Changing "Normal" pl-scripts to mod_perl

2001-06-19 Thread Oliver - GoodnGo.COM \(R\)

Hello List,

I know now to configure the apache httpd.conf so that i can use mod_perl.
What I want to know is how I have to change my old CGI-script which are
written in Perl so that they  work under mod-perl Apache???

Who give me a hint?
Are there any example Scripts?
Oli Etzel


BEGIN:VCARD
VERSION:2.1
N:GoodnGo.COM (R);Oliver -
FN:Oliver - GoodnGo.COM (R)
ORG:GoodnGo.COM;Gefü
TITLE:Geschäftsführung
NOTE:Jederzeit suchen wir Partner- und Affiliateprogramme
TEL;WORK;VOICE:0049 (0)89 54071102
TEL;HOME;VOICE:0049 (0)89 54072045
TEL;CELL;VOICE:0170 2781117
TEL;WORK;FAX:0049 (0)89 54071103
TEL;HOME;FAX:0049 (0)89 54072026
ADR;WORK:;1;Westendstrasse 20;München;Bayern;80339
LABEL;WORK;ENCODING=QUOTED-PRINTABLE:1=0D=0AWestendstrasse 20=0D=0AM=FCnchen, Bayern 80339
URL;HOME:http://www.goodnsearch.com
URL;WORK:http://www.goodngo.com
EMAIL;PREF;INTERNET:[EMAIL PROTECTED]
REV:20010619T140909Z
END:VCARD



RE: Confusion resolved (was: mod_perl DSO leaking on restart)

2001-06-19 Thread Christian Gilmore

Doug,

Will this patch make it into 1.26? If so, is there a slated release date
for 1.26?

Thanks,
Christian

> -Original Message-
> From: Doug MacEachern [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 18, 2001 9:04 PM
> To: Paul G. Weiss
> Cc: mod_perl list
> Subject: Re: Confusion resolved (was: mod_perl DSO leaking on restart)
>
>
> ah ha, right, since i always have PERL_DEBUG=1, perl_destruct_level is
> always set to 2.  good find!  it should always be 2 for dso,
> this patch
> seems to fix USE_APXS too.
>
> --- src/modules/perl/mod_perl.c 2001/06/14 04:49:08 1.137
> +++ src/modules/perl/mod_perl.c 2001/06/19 01:59:18
> @@ -259,8 +259,6 @@
>
>  if((pdl = getenv("PERL_DESTRUCT_LEVEL")))
> perl_destruct_level = atoi(pdl);
> -else
> -   perl_destruct_level = PERL_DESTRUCT_LEVEL;
>
>  if(perl_destruct_level < 0) {
> MP_TRACE_g(fprintf(stderr,
> @@ -510,6 +508,7 @@
>  array_header *librefs;
>
>  librefs = xs_dl_librefs((pool *)data);
> +perl_destruct_level = 2;
>  perl_shutdown(NULL, NULL);
>  unload_xs_so(librefs);
>  }
>
>
>
>




[DIGEST] mod_perl digest 2001/06/16

2001-06-19 Thread Geoffrey Young

--

  mod_perl digest
 
 June 10, 2001 - June 16, 2001

--

Recent happenings in the mod_perl world...


Features

  o mod_perl status
  o cvs patches
  o module announcements
  o mailing list highlights
  o links


mod_perl status

  o mod_perl
- stable: 1.25 (released January 29, 2001) [1]
- development: 1.25_01-dev [2]
  o Apache
- stable: 1.3.20 (released May 15, 2001) [3]
- development: 1.3.21-dev [4]
  o Perl
- stable: 5.6.1 (released April 9, 2001) [5]
- development: 5.7.1 [6]


cvs patches

  o win32 fixes for apache 1.3.20 [7]

  o fix to compile with sfio+ithreads [8]

  o $r->custom_response($code, undef) will now unset the current
CustomResponse [9]

  o add %Apache::MyConfig aliases for Apache::src backwards 
compat [10]

  o if PREFIX is given to Makefile.PL add it to @INC at startup [11]

  o croak if the filehandle passed to $r->send_fd is NULL [12]

  o make sure file to be reloaded can be found in @INC for
Apache::StatINC [13]


module announcements

  o Apache::ASP 2.15 - provides an Active Server Pages port for
Perl scripting only, and enables the development of dynamic web
applications with session management and embedded perl code [14]

  o Apache::DnsZone 0.1 - allows users to change their own zones 
without actually having access to the nameserver on which their 
zone is located.  Supports MySQL|Oracle|Postgresql as the
backend database [15]

  o HTML-StickyForms 0.05 - provides similar facilities to CGI.pm's 
HTML tag generation routines, but is restricted to form field 
generation tags, with sticky values [16]

  o RPC-XML 0.25 - implementation of the XML-RPC standard whose
server is a mod_perl content handler that manages configuration
information and allows for different locations to have their
own server objects, or to share existing ones [17]


mailing list highlights

  o The latest Hello World benchmarks are out [18]

  o If you need %ENV set up earlier than it would ordinarily (such
as from a PerlTransHandler, you can call $r->subprocess_env()
in a void context [19]

  o Here are some instructions for getting httpd -X working on
Win32 [20]

  o If anybody works for a company that wants to look cooler than
cool, have them sponsor the mod_perl BOF T-Shirt this year [21]


links

  o The Apache/Perl Integration Project [22]
  o mod_perl documentation [23]
  o mod_perl modules on CPAN [23]
  o mod_perl homepage [24]
  o mod_perl news and advocacy [25]
  o mod_perl list archives [26] [27]


happy mod_perling...

--Geoff
[EMAIL PROTECTED]

--
[1] http://perl.apache.org/dist/
[2] http://perl.apache.org/from-cvs/modperl/
[3] http://www.apache.org/dist/httpd/
[4] http://dev.apache.org/from-cvs/apache-1.3/
[5] http://www.cpan.org/src/stable.tar.gz
[6] http://www.cpan.org/src/devel.tar.gz 
[7] http://marc.theaimsgroup.com/?l=apache-modperl-cvs&m=99237873323576&w=2
[8] http://marc.theaimsgroup.com/?l=apache-modperl-cvs&m=99246804627430&w=2
[9] http://marc.theaimsgroup.com/?l=apache-modperl-cvs&m=99249338017054&w=2
[10] http://marc.theaimsgroup.com/?l=apache-modperl-cvs&m=99249384517991&w=2
[11] http://marc.theaimsgroup.com/?l=apache-modperl-cvs&m=99249414018478&w=2
[12] http://marc.theaimsgroup.com/?l=apache-modperl-cvs&m=99249638121459&w=2
[13] http://marc.theaimsgroup.com/?l=apache-modperl-cvs&m=99253894815717&w=2
[14] http://forum.swarthmore.edu/epigone/modperl/dwexsilgrimp
[15] http://forum.swarthmore.edu/epigone/modperl/thendlerdry
[16] http://forum.swarthmore.edu/epigone/modperl/sermplangbrimp
[17] http://forum.swarthmore.edu/epigone/modperl/donskeryix
[18] http://forum.swarthmore.edu/epigone/modperl/wholzeenol
[19] http://forum.swarthmore.edu/epigone/modperl/ploxshoimor
[20] http://forum.swarthmore.edu/epigone/modperl/sterdflexgang
[21] http://forum.swarthmore.edu/epigone/modperl/swehgliskerm
[22] http://perl.apache.org
[23] http://perl.apache.org/#docs
[24] http://www.cpan.org/modules/by-module/Apache/
[25] http://www.modperl.com
[26] http://www.take23.org
[27] http://forum.swarthmore.edu/epigone/modperl/
[28] http://marc.theaimsgroup.com/?l=apache-modperl&r=1&w=2



Re: Multiple AddHandler statements

2001-06-19 Thread Mithun Bhattacharya

Is there something in SSI which cant be done in a better way using Perl
??



Re: Multiple AddHandler statements

2001-06-19 Thread Pierre-Yves BONNETAIN

   Hi Douglas,

> We have a CGI script which dynamically generates a certain page on our site.
> We want to include an SSI on that dynamically created page.  Is that
> possible?  We have two "AddHandler" statements for files that end in .cgi...
> 
> Unfortunately, the dynamically generated page is not being server-parsed
> because the Include virtual statement is showing up in the HTML source (the
> same statment on a .shtml file, however, is replaced with the result of the
> SSI).
> 

   We've been doing quite the same thing on our server. Our way out (maybe not
the best one; I'm waiting for the list's answers :-) is to generate the dynamic
page (step one, which you're obviously doing) and then, at the end of this phase
of the request, generate an internal redirect to the newly created page.
   This way, Apache processes the dynamic/SSI page, just as if it were
requested by the user.
   Maybe that's a little heavy (but it's still better than sending an external
redirect to the user's browser !)
   Hth,
-- Pierre-Yves Bonnetain - CTO - http://www.rouge-blanc.com
   Fastest wines in Europe !