Re: templating system opinions (axkit?)

2003-07-23 Thread Matt Sergeant
On Mon, 21 Jul 2003, Patrick Galbraith wrote:

 Anyone on this list use AxKit? I'm curious how it pans out.

 I like the idea of XSLT/XML, though I find myself trying to read between
 the lines of hype vs. something that's actually very useful. I don't know,
 so I don't have any opinions. I do know I'd like to use XSLT/XML so as to
 have a project to use it for, hence learn it.

I'm just about to roll out a site using AxKit that has to do about 3
million hits/day out of the box.

The main reason I like AxKit is it prevents me from screwing up and
creating XSS bugs, because everything has to be well formed. I almost
never have to use html or URL encode/decode functions - I just write
straight perl code.

I barely notice that I'm using XML.

It's also worth noting that XSLT is a portable skill, with lots of great
offline tools.

It's also worth saying: never listen to hype. Evaluate solutions based on
your criteria. AxKit matches mine but it doesn't mean it will match yours.

Matt.


Re: templating system opinions (axkit?) [OT]

2003-07-23 Thread Ged Haywood
Hi Matt,

On Wed, 23 Jul 2003, Matt Sergeant wrote:

 The main reason I like AxKit is it prevents me from screwing up [snip]
 I just write straight perl code.  I barely notice that I'm using XML.

Can you give us in a couple of sentences your take on the state of XML
in general and AxKit in particular?  To me somehow things don't seem
to be going in quite the same direction any more...

73,
Ged.



RE: mod_perl installation problem...

2003-07-23 Thread Jim Morrison [Mailing-Lists]
Thanks for getting back Randy,

Libapreq is complaining too.. That's how this all started, I couldn't
install Apache::Cookie.

Ok.. I've had a bit of a clean up, and I can now get Apachemod_perl
compiling and running just fine.. __But__ I still can't for the life of
me get Apache::Request and Apache::Cookie to install..  Going slowly
insane. 

Any help really appreciated.. Hope this hasn't become too OT.

Cheers,
Jimbo

PS: Here is the end of the make test from libapreq:
=
/usr/local/apache/bin/httpd -X -d /usr/src/libapreq-1.2/t -f
/usr/src/libapreq-1.2/t/conf/httpd.conf -DAPACHE1
using Apache/1.3.28

waiting for server to start: .
waiting for server to start: ok (waited 0 secs)
server localhost.localdomain:8529 started
apreq/big_inputNOK 1# Failed test 1 in apreq/big_input.t at line 40
apreq/big_inputNOK 2# Failed test 2 in apreq/big_input.t at line 40
fail #2
apreq/big_inputNOK 3# Failed test 3 in apreq/big_input.t at line 40
fail #3
apreq/big_inputNOK 4# Failed test 4 in apreq/big_input.t at line 40
fail #4
apreq/big_inputNOK 5# Failed test 5 in apreq/big_input.t at line 40
fail #5
apreq/big_inputNOK 6# Failed test 6 in apreq/big_input.t at line 40
fail #6
apreq/big_inputNOK 7# Failed test 7 in apreq/big_input.t at line 40
fail #7
apreq/big_inputNOK 8# Failed test 8 in apreq/big_input.t at line 40
fail #8
apreq/big_inputNOK 9# Failed test 9 in apreq/big_input.t at line 40
fail #9
apreq/big_inputNOK 10# Failed test 10 in apreq/big_input.t at line
63
apreq/big_inputNOK 11# Failed test 11 in apreq/big_input.t at line
63 fail #2
apreq/big_inputNOK 12# Failed test 12 in apreq/big_input.t at line
63 fail #3
apreq/big_inputNOK 13# Failed test 13 in apreq/big_input.t at line
63 fail #4
apreq/big_inputNOK 14# Failed test 14 in apreq/big_input.t at line
63 fail #5
apreq/big_inputNOK 15# Failed test 15 in apreq/big_input.t at line
63 fail #6
apreq/big_inputNOK 16# Failed test 16 in apreq/big_input.t at line
63 fail #7
apreq/big_inputNOK 17# Failed test 17 in apreq/big_input.t at line
63 fail #8
apreq/big_inputNOK 18# Failed test 18 in apreq/big_input.t at line
63 fail #9
apreq/big_inputNOK 19# Failed test 19 in apreq/big_input.t at line
63 fail #10
apreq/big_inputNOK 20# Failed test 20 in apreq/big_input.t at line
63 fail #11
apreq/big_inputNOK 21# Failed test 21 in apreq/big_input.t at line
63 fail #12
apreq/big_inputFAILED tests 1-21
Failed 21/21 tests, 0.00% okay
apreq/cookie...NOK 1# Failed test 1 in apreq/cookie.t at line 20
apreq/cookie...FAILED test 1
Failed 1/1 tests, 0.00% okay
apreq/inherit..NOK 1# Failed test 1 in apreq/inherit.t at line 11
apreq/inherit..FAILED test 1
Failed 1/1 tests, 0.00% okay
apreq/request..NOK 1# Failed test 1 in apreq/request.t at line 18
apreq/request..NOK 2# Failed test 2 in apreq/request.t at line 26
apreq/request..FAILED tests 1-2
Failed 2/2 tests, 0.00% okay
Failed Test   Stat Wstat Total Fail  Failed  List of Failed

---
apreq/big_input.t   21   21 100.00%  1-21
apreq/cookie.t   11 100.00%  1
apreq/inherit.t  11 100.00%  1
apreq/request.t  22 100.00%  1-2
*** server localhost.localdomain:8529 shutdown
!!! error running tests (please examine t/logs/error_log)
make: *** [run_tests] Error 1
=



And here is t/logs/error_log



[Wed Jul 23 09:42:12 2003] [info] created shared memory segment #950274
[Wed Jul 23 09:42:13 2003] [error] Can't load
'/usr/src/libapreq-1.2/blib/arch/auto/Apache/Cookie/Cookie.so' for
module Apache::Cookie: libapreq.so.1: cannot open shared object file: No
such file or directory at /usr/local/lib
/perl5/5.8.0/i686-linux/DynaLoader.pm line 229.
 at /usr/local/lib/perl5/site_perl/5.8.0/i686-linux/mod_perl.pm line 14
Compilation failed in require at
/usr/src/libapreq-1.2/t/response/TestApReq/big_input.pm line 9.
BEGIN failed--compilation aborted at
/usr/src/libapreq-1.2/t/response/TestApReq/big_input.pm line 9.
Compilation failed in require at (eval 10) line 3.

[Wed Jul 23 09:42:13 2003] [error] Undefined subroutine
TestApReq::big_input::handler called.

[Wed Jul 23 09:42:13 2003] [error] Undefined subroutine
TestApReq::big_input::handler called.

[Wed Jul 23 09:42:13 2003] [error] Undefined subroutine
TestApReq::big_input::handler called.

[Wed Jul 23 09:42:13 2003] [error] Undefined subroutine
TestApReq::big_input::handler called.

[Wed Jul 23 09:42:13 2003] [error] Undefined subroutine
TestApReq::big_input::handler called.

[Wed Jul 23 09:42:13 2003] [error] Undefined subroutine
TestApReq::big_input::handler called.

[Wed Jul 23 09:42:13 2003] [error] Undefined subroutine
TestApReq::big_input::handler called.

[Wed Jul 23 09:42:13 2003] [error] Undefined 

Re: Apache::UploadMeter

2003-07-23 Thread Sven
I had some problems with my server-configuration (httpd.conf) but now it
works perfect.
Thanks to Issac for the fast help and the cool module.

 Hope this gets you started,
   Issac






Re: [QUESTION] Can't read out verified username (auth)

2003-07-23 Thread Fatih Gey

- Original Message - 
From: Martin Wickman [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, July 21, 2003 4:41 PM
Subject: Re: [QUESTION] Can't read out verified username (auth)


 On Mon, Jul 21, 2003 at 12:36:55PM +0200, Fatih Gey wrote:
   On Mon, Jul 21, 2003 at 01:05:58AM +0200, Fatih Gey wrote:

i was writing my own AuthHandler with modperl v2 (v1.99_09).
   
   [...]
   
After having entered user/pass via html-form, this authentification
does his job well, but on the following request (on same browser)
$obj-user doesnt seem to return any value.. so this handler tries
to compare http post data ( which arent present this time) with
userdata in mysql-table.. resulting in an Auth_Required error.
   
   Well, how do you suppose that the browser should know how and what
   credentials to send? 
   
   Unless you (a) create a session-cookie, (b) encode a session-kei into
   each url or (c) use the simple but proper Basic Authentication scheme,
   there is no way to accomplish this. And from what I gather you are not
   doing any of that?
   
 
  I supposed the browser to resend always an unique bowser session
  id, which is used by apache to save certain values, like
  $ENV{'REMOTE_USER'} (similiar to a session-cookie with uid and
  serverbased $vars) ..  Isn't this the way Basic Authentication
  scheme works ? ..
 
 Nope. When the browser gets a 401 response from the server, it will
 (most likely) pop up a dialog asking the user for name and
 password. These credentials gets mangled into an Authorization header
 which gets sent with the next request once the user klicks OK in the
 dialog. Now, you can perform your authen-code as you like.
 
 Cookies and forms' got nothing to do with it, really.
 
 Read more here: http://www.faqs.org/rfcs/rfc2617.html
 
 
 

Oh OK.., now i get it: In Basic Auth-Scheme, the Useragent -after getting the 
required user and pass info from Client- resends his Authorization-String in every 
Requestheader
submitted to the Server. So the webserver have not to recognize an already authorized 
user,
as long as he's possible to authorize the user on every request.

So there's no way, to use an http-form instead of browser's ugly authorization-box and 
perfrom the 
Basic Authorization (without Cookies or taking an sessionkey with the url)? 







Re: caching questions

2003-07-23 Thread Peter Haworth
On Tue, 22 Jul 2003 13:05:00 +0300, Stas Bekman wrote:
 Peter Haworth wrote:
  Cache::Mmap (which I wrote) isn't threadsafe, but should work OK in a
  forking MPM. If anyone wants to contribute code to make it threadsafe
  (preferably without impacting single-threaded performance too much),
  I'll be very grateful. I'd do it myself, but I've never used threads, so
  I'm bound to get it wrong.

 I haven't looked at the module's implementation, but if you have a C-level
 thread-safety issues, you may consider using libapr which provides a
 thread-safe mmap API.

No, it's perl-level stuff at the point that matters. Currently, it uses fine
grained file locking to prevent concurrent accesses from other processes,
but as far as I understand it, this won't prevent concurrent accesses from
other threads in the same process.

-- 
Peter Haworth   [EMAIL PROTECTED]
Do you expect me to implement it?
No, Mister Schwern, I expect you to DIE!
-- Michael G Schwern in p5p


Re: cookies and POST in pure MP2?

2003-07-23 Thread Carl Brewer


Egor Korablev wrote:

Hi

How can I write and get cookies and get POST data (text) under MP2 handler
without using apache::compat?
You can either use libapreq, which is _almost_ there :)
or hack yuor own bits up cribbed from CGI.pm or the test
stuff in the mp2 test suite.  That's what I'm using at the
moment while assisting as best I can with the libapreq development.
If you look through the archives for this list you'll find lots
of useful bits  pieces.
Carl






Re: Apache 1.3.27 configure error with mod_perl 1.28, perl 5.8.0, gcc 3.3 on Solaris 2.8

2003-07-23 Thread Chris Fabri
At 05:09 PM 7/22/2003 -0500, Bill Weinman wrote:
At 04:45 PM 7/22/2003, Chris Fabri wrote:
I'm not even getting as far as the make when I get the error.If I 
build mod_perl separately, and remove all references to these flags from 
the makefiles, and the run apache's config, I still get this error during 
configuration.
Where do you find those flags in the makefiles? I don't see them anywhere 
in my copy.


The are added to CCDLFLAGS and LDDLFAGS.They aren't in the src anywhere 
before perl Makefile.PL, so they are created based on something.  there's 
also no reference to /usr/ccs/bin/ar  before I create the Makefile, I'm 
confused as to where it's grabbing this variable, since I've removed 
/usr/ccs/bin/from the path and only have the path for the GNU binutils in 
the path./usr/ccs/bin/ar   shows up in the Makefiles for FULL_AR and 
within the CCFLAGS line.chris 



RE: templating system opinions (axkit?)

2003-07-23 Thread Hauck, William B.
Hi,

I've been considering using a template system for an app that I'm working, but decided 
against it as the designers who would be putting the actual pages together (look n 
feel) use Adobe GoLive which does 'bad things' to non-html stuff (at least in my 
experience).

What i've done is just use completely external html files with html-compliant comments 
indicating the data field. (example !-- APPNAME_USER_FIRST_NAME --).  My application 
just reads in the html on startup and does a series of substition statements over the 
file as necessary to replace the comments with the actual data.  Thus, each type of 
page has one base html (or html file pieces) that are merged with each other and data 
as necessary allowing all logic to be kept in the program.

It's certainly not the most robust system in the world, but it's simple and compatible 
with existing skill sets and design tools.  Also, it only reads those html files once 
at startup so if you change designs on the fly the application needs to be restarted.  
I'll be adding a function to either stat the files before using the cached version or 
just automatically reload the files every 15 minutes regardless of changes to 
eliminate the SIGHUP issue.

Please do note that I'm only expecting, on the VERY high side, a few thousand users to 
be hitting it each day.

good luck,

bill


-Original Message-
From:   Matt Sergeant [mailto:[EMAIL PROTECTED]
Sent:   Wed 2003-07-23 4:00 AM
To: Patrick Galbraith
Cc: [EMAIL PROTECTED]
Subject:Re: templating system opinions (axkit?)
On Mon, 21 Jul 2003, Patrick Galbraith wrote:

 Anyone on this list use AxKit? I'm curious how it pans out.

 I like the idea of XSLT/XML, though I find myself trying to read between
 the lines of hype vs. something that's actually very useful. I don't know,
 so I don't have any opinions. I do know I'd like to use XSLT/XML so as to
 have a project to use it for, hence learn it.

I'm just about to roll out a site using AxKit that has to do about 3
million hits/day out of the box.

The main reason I like AxKit is it prevents me from screwing up and
creating XSS bugs, because everything has to be well formed. I almost
never have to use html or URL encode/decode functions - I just write
straight perl code.

I barely notice that I'm using XML.

It's also worth noting that XSLT is a portable skill, with lots of great
offline tools.

It's also worth saying: never listen to hype. Evaluate solutions based on
your criteria. AxKit matches mine but it doesn't mean it will match yours.

Matt.







CONFIDENTIALITY NOTICE: This E-Mail is intended only 
for the use of the individual or entity to which it is addressed and may contain 
information that is privileged, confidential and exempt from disclosure under 
applicable law. If you have received this communication in error, please do not 
distribute and delete the original message.  Please notify the sender by E-Mail at the 
address shown. Thank you for your compliance.



RE: templating system opinions (axkit?)

2003-07-23 Thread Sam Tregar
On Wed, 23 Jul 2003, Hauck, William B. wrote:

 What i've done is just use completely external html files with
 html-compliant comments indicating the data field. (example !--
 APPNAME_USER_FIRST_NAME --).  My application just reads in the html
 on startup and does a series of substition statements over the file
 as necessary to replace the comments with the actual data.  Thus,
 each type of page has one base html (or html file pieces) that are
 merged with each other and data as necessary allowing all logic to
 be kept in the program.

Change that to:

  !-- TMPL_VAR APPNAME_USER_FIRST_NAME --

and you can use HTML::Template!  You'll also get loops, includes,
and simple conditionals should you ever need them.

-sam



RE: templating system opinions (axkit?)

2003-07-23 Thread FFabrizio

 Change that to:
 
   !-- TMPL_VAR APPNAME_USER_FIRST_NAME --

You mean TMPL_VAR APPNAME_USER_FIRST_NAME don't you?  Or did I miss the
secret stealth hide-your-tags-in-html-comments feature? :-) 

-Fran 


RE: templating system opinions (axkit?)

2003-07-23 Thread Marc Slagle




What you have created for your own use is almost exactly what HTML::Template does. We have used it for a year without any major problems between us and the HTML designer. Its fast and supports loops and if statements. Its probably worth your while to check it out.

As far as XSLT goes, we're moving to it now (XML::LibXSLT) and its making our life much easier. Our designer doesnt mind learning it, esp. after showing him what it can do.

Marc Slagle
Whapps, LLC.

On Wed, 2003-07-23 at 10:27, Hauck, William B. wrote:

Hi,

I've been considering using a template system for an app that I'm working, but decided against it as the designers who would be putting the actual pages together (look n feel) use Adobe GoLive which does 'bad things' to non-html stuff (at least in my experience).

What i've done is just use completely external html files with html-compliant comments indicating the data field. (example !-- APPNAME_USER_FIRST_NAME --).  My application just reads in the html on startup and does a series of substition statements over the file as necessary to replace the comments with the actual data.  Thus, each type of page has one base html (or html file pieces) that are merged with each other and data as necessary allowing all logic to be kept in the program.






Re: cookies and POST in pure MP2?

2003-07-23 Thread Stas Bekman
Carl Brewer wrote:


Egor Korablev wrote:

Hi

How can I write and get cookies and get POST data (text) under MP2 
handler
without using apache::compat?


You can either use libapreq, which is _almost_ there :)
or hack yuor own bits up cribbed from CGI.pm or the test
stuff in the mp2 test suite.  That's what I'm using at the
moment while assisting as best I can with the libapreq development.
If you look through the archives for this list you'll find lots
of useful bits  pieces.
probably you can just use CGI.pm. Carl doesn't want to use it, so he had to go 
to the pains to extract the wanted bits from it ;)

make sure that you are using the latest CGI.pm.



__
Stas BekmanJAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide --- http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


Re: templating system opinions (axkit?)

2003-07-23 Thread Douglas Hunter
Hauck, William B. wrote:
Hi,

snip /

I'll be adding a function to 


And then you'll be adding a function to..., and then possibly a function 
to..., and then you'll need it to...

Pretty soon, you will have spent hundreds of hours developing a 
templating system that you throw away in favor of one of the tried and 
true templating systems that are available.

Of course I may be wrong.  Your needs may be very simple, and may not 
change over time.

But you may want to ask around on this list to see how many folks have 
rolled their own templating system and thrown it away.  Of course there 
are folks on this list who haven't thrown theirs away, and have worked 
hard to make them robust, stable and performant.  Thats why we take 
advantage of their work ;-)


bill
-- Douglas




-Original Message-
From:   Matt Sergeant [mailto:[EMAIL PROTECTED]
Sent:   Wed 2003-07-23 4:00 AM
To: Patrick Galbraith
Cc: [EMAIL PROTECTED]
Subject:Re: templating system opinions (axkit?)
On Mon, 21 Jul 2003, Patrick Galbraith wrote:

Anyone on this list use AxKit? I'm curious how it pans out.

I like the idea of XSLT/XML, though I find myself trying to read between
the lines of hype vs. something that's actually very useful. I don't know,
so I don't have any opinions. I do know I'd like to use XSLT/XML so as to
have a project to use it for, hence learn it.


I'm just about to roll out a site using AxKit that has to do about 3
million hits/day out of the box.
The main reason I like AxKit is it prevents me from screwing up and
creating XSS bugs, because everything has to be well formed. I almost
never have to use html or URL encode/decode functions - I just write
straight perl code.
I barely notice that I'm using XML.

It's also worth noting that XSLT is a portable skill, with lots of great
offline tools.
It's also worth saying: never listen to hype. Evaluate solutions based on
your criteria. AxKit matches mine but it doesn't mean it will match yours.
Matt.







CONFIDENTIALITY NOTICE: This E-Mail is intended only 
for the use of the individual or entity to which it is addressed and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you have received this communication in error, please do not distribute and delete the original message.  Please notify the sender by E-Mail at the address shown. Thank you for your compliance.






Re: templating system opinions (axkit?)

2003-07-23 Thread Perrin Harkins
[EMAIL PROTECTED] wrote:
Change that to:

 !-- TMPL_VAR APPNAME_USER_FIRST_NAME --


You mean TMPL_VAR APPNAME_USER_FIRST_NAME don't you?  Or did I miss the
secret stealth hide-your-tags-in-html-comments feature? :-)
You missed it:
http://search.cpan.org/author/SAMTREGAR/HTML-Template-2.6/Template.pm#NOTES
- Perrin



Templating system opinions (CGI::Application in connection with either HTML::Template or Template::Toolkit)

2003-07-23 Thread Dave Baker
I'm curious as to why the combination of CGI::Application and
HTML::Template hasn't taken off ... CGI::Application seems to allow a
software developer to create an entire CGI app that can be stored and
distributed as a module on CPAN, but only a couple such app/modules
have been so added.

Especially since I think I read recently where the very popular
Template::Toolkit can be used by CGI::Application in lieu of
HTML::Template.

---
Dave Baker



RE: templating system opinions (axkit?)

2003-07-23 Thread FFabrizio

 You missed it:
 http://search.cpan.org/author/SAMTREGAR/HTML-Template-2.6/Temp
late.pm#NOTES

Ah.  When the section begins If you're a fanatic about valid HTML it
becomes more clear why I missed that. :-)

Thanks,
Fran


Re: Templating system opinions (CGI::Application in connection with either HTML::Template or Template::Toolkit)

2003-07-23 Thread Randal L. Schwartz
 Dave == Dave Baker [EMAIL PROTECTED] writes:

Dave I'm curious as to why the combination of CGI::Application and
Dave HTML::Template hasn't taken off ... CGI::Application seems to allow a
Dave software developer to create an entire CGI app that can be stored and
Dave distributed as a module on CPAN, but only a couple such app/modules
Dave have been so added.

Maybe because it competes with OpenInteract, which is far more established.

-- 
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: Templating system opinions (CGI::Application in connection with either HTML::Template or Template::Toolkit)

2003-07-23 Thread Eric
Hi,

That was really interesting to look at. OpenInteract is really impressive. 
I guess there is always a cost to having a big
do it all type of system. That is what made me avoid Mason, it just blew my 
head off for complexity. Now it is true, I am looking for a bit more than 
what CGI::Application offers out of the box, but it may well end up being 
worthwhile to just extend rather than convert. I really appreciate the 
simple philosophy that HTML::Template and CGI::Application follow.

One question, how do you judge that OpenInteract is more established? Is 
does look like it is actively developed, but I never heard of it before, 
and I couldn't find much indication of how popular it is.



Thanks,

Eric

At 09:23 AM 2003-07-23, Randal L. Schwartz wrote:
 Dave == Dave Baker [EMAIL PROTECTED] writes:

Dave I'm curious as to why the combination of CGI::Application and
Dave HTML::Template hasn't taken off ... CGI::Application seems to allow a
Dave software developer to create an entire CGI app that can be stored and
Dave distributed as a module on CPAN, but only a couple such app/modules
Dave have been so added.
Maybe because it competes with OpenInteract, which is far more established.

--
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!
Lead Programmer
D.M. Contact Management
250.383.0836


Re: Templating system opinions (CGI::Application in connection witheither HTML::Template or Template::Toolkit)

2003-07-23 Thread Dave Rolsky
On Wed, 23 Jul 2003, Eric wrote:

 do it all type of system. That is what made me avoid Mason, it just blew my
 head off for complexity. Now it is true, I am looking for a bit more than

There's a fine book about it.

www.masonbook.com

Just an unbiased opinion ;)


-dave

/*===
House Absolute Consulting
www.houseabsolute.com
===*/


Re: Templating system opinions (CGI::Application in connection witheither HTML::Template or Template::Toolkit)

2003-07-23 Thread Chris Winters
Eric wrote:
That was really interesting to look at. OpenInteract is really 
impressive. I guess there is always a cost to having a big
do it all type of system. That is what made me avoid Mason, it just blew 
my head off for complexity. Now it is true, I am looking for a bit more 
than what CGI::Application offers out of the box, but it may well end up 
being worthwhile to just extend rather than convert. I really appreciate 
the simple philosophy that HTML::Template and CGI::Application follow.
OpenInteract definitely does more for you. But it also has (IMO) a 
fairly sophisticated way to distribute standalone applications -- 
including data structures, initial data, security settings, 
templates and (oh yeah) the actual perl code -- and plug them into 
another OI server.

OI 1.x ties you to the Template Toolkit, but 2.x (a big improvement 
now in beta) allows you to use whatever templating engine you like. 
You lose a ton of functionality, but HTML::Template folks seem to 
like it that way :-)

One question, how do you judge that OpenInteract is more established? Is 
does look like it is actively developed, but I never heard of it before, 
and I couldn't find much indication of how popular it is.
Randal's 'far more established' may be premature :-) Taking a strict 
time perspective: from Backpan it looks like CGI::Application was 
first released to CPAN in July 2000, while OI was first released in 
February 2001. (I'd thought it was October 2000, but it's funny the 
tricks your memory will play.)

As to other definitions of 'established' I haven't followed 
CGI::Application development to say either way. There have been more 
articles published on CGI::Application and it seems to have a larger 
userbase, partly because it's easier to get started with and wrap 
your head around everything it does. Classic trade-off :-)

Good luck!

Chris

--
Chris Winters ([EMAIL PROTECTED])
Building enterprise-capable snack solutions since 1988.


Re: Templating system opinions (CGI::Application in connection witheither HTML::Template or Template::Toolkit)

2003-07-23 Thread Chris Winters
Dave Rolsky wrote:
There's a fine book about it.

www.masonbook.com

Just an unbiased opinion ;)
Hey, I'd be happy to write a book about OpenInteract ;-)

Chris

--
Chris Winters ([EMAIL PROTECTED])
Building enterprise-capable snack solutions since 1988.


Debugging mod_perl with ptkdb

2003-07-23 Thread John Williams
I followed the advice on the mod_perl guide to try setting up remote
debugging of mod_perl with ptkdb, and I've been trying to solve the
remaining problems.

http://perl.apache.org/docs/1.0/guide/debug.html#ptkdb_and_Interactive_mod_perl_Debugging

I now have ptkdb working in Apache multi-server mode without -X (-X works
too), popping up a new ptkdb window on the remote host for each request.

This required patches to both Apache::DB and Devel::ptkdb.

Devel::ptkdb-1.1086 had a line which prevented the window from appearing
unless the filename matched $0. Since $0 is httpd under Apache, it never
matched.  I also added some code to emit a warning and continue running
without the window if the connection to the X server is refused.

For Apache::DB I added a new method handler for ptkdb, since the handler
turned out almost completely different from the one for the default
debugger.

Patches attached for Devel::ptkdb-1.1086 and Apache::DB-0.06.

~ John Williams
--- ptkdb.pm2003/07/23 17:05:20 1.1
+++ ptkdb.pm2003/07/23 17:51:09
@@ -1105,8 +1105,21 @@
 
   # Main Window
   
-
+eval {
   $self-{main_window} = MainWindow-new() ;
+};
+if ($@) {
+  my $err = $@;
+  my $r = eval { Apache-request };  # check if running under mod_perl
+  undef $@;
+  if ($r  $err =~ m/Xlib: connection .*? refused|Xlib: Client is not 
authorized|couldn't connect to display/) {
+   $DB::connection_refused = 1;
+   $self-{main_window} = undef;
+   warn($err);  # log the problem
+return;
+  } 
+  die $err;
+}
   $self-{main_window}-geometry($ENV{'PTKDB_GEOMETRY'} || 800x600) ;
 
   $self-setup_options() ; # must be done after MainWindow and before other frames 
are setup
@@ -1237,8 +1250,9 @@
 
   $DB::window-{'event'} = 'run' ;
   $self-{current_file} =  ; # force a file reset
-  $self-{'main_window'}-destroy ;
+  $self-{'main_window'}-destroy if $self-{'main_window'};
   $self-{'main_window'} = undef ;
+  $DB::connection_refused = undef;  # allow another try
 }
 
 sub setup_menu_bar {
@@ -4048,7 +4062,12 @@
 
 $^W = $saveW ;
unless( $DB::ptkdb::isInitialized ) {
- return if( $filename ne $0 ) ; # not in our target file
+ if ( $filename ne $0 ) { # not in our target file
+# check if running under mod_perl
+   my $r = eval { Apache-request };
+   undef $@;
+   return unless $r;
+ }
  DB::Initialize($filename) ;
}
 
@@ -4063,6 +4082,11 @@
  return ;
}
 
+   if ( $DB::connection_refused ) {  # X to remote host failed
+ $@ = $DB::save_err ;
+ return ;
+   }
+
  $DB::window-setup_main_window() unless $DB::window-{'main_window'} ;
 
  $DB::window-EnterActions() ; 
--- DB.pm   2003/07/23 16:59:07 1.1
+++ DB.pm   2003/07/23 17:03:29
@@ -39,6 +39,34 @@
 return 0;
 }
 
+
+sub ptkdb ($$) {
+my ($class,$r) = @_;
+
+init();
+
+# need to have a list of authorized remote hosts
+$ENV{DISPLAY} = $r-get_remote_host.':0.0';
+$DB::connection_refused = 0;  # try try again
+require 'Devel/ptkdb.pm';
+$DB::single = 1;
+# bug workaround?  Pressing Return button at toplevel makes ptkdb hang.
+$DB::subroutine_depth = 0 ;
+$DB::step_over_depth = -1 ;
+
+if (ref $r) {
+$SIG{INT} = \DB::dbint_handler;
+$r-register_cleanup(sub {
+$SIG{INT} = \DB::ApacheSIGINT();
+$DB::single = 0; # do not debug during withdraw
+$DB::window-close_ptkdb_window;
+});
+}
+
+return 0;
+}
+
+
 1;
 __END__
 
@@ -93,6 +121,18 @@
   SetHandler perl-script
   PerlHandler My::handler
  /Location
+
+=item ptkdb
+
+This is an Apache Method Handler which will start the ptkdb graphical debugger.
+Devel::ptkdb and Tk modules are expected to be installed.
+Example configuration:
+
+ Location /my-handler
+  PerlFixupHandler Apache::DB-ptkdb
+  SetHandler perl-script
+  PerlHandler My::handler
+ /Location
 
 =back
 


RE: mod_perl installation problem...

2003-07-23 Thread Jim Morrison [Mailing-Lists]

 
 Was a 'make' of libapreq successful, before the 'make test'? 
 And also, does the user you're running the tests as have the 
 proper permissions to be running tests within /usr/src/libapreq-1.2/?
 
 

Make appeared to be successful yes (afaik)... I did wonder about the
permissions thing but I tried as root to no avail..

Kidnest,
Jim



Re: AW: Apache:AuthenNTLM 2.01 with modperl 1.26

2003-07-23 Thread Shannon Eric Peevey
Tresp, Wilfried wrote:

Hi,

works now, thanks, next I'll try it with Apache2. AuthenNTLM was the only reason I have not tried it yet :)

Regards,	Wilfried

-Ursprüngliche Nachricht-
Von: Shannon Eric Peevey [mailto:[EMAIL PROTECTED]
Gesendet: Mittwoch, 23. Juli 2003 20:50
An: Tresp, Wilfried
Betreff: Re: Apache:AuthenNTLM 2.01 with modperl 1.26
Tresp, Wilfried wrote:

 

Hello Shannon Eric,

as far as I understood the changes between Apache::AuthenNTLM 2.01 and the
older 0.23 from Gerald Richter your enhancements should make it possible to
use the modul with modperl 1.26 and modperl 2 also, is this right?
I tried to install your version with Apache 1.26, mod_perl 1.27 running
Solaris 8 with Perl 5.6.1 but every time a page is called which requires
authentication I get an internal Server Error and the error_log shows the
following entry:
[Wed Jul 23 20:12:36 2003] [error] Can't locate object method log via
package Apache (perhaps you forgot to load Apac
he?) at
/usr/local/lib/perl5/site_perl/5.6.1/sun4-solaris/Apache/AuthenNTLM.pm line
598.
Do you know what happens?  

Regards,

Wilfried Tresp

   

Hi!

Try this file.  Just replace your AuthenNTLM.pm file that the install 
placed in your perl modules directory with this one.  It seems that 
there was a problem here:

if ($type == 1)
   {
597 --# my $log = $r-log;
   my $nonce = $self - get_nonce ($r) ;
in the first handler subroutine at line 597...  I have commented out the 
line, and it should work now.

Thanks for the heads-up :)

speeves
cws
 

Great!!!  I will upload a fixed version to CPAN, and it should be 
available after a few hours.

speeves
cws



Application design patterns

2003-07-23 Thread Aleksandr Guidrevitch
Hi, All

Are there some common application design patterns using  mod_perl + TT2 
? Any links would be greatly appreciated

Sincerely
Alex


Sharing objects

2003-07-23 Thread Aleksandr Guidrevitch
Hi, All again :)

That's not the last my post :)
What are common patterns of sharing data beetween apache processes,
for example I'd like to share some indexes. Also, I'd like to avoid
complex sycronyzation process (currently IPC::Sahreable seem to be the
right thing)
Sincerely
Alex



Re: Application design patterns

2003-07-23 Thread Perrin Harkins
On Wed, 2003-07-23 at 18:18, Aleksandr Guidrevitch wrote:
 Are there some common application design patterns using  mod_perl + TT2 
 ? Any links would be greatly appreciated

There are tutorials on the Template Toolkit site, a recent perl.com
article about TT and Class::DBI, and my article:
http://perl.apache.org/docs/tutorials/apps/scale_etoys/etoys.html

- Perrin


Re: Sharing objects

2003-07-23 Thread Perrin Harkins
On Wed, 2003-07-23 at 18:21, Aleksandr Guidrevitch wrote:
 What are common patterns of sharing data beetween apache processes,
 for example I'd like to share some indexes. Also, I'd like to avoid
 complex sycronyzation process (currently IPC::Sahreable seem to be the
 right thing)

No, IPC::Shareable is slow.  You are better off with one of these:
MLDBM::Sync
Cache::Mmap
BerkeleyDB (with native locking)
Cache::FileCache
IPC::MM

- Perrin


Re: Sharing objects

2003-07-23 Thread Aleksandr Guidrevitch
Hello Perrin

No, IPC::Shareable is slow.  You are better off with one of these:
MLDBM::Sync
Cache::Mmap
BerkeleyDB (with native locking)
Cache::FileCache
Actually I think to use Cache::FileCache as the storage backend.
But I need to have Cache keys to be sorted by various criteria.
I strive to avoid re-reading Cache::* keys and sort them each time,
but to share somehow sorted lists beetween apache processes (as they 
could be huge). However, having an extra key like keys_sorted_by_* in 
Cache::FileCache will probably solve the problem.

Thanks

IPC::MM
Alex



Re: AW: AW: Apache:AuthenNTLM 2.01 with modperl 1.26

2003-07-23 Thread Shannon Eric Peevey
Tresp, Wilfried wrote:

Hi Shannon Eric,

fine it's already there. I try to run the module with Apache 2.0.47 but it
didn't work here. There seems to be problems with my @INC variable but I can
not figure out how to fix it. When I try to start the daemon I see only the
following error message:
# /usr/local/apache2/bin/apachectl start
[Thu Jul 24 01:27:30 2003] [error] Can't locate Apache/AuthenSmb.pm in @INC
(@INC contains: /usr/local/lib/perl5/site_perl/5.6.1/sun4-solaris/Apache2
./Apache2 /usr/local/lib/perl5/5.6.1/sun4-solaris /usr/local/lib/perl5/5.6.1
/usr/local/lib/perl5/site_perl/5.6.1/sun4-solaris
/usr/local/lib/perl5/site_perl/5.6.1 /usr/local/lib/perl5/site_perl .
/usr/local/apache2/ /usr/local/apache2/lib/perl) at (eval 4) line 3.
[Thu Jul 24 01:27:30 2003] [error] Can't load Perl module Apache::AuthenSmb
for server netweb.de.kworld.kpmg.com:8000, exiting...
The module AuthenSmb.pm doesn't exist but I can not locate the problem. Do
you have any hints for me?
 

Hi!

Looks to me like you are trying to load Michael Parker's 
Apache::AuthenSmb module...  I don't believe that that mod is ported to 
mp2.   The Authen::Smb module is included with the Apache::AuthenNTLM 
module, so should have been installed when you ran the script.  If you 
change the module that you are trying to load Apache::AuthenNTLM, does 
that help?

speeves
cws
PS  Can you reply to the modperl mailing list?  Thanks :)

 

 




Re: AW: AW: Apache:AuthenNTLM 2.01 with modperl 1.26

2003-07-23 Thread Shannon Eric Peevey
Tresp, Wilfried wrote:

Hi Shannon Eric,

forget my last mail. It is simply to late. After changing PerlModule to
PerlResponseHandler in httpd.conf everything works now. Great!
Only little problem is that I see many error_log entries like the following:

[12163] the $self-{smbhandle} is 903424

ntlmdebug is set to 0

Maybe the line 198 of AuthenNTLM.pm is the reason for this:

   print STDERR [$$] the \$self-{smbhandle} is $self-{smbhandle}\n;

Regards,	Wilfried

 

Hi!

Glad that it's working now :)  The entries in the error log are just my 
debugging crap that I was using when I was porting.  I will clean up the 
code a little more and upload a new version tomorrow.

Thanks for all of your input!!!
speeves
cws



RE: must I use mod-perl

2003-07-23 Thread Denis
that's the point - there is plenty of documentation. When you encounter some
problem you gotta search the docs until you find solution. Docs are pretty
long so it takes time.
Btw from what I read here it seems that it's just me who had problems with
installing mod_perl.
Oskar

-Original Message-
From: Perrin Harkins [mailto:[EMAIL PROTECTED]
Sent: Monday, July 14, 2003 12:41 PM
To: Oskar
Cc: [EMAIL PROTECTED]
Subject: Re: must I use mod-perl


On Sun, 2003-07-13 at 16:53, Oskar wrote:
 Install it if you have a lot of time. It took me week to config it and
month
 for rewritting scripts.

Oskar,

Is there something specific that would have helped you get going
faster?  Did you find the documentation you needed?

- Perrin




Re: Sharing objects

2003-07-23 Thread Perrin Harkins
Aleksandr Guidrevitch wrote:
Actually I think to use Cache::FileCache as the storage backend.
But I need to have Cache keys to be sorted by various criteria.
I strive to avoid re-reading Cache::* keys and sort them each time,
but to share somehow sorted lists beetween apache processes (as they 
could be huge). However, having an extra key like keys_sorted_by_* in 
Cache::FileCache will probably solve the problem.
It could, but if that's a large list it could be slow.  Cache::FileCache 
will serialize each cache value with Storable, and in this case the 
value will be one big array.

A different approach would be store a separate BerkeleyDB index as a 
BTree with a custom sorting function, or share your array as a 
BerkeleyDB recno database (serial records accessed like an array).

- Perrin



Re: [mp2] beta of Apache-AuthenNTLM uploaded

2003-07-23 Thread Brett Hales
On Wed, 2003-07-23 at 04:51, Shannon Eric Peevey wrote:
 The uploaded file
 
 Apache-AuthenNTLM-2.01.tar.gz
 
 has entered CPAN as
 
   file: $CPAN/authors/id/S/SP/SPEEVES/Apache-AuthenNTLM-2.01.tar.gz
   size: 50644 bytes
md5: f175a98ea668e81df9cc8d6db629facf
 
 The purpose of this module is to perform a user authentication via Mircosoft's
 NTLM protocol.  (This module also implements Basic Authentication for all other 
 browsers ).
 
 You may download this beta version of Apache-AuthenNTLM from CPAN.  It is not a 
 replacement for the existing version on CPAN, but instead will work with either 
 version of modperl.  Please, feel free to download it and send me any bug reports... 
 :)
 

I have installed the 2.01 version, I did find a bug in
Apache-AuthenNTLM-0.23 and it still exists in this version. 

The bug was that if a person had a : (colon) in their password it did
not authenticate them.

This bug still seems to exist.

Cheers.

Brett



-- 
Brett Hales [EMAIL PROTECTED]