RE: Novel technique for dynamic web page generation

2000-01-30 Thread Gerald Richter


   We have this problem in my company (and I'm sure it occurs in
   others as well).  Our web-dev guys use DreamWeaver to create
   sexy pages.  Previously, said pages must then be taked by
   programmers and hacked inserting "magic strings" to later be
   substitued for dynamic content; or embedding Perl code for the
   same thing.  This is a tedious process.  The resultant file, no
   longer pure HTML, is something that can not be read back into
   DreamWeaver should the page need a tweak.  Instead, the source
   page must be modified all over again.  This is a pain.

   Hence my technique.


For that reason HTML::Embperl uses the [ ] blocks to embedd Perl. This is
normal Text in Dreamwaver, Frontapge or wahtever and causes no problems. Our
designers works with such tools, with embbeded Perl without problems and
without the need to edit the source code.

Also you can put all of your Perl code inside the HTML Page, you are also
able to put it inside a Perl module and just call it from the page to get
the sparation of code and layout you intent.

Gerald

-
Gerald Richterecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:   Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: [EMAIL PROTECTED] Voice:+49 6133 925151
WWW:http://www.ecos.de  Fax:  +49 6133 925152
-



Re: ANNOUNCE: Updated Hello World Web Application Benchmarks

2000-01-30 Thread Perrin Harkins


 On Sun, 30 Jan 2000, Perrin Harkins wrote:
  I can understand that; I just don't want mod_perl users to get a
reputation
  as the Mindcraft of web application benchmarks.

 I'm not sure I see how that can happen when we quite clearly state that
 php4 is faster than mod_perl.

Only one person bothered to do both php and a PerlHandler, and in his test
mod_perl came out a little bit ahead.  On the "fastest" page, PerlHandler
gas a much higher score than php.  This is the kind of confusion I'm talking
about.
- Perrin



RE: Novel technique for dynamic web page generation

2000-01-30 Thread Gerald Richter


  For that reason HTML::Embperl uses the [ ] blocks to embedd
 Perl. This is
  normal Text in Dreamwaver, Frontapge or wahtever and causes no problems.

   Except I think the designer seeing Perl code all over his
   screen would be rather ugly.


If you include the complete Perl source in the html page you are right, if
you just put the the neccessary code there and the rest in a module, then it
maybe also helpfull for the designer to see, that there is something going
on...

Both methods has their advantages.

   And, again, the first time the page is designed, the code isn't
   there: you have to insert it by hand in just the right places.


If your design is able to place the right class=foo in the code, he/she
could also be insert [- foo -] in the html code, this makes no difference.
Most time designers will not be able to inserts both such constructs in the
right place, because they are not able to understand what's going on behind
the scenes.

I don't want to say that Embperl makes your approach senseless, I just want
to say it also handles this problem, also in a different way and I am sure
their are people who like your way and other who like more Embperl's way.

Gerald



IPC::Cache version 0.01 available

2000-01-30 Thread DeWitt Clinton

Hi,

A week or two ago, in the squid performance thread, I mentioned that I was
looking for ways to eliminate squid from our production servers.  I noted
that we are using squid to save an expensive trip to the database to
retrieve mostly static files.  At that time I said that I planned to write
a simple cache using shared memory that could be used with mod_perl to
keep data around on the first tier.  This weekend I finally had an
opportunity to do just that.

IPC::Cache is rather simple, considering that all the hard work is being
done in the IPC::Shareable the Storable modules.  I just added some basic
namespace semantics and the ability to have data expire after a period of
time.  I'm planning on submitting it to CPAN, but I think it makes sense
to make it available on this list before I do.

I'd appreciate it if anyone who tries it out could send me feedback about
whether it seems to do the trick.  

For now, you can get it at:

   http://unto.net/archives/IPC-Cache-0.01.tar.gz

Apologies if that site is a little slow -- I'll move it over to our real
servers and to CPAN in the near future.

Thanks!

-DeWitt





Re: IPC::Cache version 0.01 available

2000-01-30 Thread Perrin Harkins


 Hi,

 A week or two ago, in the squid performance thread, I mentioned that I was
 looking for ways to eliminate squid from our production servers.  I noted
 that we are using squid to save an expensive trip to the database to
 retrieve mostly static files.  At that time I said that I planned to write
 a simple cache using shared memory that could be used with mod_perl to
 keep data around on the first tier.  This weekend I finally had an
 opportunity to do just that.

 IPC::Cache is rather simple, considering that all the hard work is being
 done in the IPC::Shareable the Storable modules.  I just added some basic
 namespace semantics and the ability to have data expire after a period of
 time.  I'm planning on submitting it to CPAN, but I think it makes sense
 to make it available on this list before I do.

 I'd appreciate it if anyone who tries it out could send me feedback about
 whether it seems to do the trick.

 For now, you can get it at:

http://unto.net/archives/IPC-Cache-0.01.tar.gz

 Apologies if that site is a little slow -- I'll move it over to our real
 servers and to CPAN in the near future.

 Thanks!

 -DeWitt

Two suggestions:
- Make it compatible with Apache::Session.
- Try using IPC::MM rather than IPC::Shareable.  It may be faster, if you
don't need to store complex datatypes.



APACI_ARGS=' ... '

2000-01-30 Thread Bill Jones

Help!

I tried many variations on:

perl Makefile.PL EVERYTHING=1 USE_APACI=1 APACI_ARGS='--enable-m
odule=all'


But, I can't get away from:
snipped lots of good messages .. to display this last msg... 
=== src/modules/perl
gcc -O -fno-strict-aliasing -I/usr/local/include -DUSE_LONG_LONG
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
-I/usr/local/lib/perl5/5.00563/sun4-solaris/CORE
-DMOD_PERL_VERSION=\"1.21\" -DMOD_PERL_STRING_VERSION=\"mod_perl/1.21\"
-I../..  -I/usr/local/lib/perl5/5.00563/sun4-solaris/CORE -I../../os/unix
-I../../include   -DSOLARIS2=260 -DMOD_PERL -DUSE_PERL_SSI
-fno-strict-aliasing -I/usr/local/include -DUSE_LONG_LONG
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DUSE_EXPAT
-I../../lib/expat-lite `../../apaci` -c mod_perl.c
mod_perl.c: In function `perl_restart':
mod_perl.c:333: warning: assignment makes pointer from integer without a
cast
mod_perl.c: In function `mod_perl_set_cwd':
mod_perl.c:374: warning: passing arg 2 of `Perl_sv_setsv' makes pointer from
integer without a cast
mod_perl.c: In function `perl_handler':
mod_perl.c:783: `PL_siggv' undeclared (first use in this function)
mod_perl.c:783: (Each undeclared identifier is reported only once
mod_perl.c:783: for each function it appears in.)
mod_perl.c: In function `perl_call_handler':
mod_perl.c:1359: warning: assignment makes pointer from integer without a
cast
mod_perl.c:1384: warning: initialization makes pointer from integer without
a cast
*** Error code 1
make: Fatal error: Command failed for target `mod_perl.o'
Current working directory
/export/sneex/home/Apache/apache_1.3.9/src/modules/perl
*** Error code 1
make: Fatal error: Command failed for target `all'
Current working directory /export/sneex/home/Apache/apache_1.3.9/src/modules
*** Error code 1
make: Fatal error: Command failed for target `subdirs'
Current working directory /export/sneex/home/Apache/apache_1.3.9/src
*** Error code 1
make: Fatal error: Command failed for target `build-std'
Current working directory /export/sneex/home/Apache/apache_1.3.9
*** Error code 1
make: Fatal error: Command failed for target `build'
Current working directory /export/sneex/home/Apache/apache_1.3.9
*** Error code 1
make: Fatal error: Command failed for target `apaci_httpd'


I have only been able to configure Apache with DSO support so far.
Also, do I try to configure Apache itself from/using mod_perl?

platform stuff:
SunOS sneex 5.6 Generic_105181-15 sun4u sparc SUNW,Ultra-5_10
GCC 2.9x
Apache 1.3.9
mod_perl 1.21

???  Any ideas ???

Bill Jones * Systems Programmer * http://www.fccj.org/cgi/mail?sneex

   ('   Running -
   //\   Perl, Apache, MySQL, PHP3,
   v_/_  Ultra 10, LinuxPPC, BeOS...



Re: APACI_ARGS=' ... '

2000-01-30 Thread Jeff Beard

If you're trying for a static build, I use the method described in 
INSTALL.apaci under the heading "The flexible way". Just do "perldoc 
INSTALL.apaci"

Cheers,

Jeff

At 02:44 PM 1/30/00 -0500, Bill Jones wrote:
Help!

I tried many variations on:

perl Makefile.PL EVERYTHING=1 USE_APACI=1 APACI_ARGS='--enable-m
odule=all'


But, I can't get away from:
snipped lots of good messages .. to display this last msg... 
=== src/modules/perl
gcc -O -fno-strict-aliasing -I/usr/local/include -DUSE_LONG_LONG
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
-I/usr/local/lib/perl5/5.00563/sun4-solaris/CORE
-DMOD_PERL_VERSION=\"1.21\" -DMOD_PERL_STRING_VERSION=\"mod_perl/1.21\"
-I../..  -I/usr/local/lib/perl5/5.00563/sun4-solaris/CORE -I../../os/unix
-I../../include   -DSOLARIS2=260 -DMOD_PERL -DUSE_PERL_SSI
-fno-strict-aliasing -I/usr/local/include -DUSE_LONG_LONG
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DUSE_EXPAT
-I../../lib/expat-lite `../../apaci` -c mod_perl.c
mod_perl.c: In function `perl_restart':
mod_perl.c:333: warning: assignment makes pointer from integer without a
cast
mod_perl.c: In function `mod_perl_set_cwd':
mod_perl.c:374: warning: passing arg 2 of `Perl_sv_setsv' makes pointer from
integer without a cast
mod_perl.c: In function `perl_handler':
mod_perl.c:783: `PL_siggv' undeclared (first use in this function)
mod_perl.c:783: (Each undeclared identifier is reported only once
mod_perl.c:783: for each function it appears in.)
mod_perl.c: In function `perl_call_handler':
mod_perl.c:1359: warning: assignment makes pointer from integer without a
cast
mod_perl.c:1384: warning: initialization makes pointer from integer without
a cast
*** Error code 1
make: Fatal error: Command failed for target `mod_perl.o'
Current working directory
/export/sneex/home/Apache/apache_1.3.9/src/modules/perl
*** Error code 1
make: Fatal error: Command failed for target `all'
Current working directory /export/sneex/home/Apache/apache_1.3.9/src/modules
*** Error code 1
make: Fatal error: Command failed for target `subdirs'
Current working directory /export/sneex/home/Apache/apache_1.3.9/src
*** Error code 1
make: Fatal error: Command failed for target `build-std'
Current working directory /export/sneex/home/Apache/apache_1.3.9
*** Error code 1
make: Fatal error: Command failed for target `build'
Current working directory /export/sneex/home/Apache/apache_1.3.9
*** Error code 1
make: Fatal error: Command failed for target `apaci_httpd'


I have only been able to configure Apache with DSO support so far.
Also, do I try to configure Apache itself from/using mod_perl?

platform stuff:
SunOS sneex 5.6 Generic_105181-15 sun4u sparc SUNW,Ultra-5_10
GCC 2.9x
Apache 1.3.9
mod_perl 1.21

???  Any ideas ???

Bill Jones * Systems Programmer * http://www.fccj.org/cgi/mail?sneex

('   Running -
//\   Perl, Apache, MySQL, PHP3,
v_/_  Ultra 10, LinuxPPC, BeOS...



Jeff Beard
___
Web:www.cyberxape.com
Phone:  303.443.9339
Location:   Boulder, CO, USA




Re: APACI_ARGS=' ... '

2000-01-30 Thread Bill Jones

Thanks  :)

I can get both dists to configure; but I want a static mod_perl
AND a DSO aware Apache...

I'll peek at it again and pound on it some more.  -Sneex-  :]

Bill Jones * Systems Programmer * http://www.fccj.org/cgi/mail?sneex

   ('   Running -
   //\   Perl, Apache, MySQL, PHP3,
   v_/_  Ultra 10, LinuxPPC, BeOS...


 From: Jeff Beard [EMAIL PROTECTED]
 Date: Sun, 30 Jan 2000 13:04:55 -0700
 To: Bill Jones [EMAIL PROTECTED], [EMAIL PROTECTED]
 Subject: Re: APACI_ARGS=' ... '
 
 If you're trying for a static build, I use the method described in
 INSTALL.apaci under the heading "The flexible way". Just do "perldoc
 INSTALL.apaci"
 
 Cheers,
 
 Jeff
 



Re: IPC::Cache version 0.01 available

2000-01-30 Thread Joshua Chamas

Perrin Harkins wrote:
 
  Hi,
 
  A week or two ago, in the squid performance thread, I mentioned that I was
  looking for ways to eliminate squid from our production servers.  I noted
  that we are using squid to save an expensive trip to the database to
  retrieve mostly static files.  At that time I said that I planned to write
  a simple cache using shared memory that could be used with mod_perl to
  keep data around on the first tier.  This weekend I finally had an
  opportunity to do just that.
 
  IPC::Cache is rather simple, considering that all the hard work is being
  done in the IPC::Shareable the Storable modules.  I just added some basic
  namespace semantics and the ability to have data expire after a period of
  time.  I'm planning on submitting it to CPAN, but I think it makes sense
  to make it available on this list before I do.
 
  I'd appreciate it if anyone who tries it out could send me feedback about
  whether it seems to do the trick.
 

I'll check it out for IPC ideas ... I have a similar module,
but different, Tie::Cache, that I've been wanting to hook
into IPC for some time.  Tie::Cache is more about size based
expiration, whereas you are dealing with date based.

Thanks for posting.

-- Joshua
_
Joshua Chamas   Chamas Enterprises Inc.
NodeWorks  free web link monitoring   Huntington Beach, CA  USA 
http://www.nodeworks.com1-714-625-4051



www.modperl.com

2000-01-30 Thread Lincoln Stein

Hi,

This site, which contains the examples for the "Programming Apache
Modules in Perl and C" book, will be going down for a couple of days
while I move it to a new ISP.  When it comes back up I would like to
add a few more online examples to the site and spruce it up a bit in
general.  Any votes on which examples you'd like to see put online?

Lincoln

-- 

Lincoln D. Stein   Cold Spring Harbor Laboratory
[EMAIL PROTECTED]   Cold Spring Harbor, NY




Re: APACI_ARGS=' ... '

2000-01-30 Thread Bill Jones

 From: Jeff Beard [EMAIL PROTECTED]
 Date: Sun, 30 Jan 2000 13:04:55 -0700
 To: Bill Jones [EMAIL PROTECTED], [EMAIL PROTECTED]
 Subject: Re: APACI_ARGS=' ... '
 
 If you're trying for a static build, I use the method described in
 INSTALL.apaci under the heading "The flexible way". Just do "perldoc
 INSTALL.apaci"
 
 Cheers,
 
 Jeff


:) Sorry, tried that section several times; cannot get away from:

mod_perl.c: In function `perl_restart':
mod_perl.c:333: warning: assignment makes pointer from integer without a
cast
mod_perl.c: In function `mod_perl_set_cwd':
mod_perl.c:374: warning: passing arg 2 of `Perl_sv_setsv' makes pointer from
integer without a cast
mod_perl.c: In function `perl_handler':
mod_perl.c:783: `PL_siggv' undeclared (first use in this function)
mod_perl.c:783: (Each undeclared identifier is reported only once
mod_perl.c:783: for each function it appears in.)
mod_perl.c: In function `perl_call_handler':
mod_perl.c:1359: warning: assignment makes pointer from integer without a
cast
mod_perl.c:1384: warning: initialization makes pointer from integer without
a cast
*** Error code 1
make: Fatal error: Command failed for target `mod_perl.o'
Current working directory
/export/sneex/home/Apache/apache_1.3.9/src/modules/perl
*** Error code 1
make: Fatal error: Command failed for target `all'
Current working directory /export/sneex/home/Apache/apache_1.3.9/src/modules
*** Error code 1
make: Fatal error: Command failed for target `subdirs'
Current working directory /export/sneex/home/Apache/apache_1.3.9/src
*** Error code 1
make: Fatal error: Command failed for target `build-std'
Current working directory /export/sneex/home/Apache/apache_1.3.9
*** Error code 1
make: Fatal error: Command failed for target `build'


Notes:  Apache will build, both as a DSO and as static;  :)
mod_perl will build, but not with Apache :(
mod_php will build :)
mod_php will build as a static with Apache  :)
mod_php will not build with mod_perl :(
mod_perl is weirding out on me... :(

Currently I have both mod_perl  mod_php built and installed --
I DO NOT have Apache w/mod_perl  mod_php built yet  :(
Why?  See error(s) above...

Thanks anyway, I've had enough for one weekend  -Sneex-  :|

Bill Jones * Systems Programmer * http://www.fccj.org/cgi/mail?sneex

   ('   Running -
   //\   Perl, Apache, MySQL, PHP3,
   v_/_  Ultra 10, LinuxPPC, BeOS...



Re: www.modperl.com

2000-01-30 Thread Gunther Birznieks

The problem with requests such as these is ... well... why isn't this stuff
going into the main mod_perl guide? It seems to me that if www.modperl.com is
focused around the book, then let it be. But I personally hate going through
different sites to find the info I want.

Another question is why www.modperl.com at all? Why not store the material as
part of the main mod_perl site? Or off of the apache site?

I guess I am just not sure why the site which seems to be centered around the
book is its own site anyway?

Anyway, assuming that you are interested in maintaining a separate site: why
not have an errata area so that people can quickly check and see if something
is amiss without going through the headache of troubleshooting the book. That
is, if there are any errata?

"David M. Davisson" wrote:

 Lincoln,

 You should add some examples showing safe file uploads.

 
 David M. Davisson
 [EMAIL PROTECTED]

 - Original Message -
 From: Lincoln Stein [EMAIL PROTECTED]
 To: Modperl list [EMAIL PROTECTED]
 Sent: Sunday, January 30, 2000 12:28 PM
 Subject: www.modperl.com

  Hi,
 
  This site, which contains the examples for the "Programming Apache
  Modules in Perl and C" book, will be going down for a couple of days
  while I move it to a new ISP.  When it comes back up I would like to
  add a few more online examples to the site and spruce it up a bit in
  general.  Any votes on which examples you'd like to see put online?
 
  Lincoln
 
  --
  
  Lincoln D. Stein   Cold Spring Harbor Laboratory
  [EMAIL PROTECTED]   Cold Spring Harbor, NY
  
 



Re: www.modperl.com

2000-01-30 Thread Paul J. Lucas

On Sun, 30 Jan 2000, Gunther Birznieks wrote:

 Another question is why www.modperl.com at all? Why not store the material as
 part of the main mod_perl site? Or off of the apache site?
 
 I guess I am just not sure why the site which seems to be centered around the
 book is its own site anyway?

Despite the fact that it's an amazing book, I have to agree
with his comments.  IMHO, www.modperl.com, if it exists, should
be about the module (and not the book) just like www.modssl.org
is about the module.

The book info should either be a sub-page under www.modperl.com
or under the apache site (or even perhaps www.book.modperl.com).

- Paul

P.S.: Ralf Engelschall designs nice web pages, IMHO; perhaps
you can get him to help you with www.modperl.com.



Re: www.modperl.com

2000-01-30 Thread Bill Jones

I really have never thought that the www.modperl.com site
was anything but about the Apache API - maybe I'm mistaken?

There are distinct advantages in having 'more than one site' to
find information - especially when you want 'more than one view.'

There needs to be 'friendly competition' on the WWW...

I vote for more systems administration, mod_proxy integration,
and maybe a few more examples covering Apache API?


my $thoughts =~ /^2 cents$/ig;
-Sneex-  :]

Bill Jones * Systems Programmer * http://www.fccj.org/cgi/mail?sneex

   ('   Running -
   //\   Perl, Apache, MySQL, PHP3,
   v_/_  Ultra 10, LinuxPPC, BeOS...



Re: Novel technique for dynamic web page generation

2000-01-30 Thread Gisle Aas

"Paul J. Lucas" [EMAIL PROTECTED] writes:

 On 28 Jan 2000, Randal L. Schwartz wrote:
 
  Have you looked at the new XS version of HTML::Parser?
 
   Not previously, but I just did.
 
  It's a speedy little beasty.  I dare say probably faster than even
  expat-based XML::Parser because it doesn't do quite as much.
 
   But still an order of magnitude slower than mine.  For a test,
   I downloaded Yahoo!'s home page for a test HTML file and wrote
   the following code:
 
 - test code -
 #! /usr/local/bin/perl
 
 use Benchmark;
 use HTML::Parser;
 use HTML::Tree;
 
 @t = timethese( 1000, {
'Parser' = '$p = HTML::Parser-new(); $p-parse_file( "/tmp/test.html" );',
'Tree'   = '$html = HTML::Tree-new( "/tmp/test.html" );',
 } );
 -
 
   The results are:
 
 - results -
 Benchmark: timing 1000 iterations of Parser, Tree...
 Parser: 37 secs (36.22 usr  0.15 sys = 36.37 cpu)
   Tree:  7 secs ( 7.40 usr  0.22 sys =  7.62 cpu)
 ---
 
   One really can't compete against mmap(2), pointer arithmetic,
   and dereferencing.

That's because you fall back to version 2 compatibility when you don't
provide any arguments to the HTML::Parser constructor.  The parser
will then make useless method calls for all stuff it finds, and method
calls with perl are not as cheap as I would wish.

- test code -
use Benchmark;
use HTML::Parser;

timethese( 1000, {
   'Parser' = '$p = HTML::Parser-new(); $p-parse_file( "./index.html" );',
   'Parser3' = 'HTML::Parser-new(api_version = 3)-parse_file( "./index.html" );'
} );
-

$ lwp-download http://yahoo.com
Saving to 'index.html'...
11.6 KB received in 2 seconds (5.8 KB/sec)

$ perl test.pl
Benchmark: timing 1000 iterations of Parser, Parser3...
Parser: 30 wallclock secs (29.31 usr +  0.20 sys = 29.51 CPU)
   Parser3:  2 wallclock secs ( 1.39 usr +  0.17 sys =  1.56 CPU)

...but this is kind of a useless benchmark, as it does not do anything.

Regards,
Gisle



Where did the POST data go in the ErrorDocument request?

2000-01-30 Thread Roberto Bourgonjen

Hi,

I redirect 403 requests and create the requested document on the fly. It
works for GET requests, but if the request is POST, either apache or
mod_perl transformes it to GET, and the POST data is gone, even if I
access the $r-prev object.

I tried fetching the post data even in the uri translation stage, and
transforming the request into GET (with $r-method('GET')) after storing
the post data in an environment variable but then apache hangs, probably
trying to read post data that's no longer there.

Why is it gone, and where did it go?

This is in the srm.conf of my Apache 1.3.6/mod_perl 1.19:

ErrorDocument 404 /not_found

Location /not_found
SetHandler perl-script
Perlhandler SomeHandler-create
/Location

Kind regards, Roberto

-- 
Roberto Bourgonjen



Re: Novel technique for dynamic web page generation

2000-01-30 Thread Paul J. Lucas

On 30 Jan 2000, Gisle Aas wrote:

 $ perl test.pl
 Benchmark: timing 1000 iterations of Parser, Parser3...
 Parser: 30 wallclock secs (29.31 usr +  0.20 sys = 29.51 CPU)
Parser3:  2 wallclock secs ( 1.39 usr +  0.17 sys =  1.56 CPU)
 
 ...but this is kind of a useless benchmark, as it does not do anything.

It parses the file into a tree which is precisely what I'm
benchmarking.

- Paul



RE: Novel technique for dynamic web page generation

2000-01-30 Thread Ron Pero

At 07:57 AM 01/30/00 -0800, Paul J. Lucas wrote:
On Sun, 30 Jan 2000, Gerald Richter wrote:

 For that reason HTML::Embperl uses the [ ] blocks to embedd Perl. This is
 normal Text in Dreamwaver, Frontapge or wahtever and causes no problems.

   Except I think the designer seeing Perl code all over his
   screen would be rather ugly.


How do you handle "sticky widgets"? I put perl variables in the VALUE
attribute of input boxes. These show up for the designer. Are you able to
get around that?
input type="text" name="CustomerFName"
VALUE="[%$customer_info{'CustomerFName'}%]"

Ron



RE: Novel technique for dynamic web page generation

2000-01-30 Thread Paul J. Lucas

On Sun, 30 Jan 2000, Ron Pero wrote:

 How do you handle "sticky widgets"?

I've never heard that term before.

 I put perl variables in the VALUE attribute of input boxes. These show up for
 the designer. Are you able to get around that?  input type="text"
 name="CustomerFName" VALUE="[%$customer_info{'CustomerFName'}%]"

Yes.  You simply put in dummy content:

INPUT TYPE=text NAME="CustomerFName" CLASS="value::customer_name"
 VALUE="Joe Blow"

where "customer_name" is a key into the page's object hash, i.e.:

$this-{ customer_name }

that was presumeably read via DBI.  (You can name the key
anything you like, of course.)

The dummy content is substituted out for actual content.
Again, one of the plusses for this technique is that the
designer sees what a REAL page will look like.

- Paul



Compiling mod_perl as a DSO?

2000-01-30 Thread Bill Bradford

Is it possible to compile/install mod_perl as a DSO, on an existing
pre-compiled copy of apache (with mod_so enabled), yet?  If so, 
how?  I couldnt find it in the docs... and I'm tired of having to
statically compile the module in... so any help would be appreciated.

Thanks.

Bill

-- 
+---+--+--+
|Bill Bradford  | [EMAIL PROTECTED] | [EMAIL PROTECTED]|
|http://www.sunhelp.org | http://www.pdp11.org | http://www.mrbill.net|
+---+--+--+



Problems with custom config directives in user written modules

2000-01-30 Thread Dave Hayes

I cannot seem to get custom configuration directives to work in 
apache (1.3.11) modperl (1.21). I would presume the examples in the
book do not work either. I found someone having similar problems
in the list archives, to which Doug provided a workaround which also
does not work.

Any advice about this issue is helpful. Please reply to me directly as
well. 

In Makefile.PL:
  my @directives = (
  ...
{   name=  'Directive4',
errmsg  =  'Anything',
args_how=  'RAW_ARGS',
req_override=  'OR_ALL',
},
  );

In the httpd.conf file:

  Perl
  require Apache::TestDirective;
  delete $INC{'Apache/TestDirective.pm'};
  /Perl
  #PerlModule Apache::TestDirective

  Directive4 foo

What comes back:

 Invalid command 'Directive4', perhaps mis-spelled or defined by a
 module not included in the server configuration

Other details are...Modperl built with:

  perl Makefile.PL APACHE_SRC=/usr/local/webadmin/${APACHE} DO_HTTPD=1
USE_APACI=1 PREP_HTTPD=1 EVERYTHING=1 PERL_TRACE=1

and Apache built with:

 ./configure \
  "--with-layout=Apache" \
  "--prefix=/usr/local/www" \
  "--enable-module=most" \
  "--enable-shared=max" \
  "--activate-module=src/modules/extra/mod_macro.c" \
  "--activate-module=src/modules/perl/libperl.a" \

$ bin/httpd -V
Server version: Apache/1.3.11 (Unix)
Server built:   Jan 30 2000 17:23:31
Server's Module Magic Number: 19990320:6
Server compiled with
 -D HAVE_MMAP
 -D USE_MMAP_SCOREBOARD
 -D USE_MMAP_FILES
 -D USE_FLOCK_SERIALIZED_ACCEPT
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D HTTPD_ROOT="/usr/local/webadmin"
 -D SUEXEC_BIN="/usr/local/webadmin/bin/suexec"
 -D DEFAULT_PIDLOG="logs/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/httpd.scoreboard"
 -D DEFAULT_LOCKFILE="logs/httpd.lock"
 -D DEFAULT_XFERLOG="logs/access_log"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D TYPES_CONFIG_FILE="conf/mime.types"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"
 -D ACCESS_CONFIG_FILE="conf/access.conf"
 -D RESOURCE_CONFIG_FILE="conf/srm.conf"

$ bin/httpd -l
Compiled-in modules:
  http_core.c
  mod_so.c
  mod_macro.c
  mod_perl.c

$ perl -V
Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration:
  Platform:
osname=freebsd, osvers=3.3-release, archname=i386-freebsd
uname='freebsd somehost.org 3.3-release freebsd 3.3-release #0: sun nov 21 
22:33:17 pst 1999 [EMAIL PROTECTED]:usrsrcsyscompilekern i386 '
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef useperlio=undef d_sfio=undef
  Compiler:
cc='cc', optimize='-O', gccversion=2.7.2.3
cppflags='-I/usr/local/include -DPERL_EMERGENCY_SBRK -DDEBUGGING_MSTATS 
-DPACK_MALLOC -DTWO_POT_OPTIMIZE'
ccflags ='-I/usr/local/include -DPERL_EMERGENCY_SBRK -DDEBUGGING_MSTATS 
-DPACK_MALLOC -DTWO_POT_OPTIMIZE '
stdchar='char', d_stdstdio=undef, usevfork=true
intsize=4, longsize=4, ptrsize=4, doublesize=8
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
alignbytes=4, usemymalloc=y, prototype=define
  Linker and Libraries:
ld='cc', ldflags ='-Wl,-E  -L/usr/local/lib'
libpth=/usr/lib /usr/local/lib
libs=-ldb -lm -lc -lcrypt
libc=/usr/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
cccdlflags='-DPIC -fpic', lddlflags='-shared  -L/usr/local/lib'


Characteristics of this binary (from libperl): 
  Built under freebsd
  Compiled at Nov 22 1999 16:25:57
  %ENV:
PERL5LIB="/home/dave/lib/perl"
  @INC:
/home/dave/lib/perl
/usr/local/lib/perl5/5.00503/i386-freebsd
/usr/local/lib/perl5/5.00503
/usr/local/lib/perl5/site_perl/5.005/i386-freebsd
/usr/local/lib/perl5/site_perl/5.005
--
Dave Hayes - Consultant - Altadena CA, USA - [EMAIL PROTECTED] 
 The opinions expressed above are entirely my own 

True freedom requires taking responsibility for your own life.  That
frightens the hell out of too many people.   They prefer to have Big
Brother holding a safety net  for them,   and they'll sell their own
birthright and their children's as well to keep it. --F. Paul Wilson




Re: Compiling mod_perl as a DSO? (fwd)

2000-01-30 Thread Michael Robinton

On Sun, 30 Jan 2000, Bill Bradford wrote:

 Is it possible to compile/install mod_perl as a DSO, on an existing
 pre-compiled copy of apache (with mod_so enabled), yet?  If so, 
 how?  I couldnt find it in the docs... and I'm tired of having to
 statically compile the module in... so any help would be appreciated.
 
I read on the list at one time that the DSO verson has a memory leak. 
Don't know if this is still true or not. The static version apparently 
did not have that problem. If someone knows the answer to this I'd like 
to know myself as the DSO version is considerably easier to put together 
with other modules.

Michael



Re: Compiling mod_perl as a DSO? (fwd)

2000-01-30 Thread Bill Bradford

On Sun, Jan 30, 2000 at 10:37:24PM -0800, Michael Robinton wrote:
 I read on the list at one time that the DSO verson has a memory leak. 
 Don't know if this is still true or not. The static version apparently 
 did not have that problem. If someone knows the answer to this I'd like 
 to know myself as the DSO version is considerably easier to put together 
 with other modules.

Exactly - right now, there's no easy way to compile a static 
apache + mod_perl + php3.  Heck, I cant even get apache + mod_perl
to work (I need to do --enable-module=so during apache configuration,
but the modperl setup/build re-configures apache and leaves it out).

I'd be happy with being able to do apache + static mod_perl + DSO'ed
PHP3, if anybody can point out how to do apache + static mod_perl +
"--enable-module=so".

Thanks.

Bill

-- 
+---+--+--+
|Bill Bradford  | [EMAIL PROTECTED] | [EMAIL PROTECTED]|
|http://www.sunhelp.org | http://www.pdp11.org | http://www.mrbill.net|
+---+--+--+