Re: OT: Apache::Registry - global vars cleared?

2000-08-08 Thread Stas Bekman

On Mon, 7 Aug 2000, ___cliff rayman___ wrote:

 Stas Bekman wrote:
 
  On Thu, 3 Aug 2000, ___cliff rayman___ wrote:
 
   "Keith G. Murphy" wrote:
  
___cliff rayman___ wrote:

 The perl interpreter has a one global symbol table called the
 stash where
 all global variables are referenced by package and by variable
 name.
 Since the interpreter does not go away when a script is
 recompiled, neither
 does the stash or any of the items contained within it.  Some
 programmers
 are probably using this as a feature, and therefore it is
 unlikely that it
 will change.
 This is really standard perl stuff and it has nothing to do with
 
 Apache::Registry in particular.  It is just something the
 average perl
 programmer does not come across since we usually load the
 interpreter, load
 a program, run the program, exit the interpreter.

 check out:

 http://thingy.kcilink.com/modperlguide/porting/Global_Variables_Persistence.html
 

Thanks for the info and the link.
   
One note though.  The info in the link really doesn`t pertain to
 my
specific question:
   
"global variables persist inside the same process from request to
request"
   
I knew that; I was surprised that they did even on a recompilation
 of
the script, which the link info doesn`t really refer to.
  
   i will see if i can find a good place in the guide to add it and
 i`ll send stas the
   patch.
 
  I`m not sure there is a need for a patch. I think you confuse,
  something. When the script is recompiled all the variables belonging
 to
  the package decalared by Apache::Registry or similar are getting
 reset. If
  you require/use() some modules that declare packages and have global
  variables -- these won`t be reset unless reloaded or initialized in
 your
  code.
 
 are u sure about this?  not looking to argue with u, just trying to fine
 tune my knowledge of perl and mod_perl in particular.
 
 the following code works similarly to how Apache::Registry loads a sub:
 perl -e '
 $sub=q{package thepkg; use vars qw($thevar); print "evaled sub with
 \$thevar=$thevar\n";};
 package main;
 $thepkg::thevar="first outside value";
 eval $sub || die $@;
 package main;
 print "\$thepkg::thevar=$thepkg::thevar\n";
 $thepkg::thevar="second outside value";
 eval $sub || die $@;
 print "\$thepkg::thevar=$thepkg::thevar\n";
 '
 
 the above code returns:
 evaled sub with $thevar=first outside value
 $thepkg::thevar=first outside value
 evaled sub with $thevar=second outside value
 $thepkg::thevar=second outside value
 
 
 eval $sub does not reinitialize any package vars that i can see
 (although it is late).  perhaps Apache::Registry is clearing the global
 vars? i looked at Apache::Registry.pm and did not see anyplace it was
 doing that.  there are calls to some C code which did not look like they
 were reinitializing the package vars but the perl internals are beyond
 my comprehension. :-(
 
 stas, if u don't have the tuits to answer - no problem - i know you're
 busy.  perhaps someone else knows the answer.

Cliff, I'm not sure what you are trying to show with the above code, what
you should do is to run the script under Apache::DB and see how
Apache::Registry generates the package. See:
http://perl.apache.org/guide/porting.html#The_First_Mystery

Now once this package is built and compiled, *nothing* happens to it --
it's like a loaded from the file module. If you don't initialize vars at
the beginning of your script. And no, Apache::Registry doesn't reset the
global vars. Apache::PerlRun does that.


_
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://jazzvalley.com
http://singlesheaven.com http://perlmonth.com   perl.org   apache.org





RE: [ANNOUNCE] Apache::Dispatch-0.03

2000-08-08 Thread Matt Sergeant

On Mon, 7 Aug 2000, Geoffrey Young wrote:

 ok, here's a pre-PAN 
 
 http://morpheus.laserlink.net/~gyoung/modules/Apache-Dispatch-0.04.tar.gz
 
 I borrowed some code from Apache::StatINC to add a single module reload.  
 
 Unfortunately, this doesn't cover inherited circumstances, although I don't
 know how important that is going to be to folks.
 
 I really wanted to have DispatchStat be On, Off, or ISA, where ISA reloaded
 the asked for module and all it's parents  - since given Class-method(),
 method() might not actually be in Class.  Basically, I wasn't able to find a
 way to get to @Class::ISA where Class is unknown until run-time (that is,
 it's held in $class).  I figured I should be able to use some symbolic
 referencing or something, but I couldn't get it to work.

@{"${class}::ISA"}

-- 
Matt/

Fastnet Software Ltd. High Performance Web Specialists
Providing mod_perl, XML, Sybase and Oracle solutions
Email for training and consultancy availability.
http://sergeant.org | AxKit: http://axkit.org




make test failure

2000-08-08 Thread Kenneth Lee

Today I run make test with mod_perl the first time (I was skipping it before)

modules/request.Modification of a read-only value attempted at
modules/request.t line 128.
modules/request.dubious  
Test returned status 2 (wstat 512, 0x200)
DIED. FAILED tests 3-10
Failed 8/10 tests, 20.00% okay

What does this mean? I couldn't find it in the guide.
I'm using all the latest packages with RedHat 6.1 on x86. 

apache 1.3.12
perl 5.6.0
mod_perl 1.24
libapreq 0.31

Thanks.
Kenneth



[ANNOUNCE] Apache-Dispatch-0.04

2000-08-08 Thread Geoffrey Young

The URL

 
http://morpheus.laserlink.net/~gyoung/modules/Apache-Dispatch-0.04.tar.gz

has entered CPAN as

  file: $CPAN/authors/id/G/GE/GEOFF/Apache-Dispatch-0.04.tar.gz
  size: 6903 bytes
   md5: 42e7d4c530b60b9096ad2750eab2f81a

Changes:

0.04  8.8.2000
- fixed bug to allow null DispatchExtras directive
- cleaned up Makefile.PL
- borrowed from Apache::StatINC and added DispatchStat
  directive (suggested by Matt Sergeant and Dan Campbell)



RE: [OT] Abstract-Database Class

2000-08-08 Thread mgraham


There's a mailing list set up at sourceforge for discussing
object-persistence issues and tools for use with perl:

http://mail1.sourceforge.net/mailman/listinfo/poop-group


Michael




mod_perl rules! updated stats

2000-08-08 Thread Stas Bekman

Well, I've just updated the mod_perl deployment growth graph
See http://perl.apache.org/netcraft/

There are almost 1.3M hosts using mod_perl (not counting a few other
millions of those located behind the proxy server and therefore not
counted, only a few ports are being tested, to avoid the blames of port
scanning: 80, 443 and probably a few other well known ports).

In the last 2 months 0.45M of new hosts were counted, and in the last 4
months the number of hosts has doubled!!! Since July 99 there was a 6-fold
growth!

The number of unique IPs hosting mod_perl has doubled in the last 6
months!!! Since July 99 there was a 3-fold growth!

mod_perl rules :)

_
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://jazzvalley.com
http://singlesheaven.com http://perlmonth.com   perl.org   apache.org





Proxy setup w/ SSL

2000-08-08 Thread Drew Taylor

Everyone,

I have successfully setup the proxy system outlined in the guide, and it
seems to be working well. In my instance, the front-end httpd has
mod_proxy  mod_rewrite, while the backend is only mod_perl. I also have
a seperate instance of stronghold/mod_perl for SSL connections.

What I would like is to add SSL to the frontend servers and ditch
stronghold all together. I'm interested in suggestions for how to do
this. Should I try mod_ssl, raven, etc? I am trying to have only 2
servers running instead of three. Does anyone have experience in this
area? 

-- 
Drew Taylor
Vialogix Communications, Inc.
501 N. College Street
Charlotte, NC 28202
704 370 0550
http://www.vialogix.com/



Re: Proxy setup w/ SSL

2000-08-08 Thread Stas Bekman

On Tue, 8 Aug 2000, Drew Taylor wrote:

 Everyone,
 
 I have successfully setup the proxy system outlined in the guide, and it
 seems to be working well. In my instance, the front-end httpd has
 mod_proxy  mod_rewrite, while the backend is only mod_perl. I also have
 a seperate instance of stronghold/mod_perl for SSL connections.
 
 What I would like is to add SSL to the frontend servers and ditch
 stronghold all together. I'm interested in suggestions for how to do
 this. Should I try mod_ssl, raven, etc? I am trying to have only 2
 servers running instead of three. Does anyone have experience in this
 area? 

Hmm, how about:
http://perl.apache.org/guide/install.html#Installation_Scenarios_for_mod_p
See also
http://perl.apache.org/guide/scenario.html#HTTP_Authentication_With_Two_Ser


_
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://jazzvalley.com
http://singlesheaven.com http://perlmonth.com   perl.org   apache.org





Re: Proxy setup w/ SSL

2000-08-08 Thread Nigel Hamilton


 Everyone,
 
 I have successfully setup the proxy system outlined in the guide, and it
 seems to be working well. In my instance, the front-end httpd has
 mod_proxy  mod_rewrite, while the backend is only mod_perl. I also have
 a seperate instance of stronghold/mod_perl for SSL connections.
 
 What I would like is to add SSL to the frontend servers and ditch
 stronghold all together. I'm interested in suggestions for how to do
 this. Should I try mod_ssl, raven, etc? I am trying to have only 2
 servers running instead of three. Does anyone have experience in this
 area? 
 

Hi,
 Also, does anyone know a way to speed up SSL somehow?

NIge





Re: Proxy setup w/ SSL

2000-08-08 Thread Matt Sergeant

On Tue, 8 Aug 2000, Nigel Hamilton wrote:

 Hi,
  Also, does anyone know a way to speed up SSL somehow?

Keep-alives. To be able to do that you need to store your output and make
sure that your solution sends the appropriate headers that don't kill
keep-alive. These include Content-Length (which is why you need to store
your output before sending it) and some others which I forget, anyone?

-- 
Matt/

Fastnet Software Ltd. High Performance Web Specialists
Providing mod_perl, XML, Sybase and Oracle solutions
Email for training and consultancy availability.
http://sergeant.org | AxKit: http://axkit.org




Re: Proxy setup w/ SSL

2000-08-08 Thread siberian

I use SSL hardware acceleration cards and they work like a champ. I think
Rainbow builds these for a reasonable price ( ours came with the F5
hardware ).

Before that we just ran a 'Lite' Stronghold on the front end and proxy'd
back all connections to our dynamic ocntent servers. It held up really
well and was a really easy config to manage and setup.

However, now the F5 handles all SSL traffic and balances back to a server
farm. Each box has two instances of apache running, one mod perl and one
light ( on  diff ports ). The  load balancer checks the URI content and
switches between the ports as needed. 

Careful with Keepalives, they'll kill you if your using some load
balancing solutions. In the F5 world KeepAlives destroy rules based load
balancing, it gets ugly. Your Mileage May Vary.

John-

On Tue, 8 Aug 2000, Matt Sergeant wrote:

 On Tue, 8 Aug 2000, Nigel Hamilton wrote:
 
  Hi,
   Also, does anyone know a way to speed up SSL somehow?
 
 Keep-alives. To be able to do that you need to store your output and make
 sure that your solution sends the appropriate headers that don't kill
 keep-alive. These include Content-Length (which is why you need to store
 your output before sending it) and some others which I forget, anyone?
 
 -- 
 Matt/
 
 Fastnet Software Ltd. High Performance Web Specialists
 Providing mod_perl, XML, Sybase and Oracle solutions
 Email for training and consultancy availability.
 http://sergeant.org | AxKit: http://axkit.org
 
 




Re: Proxy setup w/ SSL

2000-08-08 Thread Adi

Nigel Hamilton wrote:
 
 Hi,
  Also, does anyone know a way to speed up SSL somehow?

There are hardware SSL accelerators that you can buy (quite expensive) which
offload the CPU-intensive encryption algorithms, freeing up your CPU to do
other things.

Personally, I think a better approach is to use a load-balanced set of
proxy/SSL servers, as Stas describes in the guide.  Commodity PC hardware
running Linux has a much better performance/price ratio than expensive,
single-purpose SSL accelerators.

-Adi



Config Errors

2000-08-08 Thread Kristopher Lalletti

I'm trying to recompile my Apache with mod-perl and I've been having some
problems..  The config line comes from the mod_perl installation guide and
the extra args come from the apache.spec that defines the configuration of
the binary distribution of apache under RedHat 6.2.

I've isolated the problem, it comes from the --enable-module=all .. But I'd
still like to know why it is doing this and how can i bypass the problem...

Here is my command line in the mod_perl directory
perl Makefile.PL APACHE_SRC=../apache_1.3.12/src \
DO_HTTPD=1 USE_APACI=1 EVERYTHING=1 \
APACI_ARGS='--prefix=/usr \
--with-layout=RedHat \
--add-module=/usr/src/redhat/SOURCES/mod_bandwidth.c \
--add-module=/usr/src/redhat/SOURCES/mod_put.c \
--activate-module=src/modules/throttle/mod_throttle.o \
--enable-module=all \
--enable-shared=max \
--enable-rule=EAPI \
--disable-rule=WANTHSREGEX \
--disable-module=auth_dbm \
--with-perl=/usr/bin/perl \
--enable-suexec \
--suexec-docroot=/home/httpd/html \
--suexec-caller=nobody'



Here is the snippet containing the error..  Since I'm compiling with
EVERYTHING=1, I haven't included the mod_perl output..

Configuring for Apache, Version 1.3.12
 + using installation path layout: RedHat (config.layout)
 + activated perl module (modules/perl/libperl.a)
 + on-the-fly added and activated bandwidth module
(modules/extra/mod_bandwidth.o)
 + on-the-fly added and activated put module (modules/extra/mod_put.o)
 + activated throttle module (modules/throttle/mod_throttle.o)
Creating Makefile
Creating Configuration.apaci in src
  + id: mod_perl/1.24
  + id: Perl/v5.6.0 (linux) [perl]
Creating Makefile in src
 + configured for Linux platform
 + setting C pre-processor to cc -E
 + checking for system header files
 + adding selected modules
o rewrite_module uses ConfigStart/End
 + using -lndbm for DBM support
  enabling DBM support for mod_rewrite
o db_auth_module uses ConfigStart/End
  using Berkeley-DB/2.x for mod_auth_db (-ldb)
o perl_module uses ConfigStart/End
  + mod_perl build type: DSO
  + setting up mod_perl build environment
  + adjusting Apache build environment

** Error: Cannot build mod_include with Perl support (USE_PERL_SSI) **
** when mod_perl is compiled as DSO because of cross-module calls.  **
** Ignoring PERL_SSI flag now.  **

 + enabling Extended API (EAPI)
 + using -ldl for vendor DSO support
 + checking sizeof various data types
 + doing sanity check on compiler and options



Thanks
Kris





Re: Proxy setup w/ SSL

2000-08-08 Thread Stas Bekman

On Tue, 8 Aug 2000, Matt Sergeant wrote:

 On Tue, 8 Aug 2000, Nigel Hamilton wrote:
 
  Hi,
   Also, does anyone know a way to speed up SSL somehow?
 
 Keep-alives. To be able to do that you need to store your output and make
 sure that your solution sends the appropriate headers that don't kill
 keep-alive. These include Content-Length (which is why you need to store
 your output before sending it) and some others which I forget, anyone?

According to http://perl.apache.org/guide/correct_headers.html
oroginally written by Andreas, Content-Length is all you need. Of course
you have to enable KeepAlive in the server and the client should support
it as well.

_
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://jazzvalley.com
http://singlesheaven.com http://perlmonth.com   perl.org   apache.org





Re: OT: Apache::Registry - global vars cleared?

2000-08-08 Thread ___cliff rayman___

earlier Stas Bekman said:

   I`m not sure there is a need for a patch. I think you confuse,
   something. When the script is recompiled all the variables belonging
   to the package decalared by Apache::Registry or similar are getting
   reset. If you require/use() some modules that declare packages and have global
   variables -- these won`t be reset unless reloaded or initialized in your code.
 
 --snip--


then later:

 Now once this package is built and compiled, *nothing* happens to it --
 it's like a loaded from the file module. If you don't initialize vars at
 the beginning of your script. And no, Apache::Registry doesn't reset the
 global vars.

ah.  that's what I thought.  but previously you said "all the variables belonging to
the packaged decalared by Apache::Registry or similar are getting reset."  that is the
point i was arguing, but it looks like we both agree. perhaps you meant to say "all
the lexicals belonging to the file loaded by Apache::Registry or similar are getting
reset".

back to the original posting that started this thread, the poster was unaware that the
package variables would not be reset when the file containing that package was
recompiled.  we both agree that they will not be reset.  he did not think that this
fact was clear in the guide.
--
___cliff [EMAIL PROTECTED]http://www.genwax.com/





Re: [ANNOUNCE] Apache::Dispatch-0.03

2000-08-08 Thread Roger Espel Llima

Matt Sergeant wrote:
  I really wanted to have DispatchStat be On, Off, or ISA, where ISA reloaded
  the asked for module and all it's parents  - since given Class-method(),
  method() might not actually be in Class.  Basically, I wasn't able to find a
  way to get to @Class::ISA where Class is unknown until run-time (that is,
  it's held in $class).  I figured I should be able to use some symbolic
  referencing or something, but I couldn't get it to work.

 @{"${class}::ISA"}

Yep, that's one weird bit of syntax.  I just needed this recently to
write a test.pl, and it took quite a bit of testing to get it working. :)

Incidentally, does anyone know of a way to do this that works under
strict?  The above requires a "no strict 'refs'" to work.

-- 
Roger Espel Llima, [EMAIL PROTECTED]
http://www.iagora.com/~espel/index.html



Re: mod_perl rules! updated stats

2000-08-08 Thread Randal L. Schwartz

 "Stas" == Stas Bekman [EMAIL PROTECTED] writes:

Stas mod_perl rules :)

package Stonehenge::MyFixup;

## PerlFixupHandler Stonehenge::MyFixup

use strict;
use vars qw($VERSION);
$VERSION = (qw$Revision: 1.6 $ )[-1];

use Apache::Constants qw(DECLINED);

sub handler {
  use Stonehenge::Reload; goto handler if Stonehenge::Reload-reload_me;

  my $r = shift;

# [other stuff here deleted]

  if (not $r-proxyreq and $r-is_main) {
$r-header_out(X_mod_perl_rules =
   "mod_perl rules! Get it at http://perl.apache.org/");
  }

  return DECLINED;
}

1;

:-)

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
[EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!



Re: Proxy setup w/ SSL

2000-08-08 Thread Stas Bekman

On Tue, 8 Aug 2000, Nigel Hamilton wrote:

Nigel, I hope you don't mind that I bounce it back to the list, since
that's how it should be.

   What is the rationale behind the content length speed improvement?
   Can SSL more efficiently/quickly send the page if it knows the
 content length in advance?

The improvement is in taking the advantage of the KeepAlive feature, which
enables a sending of more then one object over the same connection. So you
save the handshake to initiate a connection for each requested object,
which is especially expensive with SSL if you don't use caching of SSL
keys.

KeepAlive works only if the server sends a Content-Length header, since it
has to know when the object has been sent, and when it should timeout in
order to close the connection if there is no more incoming requests from
the same page.

Notice that it makes the user experience somewhat slower, since instead of
initiating many connections and downloading all the objects (e.g. images)
in parallel, the objects are downloaded sequencially.

Make sure you set the KeepAliveTimeout to the value as small as possible,
since the server is in idle state while waiting for the time out.

For the reasons explained above you don't want to use KeepALive under
mod_perl in most cases.

 
 Thanks
 
 NIge
 
 Nigel Hamilton
 __
 http://e1mail.come1mail - Encrypted 1st Class Maile1mail: 1001
 
 
 On Tue, 8 Aug 2000, Stas Bekman wrote:
 
  On Tue, 8 Aug 2000, Matt Sergeant wrote:
  
   On Tue, 8 Aug 2000, Nigel Hamilton wrote:
   
Hi,
 Also, does anyone know a way to speed up SSL somehow?
   
   Keep-alives. To be able to do that you need to store your output and make
   sure that your solution sends the appropriate headers that don't kill
   keep-alive. These include Content-Length (which is why you need to store
   your output before sending it) and some others which I forget, anyone?
  
  According to http://perl.apache.org/guide/correct_headers.html
  oroginally written by Andreas, Content-Length is all you need. Of course
  you have to enable KeepAlive in the server and the client should support
  it as well.
  
  _
  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://jazzvalley.com
  http://singlesheaven.com http://perlmonth.com   perl.org   apache.org
  
  
 
 



_
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://jazzvalley.com
http://singlesheaven.com http://perlmonth.com   perl.org   apache.org





Re: mod_perl on a FreeBSD 3.5-STABLE

2000-08-08 Thread Marko van der Puil

I had the same thing, you should probably *NOT* install mod_perl and
Apache from the /stand/sysinstall menu, but do it by hand like it says in
the Eagle book or the Guide...

Eagle Book:
http://www.modperl.com
Mod_Perl guide:
http://perl.apache.org/guide
http://perl.apache.org/guide/install.html#Installing_mod_perl_in_10_Minute

I done the installation by hand like in the guide, now my mod_perl is
fine, except cgi-s dont run from the prompt anymore exiting with...

---SNIPerror_log-

DynaLoader object version 1.04 does not match $DynaLoader::VERSION 1.03 at
/usr/libdata/perl/5.00503/DynaLoader.pm line 80.
BEGIN failed--compilation aborted at
/usr/local/lib/perl5/site_perl/5.005/i386-freebsd/DBI.pm line 149.
BEGIN failed--compilation aborted at ./dbtest.cgi line 2.

---SNIPerror_log-

If I use DBI.pm somewhere in a script. If I run the same script in RunPerl
it works ok Strange that... Any Id's anyone?



Alex Kapranoff wrote:

 Is there someone running mod_perl on a FreeBSD 3-STABLE?
 I just cannot accomplish it. It dies crying about some missing symbols
 while loading DBI.so.

--
Yours sincerely,
Met vriendelijke groeten,


Marko van der Puil http://www.renesse.com
   [EMAIL PROTECTED]





Re: mod_perl rules! updated stats

2000-08-08 Thread Stas Bekman

On 8 Aug 2000, Randal L. Schwartz wrote:

  "Stas" == Stas Bekman [EMAIL PROTECTED] writes:
 
 Stas mod_perl rules :)
 
 package Stonehenge::MyFixup;
 
 ## PerlFixupHandler Stonehenge::MyFixup
 
 use strict;
 use vars qw($VERSION);
 $VERSION = (qw$Revision: 1.6 $ )[-1];
 
 use Apache::Constants qw(DECLINED);
 
 sub handler {
   use Stonehenge::Reload; goto handler if Stonehenge::Reload-reload_me;
 
   my $r = shift;
 
 # [other stuff here deleted]
 
   if (not $r-proxyreq and $r-is_main) {
 $r-header_out(X_mod_perl_rules =
"mod_perl rules! Get it at http://perl.apache.org/");
   }
 
   return DECLINED;
 }
 
 1;
 
 :-)
 

Cool, if only people would look at the headers :)

_
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://jazzvalley.com
http://singlesheaven.com http://perlmonth.com   perl.org   apache.org





RE: [ANNOUNCE] Apache::Dispatch-0.03

2000-08-08 Thread Geoffrey Young



 -Original Message-
 From: Roger Espel Llima [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, August 08, 2000 12:52 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [ANNOUNCE] Apache::Dispatch-0.03
 
[snip]
 
 Yep, that's one weird bit of syntax.  I just needed this recently to
 write a test.pl, and it took quite a bit of testing to get it 
 working. :)

this showed up in p5p in late june...
  $foo = "bar";
  @$foo = (1,2,3);
  $foo-[1] = 4;
  print @bar;

wicked cool...

--Geoff

 
 Incidentally, does anyone know of a way to do this that works under
 strict?  The above requires a "no strict 'refs'" to work.
 
 -- 
 Roger Espel Llima, [EMAIL PROTECTED]
 http://www.iagora.com/~espel/index.html
 



Re: [ANNOUNCE] Apache::Dispatch-0.03

2000-08-08 Thread ___cliff rayman___

Geoffrey Young wrote:

  -Original Message-
  From: Roger Espel Llima [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, August 08, 2000 12:52 PM
  To: [EMAIL PROTECTED]
  Subject: Re: [ANNOUNCE] Apache::Dispatch-0.03
 
 [snip]
 
  Yep, that's one weird bit of syntax.  I just needed this recently to
  write a test.pl, and it took quite a bit of testing to get it
  working. :)

 this showed up in p5p in late june...
   $foo = "bar";
   @$foo = (1,2,3);
   $foo-[1] = 4;
   print @bar;

 wicked cool...

standard symbolic referencing.



 --Geoff

 
  Incidentally, does anyone know of a way to do this that works under
  strict?  The above requires a "no strict 'refs'" to work.

nope.  purposely does not work under strict.


--
___cliff [EMAIL PROTECTED]http://www.genwax.com/





Re: mod_perl on a FreeBSD 3.5-STABLE

2000-08-08 Thread Sander van Zoest

On Tue, 8 Aug 2000, Marko van der Puil wrote:

 I done the installation by hand like in the guide, now my mod_perl is
 fine, except cgi-s dont run from the prompt anymore exiting with...
 ---SNIPerror_log-
 DynaLoader object version 1.04 does not match $DynaLoader::VERSION 1.03 at
 /usr/libdata/perl/5.00503/DynaLoader.pm line 80.
 BEGIN failed--compilation aborted at
 /usr/local/lib/perl5/site_perl/5.005/i386-freebsd/DBI.pm line 149.
 BEGIN failed--compilation aborted at ./dbtest.cgi line 2.
 ---SNIPerror_log-
 If I use DBI.pm somewhere in a script. If I run the same script in RunPerl
 it works ok Strange that... Any Id's anyone?

This means there is probably a version of perl being picked up in your
apache binary versus your perl being run on the commandline.

That is what I would guess.

Cheers,

--
Sander van Zoest [[EMAIL PROTECTED]]
Covalent Technologies, Inc.  http://www.covalent.net
(415) 536-5218




Flushing handler getting Open Sourced...

2000-08-08 Thread Andrew Chen

Hello all,

I was involved in a discussion a few weeks ago regarding how Cobalt Group
(www.cobaltgroup.com) could get a performance boost by running our very
very dirty modules under PerlRun with PerlRunOnce Off and then to have a
handler that cleaned up between requests.

Anyway, with a lot of help from the mod_perl community (thanks guys!) the
handler was written, and it is currently going through QA to push this out
to all of our websites (many thousands).

Additionally, we are going to release this back into the community for
those that, like us, are unlucky enough to have dirty code that would be
too expensive to rewrite.

The question is now:
  How should we do it?

1) Should it be integrated into the mod_perl package?
2) Should it be a seperate package in CPAN?
3) etc., etc.

Anyway, if anyone has an idea of what the best way to go about this would
be, that would be great. Thanks!

Andrew Chen
Intern, Architecture
[EMAIL PROTECTED]
206-219-8445
The Cobalt Group, Inc. 




Re: Flushing handler getting Open Sourced...

2000-08-08 Thread Ken Williams

[EMAIL PROTECTED] (Andrew Chen) wrote:
Hello all,

I was involved in a discussion a few weeks ago regarding how Cobalt Group
(www.cobaltgroup.com) could get a performance boost by running our very
very dirty modules under PerlRun with PerlRunOnce Off and then to have a
handler that cleaned up between requests.

Anyway, with a lot of help from the mod_perl community (thanks guys!) the
handler was written, and it is currently going through QA to push this out
to all of our websites (many thousands).

Holy ambition!

Additionally, we are going to release this back into the community for
those that, like us, are unlucky enough to have dirty code that would be
too expensive to rewrite.

The question is now:
  How should we do it?

1) Should it be integrated into the mod_perl package?
2) Should it be a seperate package in CPAN?
3) etc., etc.

It's quite possible that some of your functionality should get
integrated into PerlRun itself.  It sounds like an intermediate setting
between PerlRunOnce Off and PerlRunOnce On.  What about a setting like

  PerlSetVar PerlRunMode Once(equivalent to PerlRunOnce On)
  PerlSetVar PerlRunMode Cleanup (adds your cleanup stuff)
  PerlSetVar PerlRunMode Trust   (equivalent to PerlRunOnce Off)

The 'Trust' name is pretty stupid, couldn't think of anything better
right now.  Anyway, would something like this make sense?  Or perhaps a
"PerlRunCleanup" directive?






Re: Proxy setup w/ SSL

2000-08-08 Thread Mads Toftum

On Tue, Aug 08, 2000 at 04:07:58PM +, Nigel Hamilton wrote:
  Also, does anyone know a way to speed up SSL somehow?

Well worth a read is http://www.awe.com/mark/apcon2000/ which
covers most of the performance related issues.
Also note that the openssl project is currently adding hardware
accelerator support which might end up giving us some cheaper
hw options in the future.

vh

Mads Toftum
-- 
`Darn it, who spiked my coffee with water?!' - lwall




Re: mod_perl rules! updated stats

2000-08-08 Thread Stas Bekman

On Tue, 8 Aug 2000, Ian Struble wrote:

 On Tue, 8 Aug 2000, Stas Bekman wrote:
 
  On 8 Aug 2000, Randal L. Schwartz wrote:
  
"Stas" == Stas Bekman [EMAIL PROTECTED] writes:
   
   Stas mod_perl rules :)
   
   package Stonehenge::MyFixup;
   
   ## PerlFixupHandler Stonehenge::MyFixup
   
   use strict;
   use vars qw($VERSION);
   $VERSION = (qw$Revision: 1.6 $ )[-1];
   
   use Apache::Constants qw(DECLINED);
   
   sub handler {
 use Stonehenge::Reload; goto handler if Stonehenge::Reload-reload_me;
   
 my $r = shift;
   
   # [other stuff here deleted]
   
 if (not $r-proxyreq and $r-is_main) {
   $r-header_out(X_mod_perl_rules =
  "mod_perl rules! Get it at http://perl.apache.org/");
 }
   
 return DECLINED;
   }
   
   1;
   
   :-)
   
  
  Cool, if only people would look at the headers :)
 
 Well I'm sure everyone here has once, twice, a thousand times.  I know 
 that I would have gotten a laugh out of the headers had I seen that. :^)

Of course, I've referred to people who don't yet know that mod_perl rules
:) 




_
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://jazzvalley.com
http://singlesheaven.com http://perlmonth.com   perl.org   apache.org





Re: Proxy setup w/ SSL (fwd)

2000-08-08 Thread Tom Brown


Stas wanted me to send this to the list, so I'll do that... I've
also done a little testing, and it looks like mod_status is
showing 4 keepalive connections on my old (1.2.6 redhat secure) SSL
server to my netscape 4.72 browser ... 

Srv  PIDAcc   MCPU  SSConn ChildSlot  Host VHostRequest
0  13413 4/4/4K0.08 4 0.9  0.00 0.00 216.86.106.124secure.baremetal.com GET 
/icons/burst.gif HTTP/1.0
2   8451 11/14/14 K0.23 4 3.0  0.01 0.01 216.86.106.124secure.baremetal.com GET 
/icons/forward.gif HTTP/1.0
3   8450 7/11/11  K0.35 4 1.6  0.01 0.01 216.86.106.124secure.baremetal.com GET 
/icons/sound.gif HTTP/1.0
4   8449 6/10/10  W0.31 0 5.0  0.01 0.01 216.86.106.124secure.baremetal.com GET 
/server-status HTTP/1.0

I'm not sure why only 28 files are shown in the "this connection"
column, there were 29 icons, an html file, and the status page...

  
  Srv Server number
  PID OS process ID
  Acc Number of accesses this connection / this child / this slot
   M  Mode of operation
  CPU CPU usage, number of seconds
  SS  Seconds since beginning of most recent request
 Conn Kilobytes transferred this connection
 ChildMegabytes transferred this child
 Slot Total megabytes transferred this slot



   Date: Tue, 8 Aug 2000 11:43:49 -0700 (PDT)
   From: Tom Brown [EMAIL PROTECTED]
   To: Stas Bekman [EMAIL PROTECTED]
   Subject: Re: Proxy setup w/ SSL

  initiating many connections and downloading all the objects (e.g. images)
  in parallel, the objects are downloaded sequencially.
 
 No. AFAIK It still opens up multiple/parallel connections... it just
 doesn't go through the handshake stuff repeatedly...

Really? That's what I was always told. Any pointers to read about
this. Thanks!

   Sorry, no... although it should be easy enought to test, even mod_status
   should provide enough information...

   Part of my logic is that the browser doesn't even know if the connection
   is going to be keep alive until it gets the first response... so if you
   load a page from domain.com, and it contains 20 images from
   images.domain.com there would have to be a "test load" of the first image
   before deciding whether to open up multiple connections ... strikes me as
   simpler to just proceed as normal and use the pipelining on all
   connections if it is available...  

   (maybe things are different for SSL than normal connections, but again, I
   can't see why they would be...)





Re: [ANNOUNCE] Apache::Dispatch-0.03

2000-08-08 Thread Matt Sergeant

On Tue, 8 Aug 2000, Roger Espel Llima wrote:

  @{"${class}::ISA"}
 
 Yep, that's one weird bit of syntax.  I just needed this recently to
 write a test.pl, and it took quite a bit of testing to get it working. :)
 
 Incidentally, does anyone know of a way to do this that works under
 strict?  The above requires a "no strict 'refs'" to work.

No, thats a standard thing that is disabled under strict. Of course you'd
only be doing that in some neat hack, so locally disabling strict isn't a
big deal (strict is a lexical pragma, so it only applies in the current
scope).

-- 
Matt/

Fastnet Software Ltd. High Performance Web Specialists
Providing mod_perl, XML, Sybase and Oracle solutions
Email for training and consultancy availability.
http://sergeant.org | AxKit: http://axkit.org




Re: Proxy setup w/ SSL

2000-08-08 Thread Vivek Khera

 "DT" == Drew Taylor [EMAIL PROTECTED] writes:

DT What I would like is to add SSL to the frontend servers and ditch
DT stronghold all together. I'm interested in suggestions for how to do

Why not just add mod_proxy and mod_rewrite to stronghold, and remove
mod_perl from it.  The it is your front end.  Since you've already
paid for it, it seems the way to go.  Using mod_ssl may pose legal
issues until the RSA patents expire next month.

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Vivek Khera, Ph.D.Khera Communications, Inc.
Internet: [EMAIL PROTECTED]   Rockville, MD   +1-301-545-6996
GPG  MIME spoken herehttp://www.khera.org/~vivek/



Re: Trouble compiling mod_perl 1.24 with Apache 1.3.12

2000-08-08 Thread William R. Ward

[EMAIL PROTECTED] writes:
On Tue, 1 Aug 2000, William R. Ward wrote:

 
 When I try to run "perl Makefile.PL" I get this error:
 
 sh: ./Configure: No such file or directory
 can't open /Makefile No such file or directory at Makefile.PL line 617, STDIN 
chunk 1.
 
 The "configure" script that comes with Apache is spelled with a
 lowercase "c".  When I edited Makefile.PL to fix this error and run it
 again, I get this error:

look again, apache has both a configure script and a src/Configure script.

Right you are.  In that case, I think the Makefile.PL is pretty
stupid.  It should check for the "src" directory and DWIM.

please use the [EMAIL PROTECTED] list for support questions.

Then please put that e-mail address somewhere obvious on the
perl.apache.org website.  Yours was the only one I could find.
(It was listed as [EMAIL PROTECTED] too, which bounced).

http://perl.apache.org/guide/ also has good install docs.

I was only able to find a link to this once I knew what to look for.
I was looking in the FAQ and found your e-mail address.

I'd suggest putting a link to this at the very top.  But even that
guide doesn't make the answer very obvious.

--Bill.

-- 
William R Ward  Bay View Consulting Services   http://www.bayview.com/~wrw/
[EMAIL PROTECTED]   PMB 339, 1803 Mission Stphone +1 831/423-3295
PGP Key 0x2BD331E5Santa Cruz, CA 95060 USA  fax +1 831/423-6499
Public key at http://www.bayview.com/~wrw/pubkey.txt  pager +1 831/458-8862



custom server string

2000-08-08 Thread Dave Moore


i need to change the outgoing Server header on all requests to our site.
dont ask why I would want to do that. i have my orders. i read some old
posts from the 90's which said I would have to write my own
send_http_header() method. sounds fun but id rather not. Is this still the
case and if so...why? has anyone else had to do this?

dave

--
Dave Moore
Web Application Developer
mailto:[EMAIL PROTECTED]

ePALS Classroom Exchange
http://www.epals.com/
Connecting more than 1.9 million students and teachers in 182 countries!





weird print bug?

2000-08-08 Thread T.J. Mather

Hi,

I'm running into some very strange behaviour with Apache::print.  print() 
is supposed to dereference any arguments that are scalar references.

However it doesn't work if you apply a non-greedy substitution operator on
the scalar.

The following code outputs in my browser:

CODE:
sub handler {
  my $r = shift;
  my $text = "hello world";
  $text =~ s/hello/hi/;
  $r-print(\$text);
}

OUTPUT:
SCALAR(0x89bd084)

What's really weird is that it works if i change the
substitution operator to greedy:

CODE:
sub handler {
  my $r = shift;
  my $text = "hello world";
  $text =~ s/hello/hi/g;# --- changed to /g
  $r-print(\$text);
}

OUTPUT:
hi world

Any ideas?  I'm running Perl 5.6.0/mod_perl 1.24/Apache 1.3.12 on Linux
2.2.12 (red hat 6.1) on i686.

Thanks,
T.J. Mather




Make test fails for Apache::Session

2000-08-08 Thread Stuckey, Roger

Hi,

I'm not sure if this is the correct forum for this, but here goes ...

I can't seem to get Apache::Session installed on our SGI-Irix box. The MySQL
test fails when trying to create a new database, as shown by the build
output below. Does anyone know what I am doing (or not doing) wrong? I have
the distinct feeling that it's something very simple :)

Running:
 Apache 1.3.6
 mod_perl-1.21
 MySQL 3.22.20a

Thanks in advance,

Rog

--

cpan install Apache::Session
Running make for J/JB/JBAKER/Apache-Session-1.52.tar.gz
CPAN: MD5 loaded ok
Checksum for
/usr2/tmp/.cpan/sources/authors/id/J/JB/JBAKER/Apache-Session-1.52.tar.gz ok
x Apache-Session-1.52/t/99filelock.t, 792 bytes, 2 blocks
x Apache-Session-1.52/t/99filestore.t, 1460 bytes, 3 blocks
x Apache-Session-1.52/t/99dbfilestore.t, 1141 bytes, 3 blocks
x Apache-Session-1.52/t/99oracle.t, 2021 bytes, 4 blocks
x Apache-Session-1.52/t/99storable.t, 731 bytes, 2 blocks
x Apache-Session-1.52/t/99nulllock.t, 269 bytes, 1 block
x Apache-Session-1.52/t/99uue.t, 731 bytes, 2 blocks
x Apache-Session-1.52/t/99flex.t, 1069 bytes, 3 blocks
x Apache-Session-1.52/t/99mysql.t, 1706 bytes, 4 blocks
x Apache-Session-1.52/t/99postgres.t, 1588 bytes, 4 blocks
x Apache-Session-1.52/t/99mysqllock.t, 1301 bytes, 3 blocks
x Apache-Session-1.52/t/99md5gen.t, 1019 bytes, 2 blocks
x Apache-Session-1.52/t/99file.t, 1065 bytes, 3 blocks
x Apache-Session-1.52/t/99mysqlstore.t, 277 bytes, 1 block
x Apache-Session-1.52/t/99semaphore.t, 2036 bytes, 4 blocks
x Apache-Session-1.52/t/99base64.t, 747 bytes, 2 blocks
x Apache-Session-1.52/t/99dbfile.t, 1122 bytes, 3 blocks
x Apache-Session-1.52/b/mysqllock.b, 1455 bytes, 3 blocks
x Apache-Session-1.52/b/uuevsmime.b, 1343 bytes, 3 blocks
x Apache-Session-1.52/b/dbinew.b, 190 bytes, 1 block
x Apache-Session-1.52/b/gdbm.b, 641 bytes, 2 blocks
x Apache-Session-1.52/b/flexpop.b, 261 bytes, 1 block
x Apache-Session-1.52/b/dbipop.b, 156 bytes, 1 block
x Apache-Session-1.52/b/dbi.b, 845 bytes, 2 blocks
x Apache-Session-1.52/b/dbstore.b, 1144 bytes, 3 blocks
x Apache-Session-1.52/Session/Store/Sybase.pm, 6416 bytes, 13 blocks
x Apache-Session-1.52/Session/Store/DBI.pm, 2801 bytes, 6 blocks
x Apache-Session-1.52/Session/Store/Oracle.pm, 4513 bytes, 9 blocks
x Apache-Session-1.52/Session/Store/MySQL.pm, 3222 bytes, 7 blocks
x Apache-Session-1.52/Session/Store/Postgres.pm, 4375 bytes, 9 blocks
x Apache-Session-1.52/Session/Store/DB_File.pm, 3193 bytes, 7 blocks
x Apache-Session-1.52/Session/Store/File.pm, 4458 bytes, 9 blocks
x Apache-Session-1.52/Session/DB_File.pm, 1888 bytes, 4 blocks
x Apache-Session-1.52/Session/Lock/MySQL.pm, 3669 bytes, 8 blocks
x Apache-Session-1.52/Session/Lock/Null.pm, 1546 bytes, 4 blocks
x Apache-Session-1.52/Session/Lock/File.pm, 5085 bytes, 10 blocks
x Apache-Session-1.52/Session/Lock/Semaphore.pm, 6689 bytes, 14 blocks
x Apache-Session-1.52/Session/Serialize/Sybase.pm, 2378 bytes, 5 blocks
x Apache-Session-1.52/Session/Serialize/UUEncode.pm, 1599 bytes, 4 blocks
x Apache-Session-1.52/Session/Serialize/Storable.pm, 1386 bytes, 3 blocks
x Apache-Session-1.52/Session/Serialize/Base64.pm, 1602 bytes, 4 blocks
x Apache-Session-1.52/Session/File.pm, 2021 bytes, 4 blocks
x Apache-Session-1.52/Session/Sybase.pm, 2283 bytes, 5 blocks
x Apache-Session-1.52/Session/Flex.pm, 3891 bytes, 8 blocks
x Apache-Session-1.52/Session/Oracle.pm, 2614 bytes, 6 blocks
x Apache-Session-1.52/Session/MySQL.pm, 2148 bytes, 5 blocks
x Apache-Session-1.52/Session/Postgres.pm, 2495 bytes, 5 blocks
x Apache-Session-1.52/Session/Generate/MD5.pm, 1862 bytes, 4 blocks
x Apache-Session-1.52/eg/example.perl, 1343 bytes, 3 blocks
x Apache-Session-1.52/Session.pm, 16226 bytes, 32 blocks
x Apache-Session-1.52/INSTALL, 270 bytes, 1 block
x Apache-Session-1.52/MANIFEST, 925 bytes, 2 blocks
x Apache-Session-1.52/CHANGES, 1614 bytes, 4 blocks
x Apache-Session-1.52/Makefile.PL, 198 bytes, 1 block
x Apache-Session-1.52/README, 2816 bytes, 6 blocks
x Apache-Session-1.52/TODO, 14 bytes, 1 block
Removing previously used /usr2/tmp/.cpan/build/Apache-Session-1.52

  CPAN.pm: Going to build J/JB/JBAKER/Apache-Session-1.52.tar.gz

Checking if your kit is complete...
Looks good
Writing Makefile for Apache::Session
mkdir blib
mkdir blib/lib
mkdir blib/lib/Apache
mkdir blib/arch
mkdir blib/arch/auto
mkdir blib/arch/auto/Apache
mkdir blib/arch/auto/Apache/Session
mkdir blib/lib/auto
mkdir blib/lib/auto/Apache
mkdir blib/lib/auto/Apache/Session
cp Session/Store/Sybase.pm blib/lib/Apache/Session/Store/Sybase.pm
cp Session/DB_File.pm blib/lib/Apache/Session/DB_File.pm
cp Session/Sybase.pm blib/lib/Apache/Session/Sybase.pm
cp Session/Store/DBI.pm blib/lib/Apache/Session/Store/DBI.pm
cp Session/Lock/MySQL.pm blib/lib/Apache/Session/Lock/MySQL.pm
cp Session/Flex.pm blib/lib/Apache/Session/Flex.pm
cp Session/Serialize/UUEncode.pm
blib/lib/Apache/Session/Serialize/UUEncode.pm
cp Session.pm blib/lib/Apache/Session.pm
cp Session/Store/MySQL.pm 

RE: weird print bug?

2000-08-08 Thread David Harris


T.J. Mather [mailto:[EMAIL PROTECTED]] wrote:
 However it doesn't work if you apply a non-greedy substitution operator on
 the scalar.

You mean "global", not "greedy"

Two snippets from the perl documentation:

s/PATTERN/REPLACEMENT/egimosx

Options are:
e   Evaluate the right side as an expression.
g   Replace globally, i.e., all occurrences.
i   Do case-insensitive pattern matching.


-- and --

By default, a quantified subpattern is ``greedy'', that is, it will match as
many times as possible (given a particular starting location) while still
allowing the rest of the pattern to match. If you want it to match the minimum
number of times possible, follow the quantifier with a ``?''. Note that the
meanings don't change, just the ``greediness'':

*? Match 0 or more times
+? Match 1 or more times


David






Re: make test failure

2000-08-08 Thread Rick Myers

On Aug 08, 2000 at 19:49:58 +0800, Kenneth Lee twiddled the keys to say:
 Today I run make test with mod_perl the first time (I was skipping it before)
 
 modules/request.Modification of a read-only value attempted at
 modules/request.t line 128.
 modules/request.dubious  
   Test returned status 2 (wstat 512, 0x200)
 DIED. FAILED tests 3-10
   Failed 8/10 tests, 20.00% okay
 
 What does this mean? I couldn't find it in the guide.
 I'm using all the latest packages with RedHat 6.1 on x86. 
 
 apache 1.3.12
 perl 5.6.0
 mod_perl 1.24
 libapreq 0.31

Are you *sure* you have 1.24? I supplied a patch for request.t back in
April that fixed that problem and made its way into 1.23. (I also just
checked 1.24 and my one-liner is still there. :)

[EMAIL PROTECTED]">http://forum.swathmore.edu/epigone/modperl/fringkyby/[EMAIL PROTECTED]

Rick Myers[EMAIL PROTECTED]

The Feynman Problem   1) Write down the problem.
Solving Algorithm 2) Think real hard.
  3) Write down the answer.



Re: Make test fails for Apache::Session

2000-08-08 Thread Ajit Deshpande

On Wed, Aug 09, 2000 at 08:51:08AM +1000, Stuckey, Roger wrote:
 
 I can't seem to get Apache::Session installed on our SGI-Irix box. The MySQL
 test fails when trying to create a new database, as shown by the build
 output below. Does anyone know what I am doing (or not doing) wrong? I have
 the distinct feeling that it's something very simple :)
 
 Running:
  Apache 1.3.6
  mod_perl-1.21
  MySQL 3.22.20a

From "perldoc Apache::Session::DBI :

   To use this module, you will need these columns in a table
   called 'sessions':

id char(16)
length int(11)
a_session text

   Where the a_session column needs to be able to handle
   arbitrarily long binary data.

Your error message suggests that you do have not created the sessions
table.

Ajit



RE: weird print bug?

2000-08-08 Thread Ken Williams

[EMAIL PROTECTED] (David Harris) wrote:
T.J. Mather [mailto:[EMAIL PROTECTED]] wrote:
 However it doesn't work if you apply a non-greedy substitution operator on
 the scalar.

You mean "global", not "greedy"

True, but not especially helpful in this case.

T.J., if you grok XS you might have a look at this part of
write_client() in Apache.xs:

for(i = 1; i = items - 1; i++) {
int sent = 0;
SV *sv = SvROK(ST(i))  (SvTYPE(SvRV(ST(i))) == SVt_PV) ?
 (SV*)SvRV(ST(i)) : ST(i);
buffer = SvPV(sv, len);


Try looking at your $text with Devel::Peek to see whether there are any
differences in what it contains in the two cases.






Mod_perl threads on WIN32

2000-08-08 Thread rami

The current version of mod_perl for win32, use one threads
for perl interrupter and serialize all compilation request to that thread.
I'm planning to use only one perl script in my web application, will
the interpreter tread become bottleneck ?
As I understand most of the request will not need compilation.
Compilation is needed only in the first time each thread need to
run the perl script. Is it true?

Regards,
Rami Addady
[EMAIL PROTECTED]





Re: Proxy setup w/ SSL

2000-08-08 Thread Ask Bjoern Hansen

On Tue, 8 Aug 2000, siberian wrote:

[...] 
 Careful with Keepalives, they'll kill you if your using some load
 balancing solutions. In the F5 world KeepAlives destroy rules based load
 balancing, it gets ugly. Your Mileage May Vary.

uh, say what. Another performance killer of SSL would be to not make
sure the client gets to the same server on every request (as the
server is caching some ssl information (which gets done in the F5
box in your setup)).


 - ask

-- 
ask bjoern hansen - http://www.netcetera.dk/~ask/
more than 70M impressions per day, http://valueclick.com




cvs commit: modperl-site/netcraft graph.jpg logo-middle.png logo.png pseudo-graph.jpg graph.pl index.html input.data graph.gif logo-middle.gif logo.gif pseudo-graph.gif

2000-08-08 Thread sbekman

sbekman 00/08/08 08:19:41

  Modified:.index.html
   netcraft graph.pl index.html input.data
  Added:   netcraft graph.jpg logo-middle.png logo.png pseudo-graph.jpg
  Removed: netcraft graph.gif logo-middle.gif logo.gif pseudo-graph.gif
  Log:
  time to move from gif to png, but png is not yet supported by all
  browsers, hence I cannot use it. But since my gd library doesn't support
  gif anymore and I don't want to install the old library. I've modified the
  script to create jpegs instead. They are somewhat bigger than gif or png,
  but for a time being I'll stick to these. Next step is to move completely
  to PNG.
  
  Nevertheless mod_perl rules! 1.3M hosts!!!
  
   PR:
  
  Revision  ChangesPath
  1.63  +1 -1  modperl-site/index.html
  
  Index: index.html
  ===
  RCS file: /home/cvs/modperl-site/index.html,v
  retrieving revision 1.62
  retrieving revision 1.63
  diff -u -r1.62 -r1.63
  --- index.html2000/07/11 00:58:14 1.62
  +++ index.html2000/08/08 15:19:29 1.63
  @@ -758,7 +758,7 @@
   
  center
a href="netcraft/"
  -   img src="netcraft/pseudo-graph.gif" height=200
  +   img src="netcraft/pseudo-graph.jpg" height=200
  width=350 border=0 alt="mod_perl usage graph"/a 
  /center
   
  
  
  
  1.3   +16 -8 modperl-site/netcraft/graph.pl
  
  Index: graph.pl
  ===
  RCS file: /home/cvs/modperl-site/netcraft/graph.pl,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- graph.pl  1999/08/14 11:42:38 1.2
  +++ graph.pl  2000/08/08 15:19:34 1.3
  @@ -15,14 +15,14 @@
   # with no other labels, but y axis. This graph should be linked to a
   # bigger one (graph.gif)
   #
  -# Note: you need GIFgraph package to be installed in order to use this
  +# Note: you need GD::Graph package to be installed in order to use this
   # script.
   
   # Copyrighted under GPL license
   # by Stas Bekman [EMAIL PROTECTED]
   # Aug, 14 1999
   
  -use GIFgraph::linespoints;
  +use GD::Graph::linespoints;
   use strict;
   
   print STDERR "Processing data\n";
  @@ -44,7 +44,7 @@
   
   # plot a normal graph of points with all the info as possible
   sub normal_graph{
  -  my $my_graph = new GIFgraph::linespoints(700,400);
  +  my $my_graph = new GD::Graph::linespoints(700,400);
   
 $my_graph-set( 
 x_label = 'Months',
  @@ -64,7 +64,7 @@
 r_margin = 10,
   
 two_axes = 1,
  -  logo = 'logo.gif',
  +  logo = 'logo.png',
 logo_position = 'LL',
);
   
  @@ -79,13 +79,17 @@
 $my_graph-set_legend('Hostnames','Unique IP numbers' );
 $my_graph-set_legend_font(GD::gdMediumBoldFont);
   
  -  $my_graph-plot_to_gif( "graph.gif", \@data );
   
  +  open IMG, 'graph.jpg' or die $!;
  +  print IMG $my_graph-plot(\@data)-jpeg(70);
  +  close IMG;
  +#  $my_graph-plot_to_gif( "graph.gif", \@data );
  +
   }
   
   # plot a small graph of points with as least info as possible
   sub pseudo_graph{
  -  my $my_graph = new GIFgraph::linespoints(350,200);
  +  my $my_graph = new GD::Graph::linespoints(350,200);
   
   # in this graph we don't want X labels to be printed
 for (0..$#{$data[0]}) {
  @@ -107,7 +111,7 @@
 r_margin = 10,
 two_axes = 0,
   
  -  logo = 'logo-middle.gif',
  +  logo = 'logo-middle.png',
 logo_position = 'UL',
);
   
  @@ -121,8 +125,12 @@
   
 $my_graph-set_legend('Hostnames','Unique IP numbers' );
 $my_graph-set_legend_font(GD::gdSmallFont);
  +
   
  -  $my_graph-plot_to_gif( "pseudo-graph.gif", \@data );
  +  open IMG, 'pseudo-graph.jpg' or die $!;
  +  print IMG $my_graph-plot(\@data)-jpeg(70);
  +  close IMG;
  +  #$my_graph-plot_to_gif( "pseudo-graph.gif", \@data );
   
   
   }
  
  
  
  1.27  +3 -2  modperl-site/netcraft/index.html
  
  Index: index.html
  ===
  RCS file: /home/cvs/modperl-site/netcraft/index.html,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- index.html2000/07/12 00:58:53 1.26
  +++ index.html2000/08/08 15:19:35 1.27
  @@ -19,7 +19,7 @@
   
   p
   hr
  -IMG SRC="graph.gif"   HEIGHT=400 WIDTH=700 BORDER=0 ALT="Graph"
  +IMG SRC="graph.jpg"   HEIGHT=400 WIDTH=700 BORDER=0 ALT="Graph"
   BR
   BR
   The A HREF="graph.pl" script /A that produced this graph and the A 
HREF="input.data"
  @@ -36,7 +36,8 @@
   p
   table cellpadding=3 border=1
   trtdSurvey/tdtdhostnames/tdtdunique ip addresses/td/tr
  -trtd June 2000 /tdtd1080206/tdtd123008/td/tr
  +trtd July 2000/tdtd1286714/tdtd132940/td/tr
  +trtd June 2000

cvs commit: modperl-site/netcraft index.html

2000-08-08 Thread sbekman

sbekman 00/08/08 08:36:38

  Modified:netcraft index.html
  Log:
  another survey goes up as well
  
  Revision  ChangesPath
  1.28  +1 -1  modperl-site/netcraft/index.html
  
  Index: index.html
  ===
  RCS file: /home/cvs/modperl-site/netcraft/index.html,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- index.html2000/08/08 15:19:35 1.27
  +++ index.html2000/08/08 15:36:37 1.28
  @@ -14,7 +14,7 @@
   
   E-Soft Inc have a similar a href="http://www.e-softinc.com/survey/"
   survey/a which shows that mod_perl is the 3rd most popular add on to
  -Apache (after FrontPage and PHP) and is installed in approximately 4%
  +Apache (after FrontPage and PHP) and is installed in approximately 9.04%
   of all Apache web servers.
   
   p
  
  
  



cvs commit: modperl apache-modlist.html

2000-08-08 Thread dougm

dougm   00/08/08 13:14:22

  Modified:.apache-modlist.html
  Log:
  updates from geoff
  
  Revision  ChangesPath
  1.71  +4 -3  modperl/apache-modlist.html
  
  Index: apache-modlist.html
  ===
  RCS file: /home/cvs/modperl/apache-modlist.html,v
  retrieving revision 1.70
  retrieving revision 1.71
  diff -u -r1.70 -r1.71
  --- apache-modlist.html   2000/04/06 20:11:36 1.70
  +++ apache-modlist.html   2000/08/08 20:14:20 1.71
  @@ -6,7 +6,7 @@
   h1The Apache/Perl Module List/h1
   
   Maintained by a href="mailto:[EMAIL PROTECTED]"Doug MacEachern/a,
  -bri $Revision: 1.70 $ $Date: 2000/04/06 20:11:36 $/i
  +bri $Revision: 1.71 $ $Date: 2000/08/08 20:14:20 $/i
   
   h3Contents/h3
   a href="#intro"Introduction/abr
  @@ -99,16 +99,16 @@
   RobotRules   cdpfEnforce robot rules (robots.txt)PARKER
   Sandwich bmpfLayered document (sandwich) maker   VKHERA
   ShowRequest  bdpfShow phases and module participationDOUGM
  -VhostSandwichcdpfVirtual host layered document maker MARKC
  +SimpleReplace   ampfSimple replacement template toolGEOFF
   SSI  RmpOImplement server-side includes in Perl  KWILLIAM
   SSIChain bmpOSSI on other modules output JANPAZ
   StageRdpfManage a document staging directory ANDK
   TarGzip  c   ZENIN
   TimedRedirectbdpfRedirect urls for a given time period   PETERM 
   UploadSvrbdpOA lightweight publishing system ANDK
  +VhostSandwich  cdpfVirtual host layered document maker MARKC
   WDB  bdpfDatabase query/edit tool using DBI  JROWE
   WebSQL   cdpOAdaptation of Sybase's WebSQL   GUNTHER
  -SimpleReplace   ampfSimple replacement template toolGEOFF
   
   * PerlInitHandler's
   RequestNotesampfPass cookie  form data around pnotes   GEOFF
  @@ -178,6 +178,7 @@
   TransLDAPbdpfTranslate URIs to LDAP queries  CDONLEY
   
   * PerlFixupHandler's
  +Dispatchamcfcall PerlHandlers as CGI scriptsGEOFF
   HttpEquivbdpfHTML HTTP-EQUIV tags to HTTP headersROBH
   RefererBlock bdpfBlock based on MIME type + Referer  CHOLET
   Timeit   bmpfBenchmark PerlHandlers  APML
  
  
  



cvs commit: modperl-site/embperl Faq.pod.1.html Faq.pod.cont.html

2000-08-08 Thread richter

richter 00/08/08 22:11:07

  Modified:embperl  Faq.pod.1.html Faq.pod.cont.html
  Log:
  Embperl Webpages - Changes
  
  Revision  ChangesPath
  1.12  +118 -0modperl-site/embperl/Faq.pod.1.html
  
  Index: Faq.pod.1.html
  ===
  RCS file: /home/cvs/modperl-site/embperl/Faq.pod.1.html,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- Faq.pod.1.html2000/05/02 04:42:18 1.11
  +++ Faq.pod.1.html2000/08/09 05:11:04 1.12
  @@ -33,6 +33,7 @@
LIA href="Faq.pod.1.html#Embperl_on_SCO_Unix"Embperl on SCO 
Unix/A
LIA href="Faq.pod.1.html#Embperl_and_mod_perl_on_AIX"Embperl and 
mod_perl on AIX /A
LIA href="Faq.pod.1.html#Embperl_does_not_write_to_the_lo"Embperl 
does not write to the logfile, because of missing permissions/A
  + LIA href="Faq.pod.1.html#Is_it_possible_to_install_EmbPer"Is it 
possible to install EmbPerl into a private directory on my Unix/Linux Internet Service 
Provider account of which I have no root privilege?/A
/UL
   hr
   P
  @@ -344,6 +345,123 @@
   P
   The current solutions is to write something to the log, before Apache
   changes it's user (i.e. in the startup.pl)
  +
  +P
  +HR
  +H2img src="sq.gif" width="16" height="16" alt="-" A 
NAME="Is_it_possible_to_install_EmbPer"Is it possible to install EmbPerl into a 
private directory on my Unix/Linux Internet Service Provider account of which I have 
no root privilege?/A/H2
  +P
  +Like any other Perl module it can. Read ``perldoc ExtUtils::MakeMaker'', to
  +see which parameters are needed for Makefile.PL to change the installation
  +directory. Additionally, you have to change the CODE@INC/CODE path to
  +contain your private directory and possibly paths to other object files.
  +
  +P
  +Here are the brief details:
  +
  +P
  +STRONGRequirements/STRONG:
  +
  +UL
  +LISTRONGA NAME="item_At"At least Perl 5.004_04/A/STRONG
  +LISTRONGA NAME="item_cc"cc or gcc (your isp must give you access to the gcc 
compiler)/A/STRONG
  +LISTRONGA NAME="item_URI"URI/A/STRONG
  +LISTRONGA NAME="item_MIME"MIME::Base64/A/STRONG
  +LISTRONGA NAME="item_HTML"HTML::Parser/A/STRONG
  +LISTRONGA NAME="item_HTML"HTML::HeadParser/A/STRONG
  +LISTRONGA NAME="item_Digest"Digest::MD5/A/STRONG
  +LISTRONGA NAME="item_libnet"libnet/A/STRONG
  +LISTRONGA NAME="item_libwww"libwww/A/STRONG
  +LISTRONGA NAME="item_File"File::Spec (I believe you may have to install this 
too if you are using Perl 5.004_04 as it may not be a standard module)/A/STRONG
  +/UL
  +P
  +STRONGDirection/STRONG:
  +
  +UL
  +LISTRONGA NAME="item_Get"Get your copy of EmbPerl 
(HTML-Embperl-x.x.tar.gz)/A/STRONG
  +LISTRONGA NAME="item__tar_xvzf_HTML_Embperl_x_x_tar"% tar -xvzf 
HTML-Embperl-x.x.tar.gz/A/STRONG
  +LISTRONGA NAME="item__cd_HTML_Embperl_x_x"% cd HTML-Embperl-x.x/A/STRONG
  +LISTRONGA NAME="item__perl_Makefile_PL_PREFIX_to_yo"% perl Makefile.PL 
PREFIX=/to/your/private/dir/A/STRONG
  +LISTRONGA NAME="item__make"% make/A/STRONG
  +LISTRONGA NAME="item__make_test"% make test/A/STRONG
  +LISTRONGA NAME="item__make_install"% make install/A/STRONG
  +/UL
  +P
  +Replace /to/your/private/dir with the path to the directory you want the
  +module to be placed in. Now preface your CGI scripts with something like
  +this:
  +
  +P
  +[Alternative 1]
  +
  +P
  +PRE#!/usr/bin/perl -wT
  +use CGI::Carp qw( fatalsToBrowser ); #recommend using this to report errors 
on die or warn to browser
  +
  +use lib '/to/your/private/dir/lib'; #for A HREF="FILE::Spec"FILE::Spec/A
  +use lib '/to/your/private/dir/'; #to find Embperl
  +use lib '/to/your/private/dir/i386-linux/auto/HTML/Embperl'; #to find 
Embperl compiled stuff
  +
  +#if for some very weird reason the above 'use lib' pragma directive doesn't 
work, see Alternative 2
  +
  +use HTML::Embperl;
  +
  +#your code below ...
  +/PRE
  +P
  +[Alternative 2]
  +
  +P
  +PRE#!/usr/bin/perl -wT
  +use CGI::Carp qw( fatalsToBrowser ); #recommend using this to report errors 
on die or warn to browser
  +
  +BEGIN {
  +unshift @INC, '/to/your/private/dir/lib'; #for A 
HREF="FILE::Spec"FILE::Spec/A
  +unshift @INC, '/to/your/private/dir/'; #to find Embperl
  +unshift @INC, '/to/your/private/dir/i386-linux/auto/HTML/Embperl'; 
#to find Embperl compiled stuff
  +}
  +
  +use HTML::Embperl;
  +
  +#your code below ...
  +/PRE
  +P
  +When you make test, you may encounter superfluous warnings, you may want to
  +change the test.pl that ships with EmbPerl from
  +
  +P
  +PREBEGIN 
  +{ 
  +$fatal  = 1 ;
  +/PRE
  +P
  +to
  +
  +P
  +PREBEGIN 
  +{ 
  +unshift @INC, 

cvs commit: modperl-site/embperl EmbperlObject.pod.5.html

2000-08-08 Thread richter

richter 00/08/08 22:17:09

  Modified:embperl  EmbperlObject.pod.5.html
  Log:
  Embperl Webpages - Changes
  
  Revision  ChangesPath
  1.2   +15 -6 modperl-site/embperl/EmbperlObject.pod.5.html
  
  Index: EmbperlObject.pod.5.html
  ===
  RCS file: /home/cvs/modperl-site/embperl/EmbperlObject.pod.5.html,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- EmbperlObject.pod.5.html  2000/07/17 05:30:01 1.1
  +++ EmbperlObject.pod.5.html  2000/08/09 05:17:08 1.2
  @@ -27,10 +27,9 @@
   
   P
   PRE [!
  - 
  - $req = shift ;
  - 
  - sub new
  +/PRE
  +P
  +PRE sub new
   {
   my $self = shift ; 
   /PRE
  @@ -44,10 +43,20 @@
sub title { 'Title not given' } ;
   /PRE
   P
  +PRE !]
  +/PRE
  +P
  +PRE [-
  +  
  + # get the request object of the current request
  + $req = shift ;
  +/PRE
  +P
   PRE # here we call the method new
$req -gt; new ;
  - 
  - !]
  +/PRE
  +P
  +PRE -]
   /PRE
   P
   PRE lt;htmlgt;