Re: [OT] Content- & user management, publishing

2000-08-28 Thread Matt Sergeant

On Mon, 28 Aug 2000, Perrin Harkins wrote:

> On Mon, 28 Aug 2000, Matt Sergeant wrote:
> > Just to correct things here, Mediasurface is only Java in the client
> > editing front end bit
> 
> They actually told me they were using Java servlets for various things,
> and seem to be downplaying the perl aspects of the server.  Could be just
> marketing though.

Bizarre - maybe things have changed that much since 2.2x (they appear to
be at version 3 now).

-- 


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: HTML Template Comparison Sheet ETA

2000-08-28 Thread Nelson Correa de Toledo Ferraz

Hi Drew,

> I'm the one who volunteered, and then I went on vacation for a 2 weeks.
> I have decided I will have a bare minimum draft done within a week. And
> then, as Matt suggested, people can just send
> suggestions/corrections/additions and the document will grow. When I
> have a draft, I'll post it to the list.

I'm new to this list, and I'd like to make a small contribution to the
HTML Template Comparison Sheet.

I've been using Text::Template for some time now, and I really enjoy using 
it because 1) it's fast, 2) it's small, just 28kb and 3) it uses Perl as
scripting language. 

>From the author's words:

 "When people make a template module like this one, they almost always
  start by inventing a special syntax for substitutions. For example, they
  build it so that a string like %%VAR%% is replaced with the value of
  $VAR. Then they realize the need extra formatting, so they put in some
  special syntax for formatting. Then they need a loop, so they invent a
  loop syntax. Pretty soon they have a new little template language."

 "This approach has two problems: First, their little language is
  crippled. If you need to do something the author hasn't thought of, you
  lose. Second: Who wants to learn another language? You already know
  Perl, so why not use it?"

That's a great concept. Anyway, I have tweaked the code a little, now
allows you to to make expressions like this one:



 Name:  
 Job:  
 



Notice the  construction, It's the only "magic" that you 
have to know. If you already know Perl, the code is much cleaner than the 
HTML::Template counterpart, which would be something like this:

   
 Name:  
 Job:  

   


Futhermore, with Text::Template you can access methods and modules
directly from the templates. For instance:

   

   list(); ?>


The only problem with Text::Template is that it fails on taint checks. 
However, because this module is very flexible, I believe that it's easy to
fix it by "untainting" the template before parsing it! 

If anyone is curious about the Text::Template module, take a look at the
author's homepage at: http://www.plover.com/~mjd/perl/

Best wishes,

Nelson

__
Nelson Ferraz   Insite - Solucoes Internet
e-mail: [EMAIL PROTECTED]   http://www.insite.com.br/





Re: HTML Template Comparison Sheet ETA

2000-08-28 Thread Drew Taylor

Matt Sergeant wrote:
>
> If nobody is working on it, I suggest just getting 1 or 2 paragraph
> synopsis from template authors about thier product. Just compile those
> together and then let it evolve as people see other people's paragraphs
> and think "Hey I should have mentioned X too...".

I would happily accept the brief synopsis Matt mentioned above. If I get
a few of them, I will combine and post them along with a brief document
overview. It would be better than what we have right now. :-)

If you do send me a synopsis, please include the major features and try
to keep it to a few paragraphs. But I won't exclude anything if it
happens to be long.

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



Re: HTML Template Comparison Sheet ETA

2000-08-28 Thread Drew Taylor

Matt Sergeant wrote:
> 
> On Tue, 15 Aug 2000, Gunther Birznieks wrote:
> 
> > Is there an ETA on when this will be out?
> >
> > I know everyone is busy, but I just figured I would ask. There have been
> > hundreds of template messages generated in the last weeks on this topic,
> > and then it seems to have gone a bit quiet (as usual).
> 
> If nobody is working on it, I suggest just getting 1 or 2 paragraph
> synopsis from template authors about thier product. Just compile those
> together and then let it evolve as people see other people's paragraphs
> and think "Hey I should have mentioned X too...".

I'm finally getting through the huge volume of list emails after
vacation, so I apologize for the delay in this response.

I'm the one who volunteered, and then I went on vacation for a 2 weeks.
I have decided I will have a bare minimum draft done within a week. And
then, as Matt suggested, people can just send
suggestions/corrections/additions and the document will grow. When I
have a draft, I'll post it to the list.

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



Re: Apache::Session and performance question

2000-08-28 Thread Chris Brooks

Perrin,

Thanks for the replies.  Adding an index made a significant improvement on
performance -- it's still three or four times slower than without
Apache::Session, but much faster than without the index.

Thanks again,
Chris

Perrin Harkins wrote:

> On Mon, 28 Aug 2000, Chris Brooks wrote:
> > I went back through the documentation on Apache::Session,
> > Apache::Session::DBIStore, and Apache::DBI, and I haven't found a
> > problem in the way we have implemented this.  Does anyone else have
> > suggestions, or has anyone else experienced a similar performance hit?
>
> You're not doing anything wrong.  As I said before, going to a databse on
> every request is expensive.  It will definitely crush your performance
> when compared to something really lightweight like serving static files
> with no db access.  You could try using one of the other session stores
> like FileStore to see if it's any faster for you, or you could try running
> MySQL on the same machine as the web server, but if you have significant
> traffic you will eventually need a separate db server machine and a
> cluster of web servers.
>
> The only thing I could suggest for improving the performance of your setup
> is to make sure you have MySQL properly tuned, with an appropriate index
> on this table.
>
> - Perrin

--

Chris Brooks
Director of Technology
CareScout.com
phone: (781) 431-7033 x 342





Re: PerlAuthenHandler invalid command

2000-08-28 Thread Stas Bekman

On Mon, 28 Aug 2000, Frank Plunkett wrote:

> Geoff
>I did build with perl Makefile.PL PERL_AUTHEN=1
> 
>That was the first thing I thought also.

How about 'make install' in apache/src directory?

> 
> Frank
> 
> 
> -Original Message-
> From: Geoffrey Young <[EMAIL PROTECTED]>
> To: 'Frank Plunkett' <[EMAIL PROTECTED]>; [EMAIL PROTECTED]
> <[EMAIL PROTECTED]>
> Date: Monday, August 28, 2000 3:40 PM
> Subject: RE: PerlAuthenHandler invalid command
> 
> 
> >build mod_perl with
> >
> >perl Makefile.PL EVERTHING=1
> >or PERL_AUTHEN=1
> >
> >HTH
> >
> >--Geoff
> >
> >> -Original Message-
> >> From: Frank Plunkett [mailto:[EMAIL PROTECTED]]
> >> Sent: Monday, August 28, 2000 3:31 PM
> >> To: [EMAIL PROTECTED]
> >> Subject: PerlAuthenHandler invalid command
> >>
> >>
> >> Hi modperites,
> >>
> >>I keep receiving the following error message when
> >> starting httpd:
> >>
> >> Syntax error on line 99 of /usr/local/apache/conf/httpd.conf:
> >> Invalid command 'PerlAuthenHandler', perhaps mis-spelled or
> >> defined by a
> >> module not included in the server configuration
> >>
> >> 
> >> my httpd.conf looks like this:
> >> 
> >> AuthName Test
> >> AuthType Basic
> >> SetHandler perl-script
> >> PerlAuthenHandler Apache::AuthAny
> >> require valid-user
> >> 
> >>
> >>
> >> #
> >> I did a perl Makefile.pl  everything=1
> >>
> >> but still no luck.
> >>
> >>  perl Makefile.PL
> >> Reading Makefile.PL args from ../makepl_args.mod_perl
> >> Configure mod_perl with /home/apache_1.3.12/src ? [y]
> >> Shall I build httpd in /home/apache_1.3.12/src for you? [y]
> >> Appending mod_perl to src/Configuration
> >> Using config file: /usr/local/mod_perl-1.24/src/Configuration
> >> Creating Makefile
> >>  + configured for Solaris 270 platform
> >>  + setting C compiler to cc
> >>  + setting C pre-processor to cc -E
> >>  + checking for system header files
> >>  + adding selected modules
> >> o perl_module uses ConfigStart/End
> >>   + mod_perl build type: OBJ
> >>   + setting up mod_perl build environment
> >>   + id: mod_perl/1.24
> >>   + id: Perl/v5.6.0 (solaris) [perl]
> >>   + adjusting Apache build environment
> >>  + checking sizeof various data types
> >>  + doing sanity check on compiler and options
> >> Creating Makefile in support
> >> Creating Makefile in os/unix
> >> Creating Makefile in ap
> >> Creating Makefile in main
> >> Creating Makefile in lib/expat-lite
> >> Creating Makefile in modules/standard
> >> Creating Makefile in modules/perl
> >> EXTRA_CFLAGS: -DSOLARIS2=270 -DMOD_PERL -DUSE_EXPAT
> >> -I$(SRCDIR)/lib/expat-li
> >> te
> >> PerlDispatchHandler.enabled
> >> PerlChildInitHandlerenabled
> >> PerlChildExitHandlerenabled
> >> PerlPostReadRequestHandler..enabled
> >> PerlTransHandlerenabled
> >> PerlHeaderParserHandler.enabled
> >> PerlAccessHandler...enabled
> >> PerlAuthenHandler...enabled
> >> PerlAuthzHandlerenabled
> >> PerlTypeHandler.enabled
> >> PerlFixupHandlerenabled
> >> PerlHandler.enabled
> >> PerlLogHandler..enabled
> >> PerlInitHandler.enabled
> >> PerlCleanupHandler..enabled
> >> PerlRestartHandler..enabled
> >> PerlStackedHandlers.enabled
> >> PerlMethodHandlers..enabled
> >> PerlDirectiveHandlers...enabled
> >> PerlTableApienabled
> >> PerlLogApi..enabled
> >> PerlUriApi..enabled
> >> PerlUtilApi.enabled
> >> PerlFileApi.enabled
> >> PerlConnectionApi...enabled
> >> PerlServerApi...enabled
> >> PerlSectionsenabled
> >> PerlSSI.enabled
> >> Will run tests as User: 'nobody' Group: 'other'
> >> Checking CGI.pm VERSION..ok
> >> Checking for LWP::UserAgent..ok
> >> Checking for HTML::HeadParserok
> >> Writing Makefile for Apache
> >> Writing Makefile for Apache::Connection
> >> Writing Makefile for Apache::Constants
> >> Writing Makefile for Apache::File
> >> Writing Makefile for Apache::Leak
> >> Writing Makefile for Apache::Log
> >> Writing Makefile for Apache::ModuleConfig
> >> Writing Makefile for Apache::PerlRunXS
> >> Writing Makefile for Apache::Server
> >> Writing Makefile for Apache::Symbol
> >> Writing Makefile for Apache::Table
> >> Writing Makefile for Apache::URI
> >> Writing Makefile for Apache::Util
> >> Writing Makefile for mod_perl
> >> salcd6# make
> >> (cd /home/apache_1.3.12/src &&  make CC="cc";)
> >> ===> os/unix
> >>
> >>
> >>
> >
> 
> 



_
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 

Re: Apache::Request growing httpd

2000-08-28 Thread Jim Winstead

On Aug 28, Dave Thomas wrote:
> I applied the patch from the archives but the httpd child process is
> still
> growing by the size of the file. Is that normal, or is there an update
> to the patch that Jim Winstead placed out there
> 
> The system that I am running on is:
> SunOS 5.6 on a  sparc Ultra-1
> 
> Thanks in advance for any help that can be provided.

i haven't tested on solaris, but attached is the latest version of
our patch. this may or may not be identical to the most recent
version that was last posted here.

you might also want to triple-check that you're using the patched
version of libapreq. i know i've forgotten to "make install" or do
a restart after recompiling more times than i've got fingers to
count on. :)

there's also another patch to solve this problem. i haven't tested
it (and don't know if handles some of the problems that i'm sure
our patch does, like work around a bug in internet explorer on the
macintosh), but you might want to try that out, too.

(this patch is being used on production servers run by homepage.com
that power a whole bunch of quite busy personal-publishing sites,
and has been quite heavily exercised by our qa team. while it
avoids the memory-bloat problem, it also doesn't ever spin out of
control, which is what we found the 'stock' libapreq to do. we run
mostly freebsd in production, and some linux, so it has seen the
most testing on those.)

jim


diff -ruN libapreq-0.31/c/apache_request.c libapreq-0.31-new/c/apache_request.c
--- libapreq-0.31/c/apache_request.cFri Jul  2 18:00:17 1999
+++ libapreq-0.31-new/c/apache_request.cTue Jul 11 17:23:58 2000
@@ -293,7 +293,7 @@
 int rc = OK;
 
 if (r->method_number == M_POST) { 
-   const char *data, *type;
+   const char *data = NULL, *type;
 
type = ap_table_get(r->headers_in, "Content-Type");
 
@@ -374,7 +374,8 @@
 
 while (!multipart_buffer_eof(mbuff)) {
table *header = multipart_buffer_headers(mbuff);
-   const char *cd, *param=NULL, *filename=NULL, *buff;
+   const char *cd, *param=NULL, *filename=NULL;
+   char buff[FILLUNIT];
int blen;
 
if (!header) {
@@ -401,8 +402,8 @@
}
}
if (!filename) {
-   char *value = multipart_buffer_read_body(mbuff);
-   ap_table_add(req->parms, param, value);
+   char *value = multipart_buffer_read_body(mbuff);
+   ap_table_add(req->parms, param, value);
continue;
}
ap_table_add(req->parms, param, filename);
@@ -424,7 +425,7 @@
upload->filename = ap_pstrdup(req->r->pool, filename);
upload->name = ap_pstrdup(req->r->pool, param);
 
-   while ((buff = multipart_buffer_read(mbuff, 0, &blen))) {
+   while ((blen = multipart_buffer_read(mbuff, buff, sizeof(buff {
/* write the file */
upload->size += fwrite(buff, 1, blen, upload->fp);  
}
diff -ruN libapreq-0.31/c/multipart_buffer.c libapreq-0.31-new/c/multipart_buffer.c
--- libapreq-0.31/c/multipart_buffer.c  Fri Apr 30 23:44:28 1999
+++ libapreq-0.31-new/c/multipart_buffer.c  Tue Jul 11 17:38:11 2000
@@ -57,271 +57,280 @@
 
 #include "multipart_buffer.h"
 
-#define FILLUNIT (1024 * 5)
-#ifndef CRLF
-#define CRLF "\015\012"
-#endif
-#define CRLF_CRLF "\015\012\015\012"
+/*** internal functions */
 
-static char *my_join(pool *p, char *one, int lenone, char *two, int lentwo)
+/*
+  search for a string in a fixed-length byte string.
+  if partial is true, partial matches are allowed at the end of the buffer.
+  returns NULL if not found, or a pointer to the start of the first match.
+*/
+void* my_memstr(void* haystack, int haystacklen, const char* needle,
+   int partial)
 {
-char *res; 
-int len = lenone+lentwo;
-res = (char *)ap_palloc(p, len + 1); 
-memcpy(res, one, lenone);  
-memcpy(res+lenone, two, lentwo);
-return res;
-}
+  int needlen = strlen(needle);
+  int len = haystacklen;
+  void *ptr = haystack;
+  
+  /* iterate through first character matches */
+  while( (ptr = memchr(ptr, needle[0], len)) )
+{
+  /* calculate length after match */
+  len = haystacklen - (ptr - haystack);
 
-static char * 
-my_ninstr(register char *big, register char *bigend, char *little, char *lend) 
-{ 
-register char *s, *x; 
-register int first = *little; 
-register char *littleend = lend; 
- 
-if (!first && little >= littleend) {
-return big; 
-}
-if (bigend - big < littleend - little) {
-return NULL; 
+  /* done if matches up to capacity of buffer */
+  if(memcmp(needle, ptr, needlen < len ? needlen : len) == 0 &&
+(partial || len >= needlen))
+   break;
+
+  /* next character */
+  ptr++; len--;
 }
-bigend -= littleend - little++; 
-while (big <= bigend) { 
-   if (*big++ 

Re: Apache::Session and performance question

2000-08-28 Thread Perrin Harkins

On Mon, 28 Aug 2000, Chris Brooks wrote:
> I went back through the documentation on Apache::Session,
> Apache::Session::DBIStore, and Apache::DBI, and I haven't found a
> problem in the way we have implemented this.  Does anyone else have
> suggestions, or has anyone else experienced a similar performance hit?

You're not doing anything wrong.  As I said before, going to a databse on
every request is expensive.  It will definitely crush your performance
when compared to something really lightweight like serving static files
with no db access.  You could try using one of the other session stores
like FileStore to see if it's any faster for you, or you could try running
MySQL on the same machine as the web server, but if you have significant
traffic you will eventually need a separate db server machine and a
cluster of web servers.

The only thing I could suggest for improving the performance of your setup
is to make sure you have MySQL properly tuned, with an appropriate index
on this table.

- Perrin




Re: [OT] Content- & user management, publishing

2000-08-28 Thread Perrin Harkins

On Mon, 28 Aug 2000, Matt Sergeant wrote:
> Just to correct things here, Mediasurface is only Java in the client
> editing front end bit

They actually told me they were using Java servlets for various things,
and seem to be downplaying the perl aspects of the server.  Could be just
marketing though.

- Perrin




Apache::Request growing httpd

2000-08-28 Thread Dave Thomas

I applied the patch from the archives but the httpd child process is
still
growing by the size of the file. Is that normal, or is there an update
to the patch that Jim Winstead placed out there

The system that I am running on is:
SunOS 5.6 on a  sparc Ultra-1

Thanks in advance for any help that can be provided.




RE: PerlAuthenHandler invalid command

2000-08-28 Thread Stas Bekman

On Mon, 28 Aug 2000, Geoffrey Young wrote:

> build mod_perl with 
> 
> perl Makefile.PL EVERTHING=1 
> or PERL_AUTHEN=1

EVERYTHING=1 of course :)

I don't think MakeMaker uses Soundex module yet :)

> 
> HTH
> 
> --Geoff
> 
> > -Original Message-
> > From: Frank Plunkett [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, August 28, 2000 3:31 PM
> > To: [EMAIL PROTECTED]
> > Subject: PerlAuthenHandler invalid command
> > 
> > 
> > Hi modperites,
> > 
> >I keep receiving the following error message when 
> > starting httpd:
> > 
> > Syntax error on line 99 of /usr/local/apache/conf/httpd.conf:
> > Invalid command 'PerlAuthenHandler', perhaps mis-spelled or 
> > defined by a
> > module not included in the server configuration
> > 
> > 
> > my httpd.conf looks like this:
> > 
> > AuthName Test
> > AuthType Basic
> > SetHandler perl-script
> > PerlAuthenHandler Apache::AuthAny
> > require valid-user
> > 
> > 
> > 
> > #
> > I did a perl Makefile.pl  everything=1
> > 
> > but still no luck.
> > 
> >  perl Makefile.PL
> > Reading Makefile.PL args from ../makepl_args.mod_perl
> > Configure mod_perl with /home/apache_1.3.12/src ? [y]
> > Shall I build httpd in /home/apache_1.3.12/src for you? [y]
> > Appending mod_perl to src/Configuration
> > Using config file: /usr/local/mod_perl-1.24/src/Configuration
> > Creating Makefile
> >  + configured for Solaris 270 platform
> >  + setting C compiler to cc
> >  + setting C pre-processor to cc -E
> >  + checking for system header files
> >  + adding selected modules
> > o perl_module uses ConfigStart/End
> >   + mod_perl build type: OBJ
> >   + setting up mod_perl build environment
> >   + id: mod_perl/1.24
> >   + id: Perl/v5.6.0 (solaris) [perl]
> >   + adjusting Apache build environment
> >  + checking sizeof various data types
> >  + doing sanity check on compiler and options
> > Creating Makefile in support
> > Creating Makefile in os/unix
> > Creating Makefile in ap
> > Creating Makefile in main
> > Creating Makefile in lib/expat-lite
> > Creating Makefile in modules/standard
> > Creating Makefile in modules/perl
> > EXTRA_CFLAGS: -DSOLARIS2=270 -DMOD_PERL -DUSE_EXPAT 
> > -I$(SRCDIR)/lib/expat-li
> > te
> > PerlDispatchHandler.enabled
> > PerlChildInitHandlerenabled
> > PerlChildExitHandlerenabled
> > PerlPostReadRequestHandler..enabled
> > PerlTransHandlerenabled
> > PerlHeaderParserHandler.enabled
> > PerlAccessHandler...enabled
> > PerlAuthenHandler...enabled
> > PerlAuthzHandlerenabled
> > PerlTypeHandler.enabled
> > PerlFixupHandlerenabled
> > PerlHandler.enabled
> > PerlLogHandler..enabled
> > PerlInitHandler.enabled
> > PerlCleanupHandler..enabled
> > PerlRestartHandler..enabled
> > PerlStackedHandlers.enabled
> > PerlMethodHandlers..enabled
> > PerlDirectiveHandlers...enabled
> > PerlTableApienabled
> > PerlLogApi..enabled
> > PerlUriApi..enabled
> > PerlUtilApi.enabled
> > PerlFileApi.enabled
> > PerlConnectionApi...enabled
> > PerlServerApi...enabled
> > PerlSectionsenabled
> > PerlSSI.enabled
> > Will run tests as User: 'nobody' Group: 'other'
> > Checking CGI.pm VERSION..ok
> > Checking for LWP::UserAgent..ok
> > Checking for HTML::HeadParserok
> > Writing Makefile for Apache
> > Writing Makefile for Apache::Connection
> > Writing Makefile for Apache::Constants
> > Writing Makefile for Apache::File
> > Writing Makefile for Apache::Leak
> > Writing Makefile for Apache::Log
> > Writing Makefile for Apache::ModuleConfig
> > Writing Makefile for Apache::PerlRunXS
> > Writing Makefile for Apache::Server
> > Writing Makefile for Apache::Symbol
> > Writing Makefile for Apache::Table
> > Writing Makefile for Apache::URI
> > Writing Makefile for Apache::Util
> > Writing Makefile for mod_perl
> > salcd6# make
> > (cd /home/apache_1.3.12/src &&  make CC="cc";)
> > ===> os/unix
> > 
> > 
> > 
> 



_
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: PerlAuthenHandler invalid command

2000-08-28 Thread Frank Plunkett

Geoff
   I did build with perl Makefile.PL PERL_AUTHEN=1

   That was the first thing I thought also.

Frank


-Original Message-
From: Geoffrey Young <[EMAIL PROTECTED]>
To: 'Frank Plunkett' <[EMAIL PROTECTED]>; [EMAIL PROTECTED]
<[EMAIL PROTECTED]>
Date: Monday, August 28, 2000 3:40 PM
Subject: RE: PerlAuthenHandler invalid command


>build mod_perl with
>
>perl Makefile.PL EVERTHING=1
>or PERL_AUTHEN=1
>
>HTH
>
>--Geoff
>
>> -Original Message-
>> From: Frank Plunkett [mailto:[EMAIL PROTECTED]]
>> Sent: Monday, August 28, 2000 3:31 PM
>> To: [EMAIL PROTECTED]
>> Subject: PerlAuthenHandler invalid command
>>
>>
>> Hi modperites,
>>
>>I keep receiving the following error message when
>> starting httpd:
>>
>> Syntax error on line 99 of /usr/local/apache/conf/httpd.conf:
>> Invalid command 'PerlAuthenHandler', perhaps mis-spelled or
>> defined by a
>> module not included in the server configuration
>>
>> 
>> my httpd.conf looks like this:
>> 
>> AuthName Test
>> AuthType Basic
>> SetHandler perl-script
>> PerlAuthenHandler Apache::AuthAny
>> require valid-user
>> 
>>
>>
>> #
>> I did a perl Makefile.pl  everything=1
>>
>> but still no luck.
>>
>>  perl Makefile.PL
>> Reading Makefile.PL args from ../makepl_args.mod_perl
>> Configure mod_perl with /home/apache_1.3.12/src ? [y]
>> Shall I build httpd in /home/apache_1.3.12/src for you? [y]
>> Appending mod_perl to src/Configuration
>> Using config file: /usr/local/mod_perl-1.24/src/Configuration
>> Creating Makefile
>>  + configured for Solaris 270 platform
>>  + setting C compiler to cc
>>  + setting C pre-processor to cc -E
>>  + checking for system header files
>>  + adding selected modules
>> o perl_module uses ConfigStart/End
>>   + mod_perl build type: OBJ
>>   + setting up mod_perl build environment
>>   + id: mod_perl/1.24
>>   + id: Perl/v5.6.0 (solaris) [perl]
>>   + adjusting Apache build environment
>>  + checking sizeof various data types
>>  + doing sanity check on compiler and options
>> Creating Makefile in support
>> Creating Makefile in os/unix
>> Creating Makefile in ap
>> Creating Makefile in main
>> Creating Makefile in lib/expat-lite
>> Creating Makefile in modules/standard
>> Creating Makefile in modules/perl
>> EXTRA_CFLAGS: -DSOLARIS2=270 -DMOD_PERL -DUSE_EXPAT
>> -I$(SRCDIR)/lib/expat-li
>> te
>> PerlDispatchHandler.enabled
>> PerlChildInitHandlerenabled
>> PerlChildExitHandlerenabled
>> PerlPostReadRequestHandler..enabled
>> PerlTransHandlerenabled
>> PerlHeaderParserHandler.enabled
>> PerlAccessHandler...enabled
>> PerlAuthenHandler...enabled
>> PerlAuthzHandlerenabled
>> PerlTypeHandler.enabled
>> PerlFixupHandlerenabled
>> PerlHandler.enabled
>> PerlLogHandler..enabled
>> PerlInitHandler.enabled
>> PerlCleanupHandler..enabled
>> PerlRestartHandler..enabled
>> PerlStackedHandlers.enabled
>> PerlMethodHandlers..enabled
>> PerlDirectiveHandlers...enabled
>> PerlTableApienabled
>> PerlLogApi..enabled
>> PerlUriApi..enabled
>> PerlUtilApi.enabled
>> PerlFileApi.enabled
>> PerlConnectionApi...enabled
>> PerlServerApi...enabled
>> PerlSectionsenabled
>> PerlSSI.enabled
>> Will run tests as User: 'nobody' Group: 'other'
>> Checking CGI.pm VERSION..ok
>> Checking for LWP::UserAgent..ok
>> Checking for HTML::HeadParserok
>> Writing Makefile for Apache
>> Writing Makefile for Apache::Connection
>> Writing Makefile for Apache::Constants
>> Writing Makefile for Apache::File
>> Writing Makefile for Apache::Leak
>> Writing Makefile for Apache::Log
>> Writing Makefile for Apache::ModuleConfig
>> Writing Makefile for Apache::PerlRunXS
>> Writing Makefile for Apache::Server
>> Writing Makefile for Apache::Symbol
>> Writing Makefile for Apache::Table
>> Writing Makefile for Apache::URI
>> Writing Makefile for Apache::Util
>> Writing Makefile for mod_perl
>> salcd6# make
>> (cd /home/apache_1.3.12/src &&  make CC="cc";)
>> ===> os/unix
>>
>>
>>
>




Re: [OT] Content- & user management, publishing

2000-08-28 Thread Stas Bekman

On Mon, 28 Aug 2000, Christian Jaeger wrote:

> Hello!
> 
> I don't know a better place to discuss this, please tell me if you know
> (mailing lists preferred).
> 
> Here at ETH Zurich (swiss federal institute of technology) we want to build
> a daily online journal. One of the suggestions (mine) is to build it with
> perl. It should be based on XML, and the idea is to make also the authoring
> / workflow / content management / user management parts of the system web
> based. The content should be modular: pictures, text, audio etc. should all
> be independant content elements with their own history, preferably with
> possibility to spawn children from parent elements (i.e. original picture
> and derived lower resolution pictures). For publishing, several elements
> should be composed together. Another non-trivial part is a good user- and
> group or role based user management. Suggestion for Text markup is a (pod
> like) plain text markup which is converted to XML for storage, with the
> possible option to fully go with XML when editors are really ready. For
> publishing of the articles I'm planning to use in some way AxKit (source
> should be taken from database), and Mason for the administration parts.
> 
> Now maybe that's a bit a big project - I don't even really know yet. (My
> estimation for the whole project is 280 days of work - I'm hoping to solve
> this with 5 programmers until the end of november.. never done something
> that big :-().  Now what I would like to know:
> 
> - is anything like the mentioned things already existent? (mainly: database
> based content management system, and something of a sophisticated user
> management) (We would probably even pay for it if that matters)
> 
> - are things like these in the interest of other people, too? (Some weeks
> ago, in the discussion about templating, someone mentioned Zope and that
> perl should have something like that...) Would it be possible to get
> together and build such parts as open source? Preferably in a good modular
> fashion so more people can profit from it..

http://use.perl.org/article.pl?sid=00/05/27/2137208&mode=thread
ActiveState are going to put Perl support into Zope. 
http://www.zope.org/Wikis/zope-perl/FrontPage


> Maybe someone of you knows Vignette Storyserver? We have the option to get
> the source code of a Storyserver based online journal - although it
> requires modifications, and it's not XML based yet. So an idea is also to
> port this (TCL code) to perl, and reimplement required Storyserver
> functionality in perl. Any comments on that? (I don't know Storyserver yet)
> 
> The reason for not using Zope, OpenCMS or Enhydra, is a) I don't know them
> really :-(, b) some downsides are visible when looking at these solutions
> (i.e. Zope's user interface seems rather sub-optimal for use by
> journalists, especially as long as it's html based). (And we haven't
> succeeded to get OpenCMS to run until now)
> 
> Thanks for any comments!
> Christian Jaeger
> 
> *---*
>Web Office ETH Zuerich
>Christian Jaeger
>Corporate Communications
>ETH Zentrum
>CH-8092 Zurich
> 
>office: HG J46e-mail: [EMAIL PROTECTED]
>phone: +41 (0)1 63 2 5780   fax: +41 (0)1 63 2 3525
>home:  +41 (0)1 273 65 46
> *---*
> 
> 
> 



_
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: PerlAuthenHandler invalid command

2000-08-28 Thread Geoffrey Young

build mod_perl with 

perl Makefile.PL EVERTHING=1 
or PERL_AUTHEN=1

HTH

--Geoff

> -Original Message-
> From: Frank Plunkett [mailto:[EMAIL PROTECTED]]
> Sent: Monday, August 28, 2000 3:31 PM
> To: [EMAIL PROTECTED]
> Subject: PerlAuthenHandler invalid command
> 
> 
> Hi modperites,
> 
>I keep receiving the following error message when 
> starting httpd:
> 
> Syntax error on line 99 of /usr/local/apache/conf/httpd.conf:
> Invalid command 'PerlAuthenHandler', perhaps mis-spelled or 
> defined by a
> module not included in the server configuration
> 
> 
> my httpd.conf looks like this:
> 
> AuthName Test
> AuthType Basic
> SetHandler perl-script
> PerlAuthenHandler Apache::AuthAny
> require valid-user
> 
> 
> 
> #
> I did a perl Makefile.pl  everything=1
> 
> but still no luck.
> 
>  perl Makefile.PL
> Reading Makefile.PL args from ../makepl_args.mod_perl
> Configure mod_perl with /home/apache_1.3.12/src ? [y]
> Shall I build httpd in /home/apache_1.3.12/src for you? [y]
> Appending mod_perl to src/Configuration
> Using config file: /usr/local/mod_perl-1.24/src/Configuration
> Creating Makefile
>  + configured for Solaris 270 platform
>  + setting C compiler to cc
>  + setting C pre-processor to cc -E
>  + checking for system header files
>  + adding selected modules
> o perl_module uses ConfigStart/End
>   + mod_perl build type: OBJ
>   + setting up mod_perl build environment
>   + id: mod_perl/1.24
>   + id: Perl/v5.6.0 (solaris) [perl]
>   + adjusting Apache build environment
>  + checking sizeof various data types
>  + doing sanity check on compiler and options
> Creating Makefile in support
> Creating Makefile in os/unix
> Creating Makefile in ap
> Creating Makefile in main
> Creating Makefile in lib/expat-lite
> Creating Makefile in modules/standard
> Creating Makefile in modules/perl
> EXTRA_CFLAGS: -DSOLARIS2=270 -DMOD_PERL -DUSE_EXPAT 
> -I$(SRCDIR)/lib/expat-li
> te
> PerlDispatchHandler.enabled
> PerlChildInitHandlerenabled
> PerlChildExitHandlerenabled
> PerlPostReadRequestHandler..enabled
> PerlTransHandlerenabled
> PerlHeaderParserHandler.enabled
> PerlAccessHandler...enabled
> PerlAuthenHandler...enabled
> PerlAuthzHandlerenabled
> PerlTypeHandler.enabled
> PerlFixupHandlerenabled
> PerlHandler.enabled
> PerlLogHandler..enabled
> PerlInitHandler.enabled
> PerlCleanupHandler..enabled
> PerlRestartHandler..enabled
> PerlStackedHandlers.enabled
> PerlMethodHandlers..enabled
> PerlDirectiveHandlers...enabled
> PerlTableApienabled
> PerlLogApi..enabled
> PerlUriApi..enabled
> PerlUtilApi.enabled
> PerlFileApi.enabled
> PerlConnectionApi...enabled
> PerlServerApi...enabled
> PerlSectionsenabled
> PerlSSI.enabled
> Will run tests as User: 'nobody' Group: 'other'
> Checking CGI.pm VERSION..ok
> Checking for LWP::UserAgent..ok
> Checking for HTML::HeadParserok
> Writing Makefile for Apache
> Writing Makefile for Apache::Connection
> Writing Makefile for Apache::Constants
> Writing Makefile for Apache::File
> Writing Makefile for Apache::Leak
> Writing Makefile for Apache::Log
> Writing Makefile for Apache::ModuleConfig
> Writing Makefile for Apache::PerlRunXS
> Writing Makefile for Apache::Server
> Writing Makefile for Apache::Symbol
> Writing Makefile for Apache::Table
> Writing Makefile for Apache::URI
> Writing Makefile for Apache::Util
> Writing Makefile for mod_perl
> salcd6# make
> (cd /home/apache_1.3.12/src &&  make CC="cc";)
> ===> os/unix
> 
> 
> 



PerlAuthenHandler invalid command

2000-08-28 Thread Frank Plunkett

Hi modperites,

   I keep receiving the following error message when starting httpd:

Syntax error on line 99 of /usr/local/apache/conf/httpd.conf:
Invalid command 'PerlAuthenHandler', perhaps mis-spelled or defined by a
module not included in the server configuration


my httpd.conf looks like this:

AuthName Test
AuthType Basic
SetHandler perl-script
PerlAuthenHandler Apache::AuthAny
require valid-user



#
I did a perl Makefile.pl  everything=1

but still no luck.

 perl Makefile.PL
Reading Makefile.PL args from ../makepl_args.mod_perl
Configure mod_perl with /home/apache_1.3.12/src ? [y]
Shall I build httpd in /home/apache_1.3.12/src for you? [y]
Appending mod_perl to src/Configuration
Using config file: /usr/local/mod_perl-1.24/src/Configuration
Creating Makefile
 + configured for Solaris 270 platform
 + setting C compiler to cc
 + setting C pre-processor to cc -E
 + checking for system header files
 + adding selected modules
o perl_module uses ConfigStart/End
  + mod_perl build type: OBJ
  + setting up mod_perl build environment
  + id: mod_perl/1.24
  + id: Perl/v5.6.0 (solaris) [perl]
  + adjusting Apache build environment
 + checking sizeof various data types
 + doing sanity check on compiler and options
Creating Makefile in support
Creating Makefile in os/unix
Creating Makefile in ap
Creating Makefile in main
Creating Makefile in lib/expat-lite
Creating Makefile in modules/standard
Creating Makefile in modules/perl
EXTRA_CFLAGS: -DSOLARIS2=270 -DMOD_PERL -DUSE_EXPAT -I$(SRCDIR)/lib/expat-li
te
PerlDispatchHandler.enabled
PerlChildInitHandlerenabled
PerlChildExitHandlerenabled
PerlPostReadRequestHandler..enabled
PerlTransHandlerenabled
PerlHeaderParserHandler.enabled
PerlAccessHandler...enabled
PerlAuthenHandler...enabled
PerlAuthzHandlerenabled
PerlTypeHandler.enabled
PerlFixupHandlerenabled
PerlHandler.enabled
PerlLogHandler..enabled
PerlInitHandler.enabled
PerlCleanupHandler..enabled
PerlRestartHandler..enabled
PerlStackedHandlers.enabled
PerlMethodHandlers..enabled
PerlDirectiveHandlers...enabled
PerlTableApienabled
PerlLogApi..enabled
PerlUriApi..enabled
PerlUtilApi.enabled
PerlFileApi.enabled
PerlConnectionApi...enabled
PerlServerApi...enabled
PerlSectionsenabled
PerlSSI.enabled
Will run tests as User: 'nobody' Group: 'other'
Checking CGI.pm VERSION..ok
Checking for LWP::UserAgent..ok
Checking for HTML::HeadParserok
Writing Makefile for Apache
Writing Makefile for Apache::Connection
Writing Makefile for Apache::Constants
Writing Makefile for Apache::File
Writing Makefile for Apache::Leak
Writing Makefile for Apache::Log
Writing Makefile for Apache::ModuleConfig
Writing Makefile for Apache::PerlRunXS
Writing Makefile for Apache::Server
Writing Makefile for Apache::Symbol
Writing Makefile for Apache::Table
Writing Makefile for Apache::URI
Writing Makefile for Apache::Util
Writing Makefile for mod_perl
salcd6# make
(cd /home/apache_1.3.12/src &&  make CC="cc";)
===> os/unix






Re: [OT] Content- & user management, publishing

2000-08-28 Thread Matt Sergeant

On Mon, 28 Aug 2000, Perrin Harkins wrote:

> On Mon, 28 Aug 2000, Christian Jaeger wrote:
> > - is anything like the mentioned things already existent? (mainly: database
> > based content management system, and something of a sophisticated user
> > management) (We would probably even pay for it if that matters)
> 
> There are lots, but the only ones I know of that actually have the
> features most people mean when they say "content management
> system" (i.e. revision control, scheduling, ability to create new things
> without modifying a database schema) are MediaSurface and Allaire
> Spectra.  Both are commercial and closed-source, although fairly
> flexible.  The former uses a mix of java and perl, the latter uses Allaire
> ColdFusion markup.

Just to correct things here, Mediasurface is only Java in the client
editing front end bit, which should be good (better than a HTML UI, and
cross platform too) but it turns out that it bites big time. One of the
lead developers told me he thought he'd have been better doing it in
Perl/Tk, as it has better run-time interactive performance.

-- 


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: Apache::Session and performance question

2000-08-28 Thread Chris Brooks

Hi again to the list,

I went back through the documentation on Apache::Session,
Apache::Session::DBIStore, and Apache::DBI, and I haven't found a
problem in the way we have implemented this.  Does anyone else have
suggestions, or has anyone else experienced a similar performance hit?

Thanks,
Chris

>Date: Tue, 22 Aug 2000 10:08:11 -0400
>To: Perrin Harkins <[EMAIL PROTECTED]>
>From: Chris Brooks <[EMAIL PROTECTED]>
>CC: [EMAIL PROTECTED]
>Subject: Re: Apache::Session and performance question
>Message-ID: <[EMAIL PROTECTED]>

>Hi, thanks for the reply,

>Yes, we are calling the module from http.conf like this:

>PerlModule Apache::DBI
>PerlRequire /www/perl/scripts/perl-startup.pl
>PerlHeaderParserHandler Carescout::SessionHandler

>The referenced startup script contains the line:

>Apache::DBI->connect_on_init( 'DBI:mysql:cs', 'nobody',
>'' );

>I added

>$Apache::DBI::DEBUG = 1;

>to the startup file, and it doesn't seem to be creating a
>new connection for every request.

>Thanks,
>Chris

>>Perrin Harkins wrote:

> > On Mon, 21 Aug 2000, Chris Brooks wrote:
> > We have a fairly simple handler responsible for maintaining
> > state on our web server.  Unfortunately, when we activate
> > it, server performance drops to about 1/10th of what it is
> > without.   After going through the handler and commenting
> > out parts and benchmarking (rinse, repeat), Apache::Session
> > appears to be the culprit.
> >
> > I can't believe that the use of this module should have so
> > great an effect.  We have to be doing something
> > incorrectly.   Any advice would be greatly appreciated.
>
> You are using Apache::DBI, right?
>
> Going to the database on every single request is going to be
> expensive.  If the rest of your application doesn't normally hit the
> database it makes sense for this to have a significant impact.
>
> - Perrin

--

Chris Brooks
Director of Technology
CareScout.com
phone: (781) 431-7033 x 342





Re: Bug in Apache::ASP XMLSubs when an argument includes '>'-characte rs?

2000-08-28 Thread Joshua Chamas

My personal feeling about XMLSubs is that it should
take the code out of the HTML to some perl library.
So to use an XMLSub with perl expression as the args
to the tag though possible is not what I would recommend.

To do what you want below, I would recommend having all 
of the logic in the perl subroutine, and just use the 
tag everywhere.  Without all that conditional logic.
For example, you say you want something like:

>  start_tag='' end_tag=''>
>   ..some HTML here...
>  [Stupid example, but I hope you get the idea]
> 

How I might do this is 


  ..some HTML here...


Then the perl sub might be like:

sub my::tagit {
  my($args, $html) = @_;
  if($args->{user} eq $Session->{UserName}) {
 print "<$args->{tag}>$html{tag}>";
  } else {
 print $html;
  }
}

The point here is to dumb down your HTML/XML constructs.
Otherwise you would probably want to just stick with normal
<% ASP code blocks %>

--Joshua


Henrik Tougaard wrote:
> 
> Joshua Chamas wrote:
> >
> > I think > is just about the only thing that you can't use as
> > a character in the attributes for an XMLSubs and that's because
> > it gets parsed with an aggressive ( or stupid ;) regexp like:
> >
> >   $$data =~ s|\<\s*($self->{xml_subs_match})([^\>]*)/\>
> 
> Pity!
> I would like to use XMLSubs to capture some HTML-output and do
> postprocess them accoring to the attributes.
> 
> Eg. if $Response->{UserName} is "Joshua" then bold part of the page.
> It could be done something like this:
> 
>  start_tag='' end_tag=''>
>   ..some HTML here...
>  [Stupid example, but I hope you get the idea]
> 
> OK the tags are out. I can handle that by making an XMLSub
> for every tag-pair that I need, or whatever...
> But it is a pian to have to say:
> 
> <% $svtwnbu=$Response->{UserName} eq 'Joshua', %>
> 
>...more HTML here...
> 
> 
> [Where $svtwnbu is some-variable-that-will-never-be-used elsewhere :-]
> 
> Not so neat.
> 
> Is there a simpler way of doing this?
> 
> ---
> Henrik Tougaard, FOA, Denmark.



Re: [OT] Content- & user management, publishing

2000-08-28 Thread Perrin Harkins

On Mon, 28 Aug 2000, Christian Jaeger wrote:
> - is anything like the mentioned things already existent? (mainly: database
> based content management system, and something of a sophisticated user
> management) (We would probably even pay for it if that matters)

There are lots, but the only ones I know of that actually have the
features most people mean when they say "content management
system" (i.e. revision control, scheduling, ability to create new things
without modifying a database schema) are MediaSurface and Allaire
Spectra.  Both are commercial and closed-source, although fairly
flexible.  The former uses a mix of java and perl, the latter uses Allaire
ColdFusion markup.

> - are things like these in the interest of other people, too?

Yes.  In addition to Matt's AxKit project, there are a few others,
including the Iaido project on sourceforge.net.

> (Some weeks ago, in the discussion about templating, someone mentioned
> Zope and that perl should have something like that...)

Zope is a pretty poor excuse for a CMS, at least straight out of the
box.  Maybe there's an add-on that makes it more useful.

> We have the option to get the source code of a Storyserver based
> online journal - although it requires modifications, and it's not XML
> based yet.

Don't bother.  You'd end up needing to learn The StoryServer Way, just to
convert this code from it.  It'll be faster to start from scratch.

- Perrin




Re: XML::XPath in APache::ASP -> doesn't work

2000-08-28 Thread Dmitry Beransky


>I'm still using good ol' 5.005 :)  I just tried your Debug=1 suggestion
>(BTW, it doesn't appear to be documented in XML::XPath) and the output
>seems identical for both the ASP and the "offline" versions of the
>script.  I guess I'll have to dive into XPath internals and place a few
>trace statements of my own...


Well, I traced it down to XML::XPath::XMLParser::parse_attlist not been 
called by Expat under Apache (the traces are included below), which results 
in IdNames array not been populated.  Before I start debugging XML::Parser, 
can anyone hypothesize why this might be happening (I'm running XML::Parser 
v2.29)?

Thanks
Dmitry


--- "offline" script trace:
using XML::XPath v.0.98
Executing parse_attlist at 
/usr/lib/perl5/site_perl/5.005/XML/XPath/XMLParser.pm line 200.
adding string with type: ID at 
/usr/lib/perl5/site_perl/5.005/XML/XPath/XMLParser.pm line 203.
Executing parse_attlist at 
/usr/lib/perl5/site_perl/5.005/XML/XPath/XMLParser.pm line 200.
adding group with type: ID at 
/usr/lib/perl5/site_perl/5.005/XML/XPath/XMLParser.pm line 203.
Key: action at /usr/lib/perl5/site_perl/5.005/XML/XPath/XMLParser.pm line 126.
IdNames{xxform}:  at /usr/lib/perl5/site_perl/5.005/XML/XPath/XMLParser.pm 
line 127.
Key: method at /usr/lib/perl5/site_perl/5.005/XML/XPath/XMLParser.pm line 126.
IdNames{xxform}:  at /usr/lib/perl5/site_perl/5.005/XML/XPath/XMLParser.pm 
line 127.
Key: id at /usr/lib/perl5/site_perl/5.005/XML/XPath/XMLParser.pm line 126.
IdNames{xxform}:  at /usr/lib/perl5/site_perl/5.005/XML/XPath/XMLParser.pm 
line 127.
Key: name at /usr/lib/perl5/site_perl/5.005/XML/XPath/XMLParser.pm line 126.
IdNames{group}: name at 
/usr/lib/perl5/site_perl/5.005/XML/XPath/XMLParser.pm line 127.
Key: name at /usr/lib/perl5/site_perl/5.005/XML/XPath/XMLParser.pm line 126.
IdNames{group}: name at 
/usr/lib/perl5/site_perl/5.005/XML/XPath/XMLParser.pm line 127.
Key: name at /usr/lib/perl5/site_perl/5.005/XML/XPath/XMLParser.pm line 126.
IdNames{string}: name at 
/usr/lib/perl5/site_perl/5.005/XML/XPath/XMLParser.pm line 127.
Key: name at /usr/lib/perl5/site_perl/5.005/XML/XPath/XMLParser.pm line 126.
IdNames{string}: name at 
/usr/lib/perl5/site_perl/5.005/XML/XPath/XMLParser.pm line 127.
Key: name at /usr/lib/perl5/site_perl/5.005/XML/XPath/XMLParser.pm line 126.
IdNames{string}: name at 
/usr/lib/perl5/site_perl/5.005/XML/XPath/XMLParser.pm line 127.
Key: name at /usr/lib/perl5/site_perl/5.005/XML/XPath/XMLParser.pm line 126.
IdNames{string}: name at 
/usr/lib/perl5/site_perl/5.005/XML/XPath/XMLParser.pm line 127.
Key: name at /usr/lib/perl5/site_perl/5.005/XML/XPath/XMLParser.pm line 126.
IdNames{string}: name at 
/usr/lib/perl5/site_perl/5.005/XML/XPath/XMLParser.pm line 127.Size: 1


 Apache trace:
using XML::XPath v.0.98
[Mon Aug 28 09:13:10 2000] null: Key: name at 
/usr/lib/perl5/site_perl/5.005/XML/X
Path/XMLParser.pm line 126.
[Mon Aug 28 09:13:10 2000] null: IdNames{group}:  at 
/usr/lib/perl5/site_perl/5.00
5/XML/XPath/XMLParser.pm line 127.
[Mon Aug 28 09:13:10 2000] null: Key: name at 
/usr/lib/perl5/site_perl/5.005/XML/X
Path/XMLParser.pm line 126.
[Mon Aug 28 09:13:10 2000] null: IdNames{string}:  at 
/usr/lib/perl5/site_perl/5.0
05/XML/XPath/XMLParser.pm line 127.
[Mon Aug 28 09:13:10 2000] null: Key: name at 
/usr/lib/perl5/site_perl/5.005/XML/X
Path/XMLParser.pm line 126.
[Mon Aug 28 09:13:10 2000] null: IdNames{string}:  at 
/usr/lib/perl5/site_perl/5.0
05/XML/XPath/XMLParser.pm line 127.
[Mon Aug 28 09:13:10 2000] null: Key: name at 
/usr/lib/perl5/site_perl/5.005/XML/X
Path/XMLParser.pm line 126.
[Mon Aug 28 09:13:10 2000] null: IdNames{string}:  at 
/usr/lib/perl5/site_perl/5.0
05/XML/XPath/XMLParser.pm line 127.
[Mon Aug 28 09:13:10 2000] null: Key: name at 
/usr/lib/perl5/site_perl/5.005/XML/X
Path/XMLParser.pm line 126.
[Mon Aug 28 09:13:10 2000] null: IdNames{string}:  at 
/usr/lib/perl5/site_perl/5.0
05/XML/XPath/XMLParser.pm line 127.
[Mon Aug 28 09:13:10 2000] null: Key: name at 
/usr/lib/perl5/site_perl/5.005/XML/X
Path/XMLParser.pm line 126.
[Mon Aug 28 09:13:10 2000] null: IdNames{string}:  at 
/usr/lib/perl5/site_perl/5.0
05/XML/XPath/XMLParser.pm line 127.
~Size: 1




Apache::Icon SIGHUP does not read directives

2000-08-28 Thread George Sanderson

I have very strange problem.  With a minimum configuration, (httpd -l) gives:
Compiled-in modules:
  http_core.c
  mod_env.c
  mod_log_config.c
  mod_mime.c
  mod_negotiation.c
  mod_dir.c
  mod_alias.c
  mod_access.c
  mod_perl.c
suexec: enabled; valid wrapper /usr/local/apache/bin/suexec

and with the following build:
Apache/1.3.13-dev (Unix) mod_perl/1.24_01-dev configured
running on Linux 2.2.14 with Perl 5.6.0

The only mod_perl module loaded is Apache:Icon. (httpd.conf is attached to
the end of this message)

When I first launch httpd, Apache:Icon reads and processes all of the
autoindex directives.  

However, if I SIGHUP the running httpd root process with,
'kill -HUP httpd-root-pid'

I get the following in the error_log file:
Syntax error on line 11 of /usr/local/apache/conf/httpd.dev:
Invalid command 'AddIconByType', perhaps mis-spelled or defined by a module
not included in the server configuration  

Note that this is a valid directive and that it works fine on the initial
launch.

Can someone please point me in the right direction to solve this problem?

The following is my complete httpd.conf file.
#===
ClearModuleList
AddModule mod_log_config.c
AddModule mod_dir.c
AddModule mod_perl.c
#PerlFreshRestart On
DocumentRoot /home/httpd/test/htdocs
DirectoryIndex index.html index.htm index.shtml index.cgi Default.htm
default.htm
PerlModule Apache::Icon
#
#AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
AddIconByType (TXT,/icons/text.gif) text/*
AddIcon /icons/binary.gif .bin .exe
AddIcon /icons/tar.gif .tar
AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
AddIcon /icons/a.gif .ps .ai .eps
AddIcon /icons/text.gif .txt
DefaultIcon /icons/unknown.gif
#
ServerType standalone
Port 81
HostnameLookups off
User webuser
Group webgroup
ServerAdmin [EMAIL PROTECTED]
ServerRoot /usr/local/apache
ErrorLog logs/error_log.dev
LogLevel warn
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\""
combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
CustomLog logs/access_log.dev combined
PidFile logs/httpd.pid.dev
ScoreBoardFile logs/httpd.scoreboard.dev
LockFile logs/httpd.lock.dev
ServerName test.xorgate.com
UseCanonicalName on
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
MinSpareServers 4
MaxSpareServers 10
StartServers 6
MaxClients 50
MaxRequestsPerChild 200




Apache::SSI Date formats

2000-08-28 Thread Simon_Wilcox


Apache 1.3.12, mod_perl 1.24, Apache::SSI 2.13, Date::Format 2.08

  I've had problems with date formats in Apache::SSI.

  The behaviour of mod_include is to apply the  configuration directive to all date formats.

  Apache::SSI does not seem to be applying the format. Examining the code
  led me to think that the Date::Format module wasn't being loaded correctly
  so I added a use statement to the top of the code (since I use these
  functions all over the place, there seemed to be no benefit to delaying
  the include).

  Now Apache::SSI was throwing errors indicating that I was passing the the
  wrong datatype (wanted an array and not an array constructor).

  I fixed the _lastmod sub to provide the required array (see patch below).

  Then I found that  didn't work either.
  Looking at the code again, a time format didn't seem to get passed. So I
  fixed up the echo_DATE_LOCAL sub to format the date.

  The patch below includes both these patches but my questions are:

  Is there something else wrong which I should fix before changing the code
  ?
  If the SSI.pm code does need to change, am I doing it the right way before
  finishing the other subs ?

  Regards,

  Simon Wilcox
  Williams Lea Group

--- SSI.213Sun Jun  4 06:29:53 2000
+++ SSI.pm Mon Aug 28 14:33:51 2000
@@ -6,6 +6,7 @@
 use File::Basename;
 use HTML::SimpleParse;
 use Symbol;
+use Date::Format;

 $VERSION = '2.13';
 my $debug = 0;
@@ -344,13 +345,26 @@
 } elsif ( defined ($value = $self->{_r}->subprocess_env($var)) ) {
 return $value;
 } elsif (defined &{"echo_$var"}) {
-return &{"echo_$var"}($self->{_r});
+return &{"echo_$var"}($self->{_r}, $self->{'timefmt'});
 }
 return '';
 }

 sub echo_DATE_GMT { scalar gmtime; }
-sub echo_DATE_LOCAL { scalar localtime; }
+sub echo_DATE_LOCAL {
+  if (defined $_[1]) {
+unless (exists $INC{'Date/Format.pm'}) {
+  eval "use Date::Format";
+  warn "Can't load Date::Format: $@" if $@;
+  return if $@;
+}
+my @time=localtime;
+return strftime($_[1], @time);
+  } else {
+return scalar localtime;
+  }
+}
+
 sub echo_DOCUMENT_NAME {
 my $r = _2main(shift);
 return &_set_VAR($r, 'DOCUMENT_NAME', basename $r->filename);
@@ -436,7 +450,8 @@
   warn "Can't load Date::Format: $@" if $@;
   return if $@;
 }
-return strftime($_[1], [localtime( (stat $_[0])[9] )]);
+my @time=localtime( (stat $_[0])[9] );
+return strftime($_[1], @time);
   } else {
 return scalar localtime( (stat $_[0])[9]);
   }





Re: XML::XPath in APache::ASP -> doesn't work

2000-08-28 Thread Paul Lindner

On Mon, Aug 28, 2000 at 07:11:17AM -0700, Dmitry Beransky wrote:
> > I don't know why its working on the command line and not in your web
> > page. Seems very odd to me. Have you tried setting $XML::XPath::Debug=1
> > and seeing if that shows anything suspect (expect LOTS of stuff to come
> > out). Also note that XML::XPath doesn't work with Perl 5.6 yet. I'm
> > uploading XML::XPath 0.99 today to fix that.
> 
> I'm still using good ol' 5.005 :)  I just tried your Debug=1 suggestion
> (BTW, it doesn't appear to be documented in XML::XPath) and the output
> seems identical for both the ASP and the "offline" versions of the
> script.  I guess I'll have to dive into XPath internals and place a few
> trace statements of my own...
> 

You might try intentionally placing a syntax error in your asp script
so you can analyze the parsed output.  It's possible the parser is
doing something unexpected to your code.

-- 
Paul Lindner
[EMAIL PROTECTED]
Red Hat Inc.



Re: Getting data from external URL

2000-08-28 Thread Matt Sergeant

On Mon, 28 Aug 2000, Jeff Beard wrote:

> I just wrote a function yesterday that uses IO::Socket to interact with an 
> outside CGI program. It appears to work the way I want but this is my first 
> foray into writing TCP client code.
> 
> It's basically this:
> 
> sub tcp_client {
>  my ( $rhost, $rport, $query_string ) = @_;
> 
>  my $socket = IO::Socket::INET->new( PerrAddr => $rhost,
>  PeerPort => $rport,
>  Proto=> "tcp",
>  Type => SOCK_STREAM)
>  or die "Couldn't connect to $rhost:$rport : $!\n";
> 
>  print $socket "GET /programname?$query_string\n";

At the very least send a HTTP/1.x part and a Host: header. Otherwise
virtual hosts are hosed.

-- 


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: XML::XPath in APache::ASP -> doesn't work

2000-08-28 Thread Dmitry Beransky

> I don't know why its working on the command line and not in your web
> page. Seems very odd to me. Have you tried setting $XML::XPath::Debug=1
> and seeing if that shows anything suspect (expect LOTS of stuff to come
> out). Also note that XML::XPath doesn't work with Perl 5.6 yet. I'm
> uploading XML::XPath 0.99 today to fix that.

I'm still using good ol' 5.005 :)  I just tried your Debug=1 suggestion
(BTW, it doesn't appear to be documented in XML::XPath) and the output
seems identical for both the ASP and the "offline" versions of the
script.  I guess I'll have to dive into XPath internals and place a few
trace statements of my own...

Thanks
Dmitry




Re: Getting data from external URL

2000-08-28 Thread Jeff Beard

I just wrote a function yesterday that uses IO::Socket to interact with an 
outside CGI program. It appears to work the way I want but this is my first 
foray into writing TCP client code.

It's basically this:

sub tcp_client {
 my ( $rhost, $rport, $query_string ) = @_;

 my $socket = IO::Socket::INET->new( PerrAddr => $rhost,
 PeerPort => $rport,
 Proto=> "tcp",
 Type => SOCK_STREAM)
 or die "Couldn't connect to $rhost:$rport : $!\n";

 print $socket "GET /programname?$query_string\n";

 my $response;

 while ( <$socket> ) { $response .= $_ }

 close($socket);

 return \$answer;
}

--Jeff


At 06:58 AM 8/28/00 -0400, Steve Reppucci wrote:

>Just a word of warning: LWP::Simple doesn't follow redirects (at least,
>the last I checked, not sure if it's been changed in the 3 or 4
>months since I've last used it...), so you need to be certain that you're
>using it in a context where you're fetching something that won't return a
>redirect.
>
>HTH...
>
>On Sat, 26 Aug 2000, Stas Bekman wrote:
>
> > On Sat, 26 Aug 2000, Rodney Broom wrote:
> >
> > > OK, lots of banter...
> > >
> > > Hey V, if you are on a *NIX system, then this is a fast way:
> > >
> > > open U, "lynx -source www.some.url.dom |";
> > > $data = join '', ;
> > >
> > > There, you're finished. Admittedly, this isn't terribly efficiant, 
> but it works
> > > just fine and has short devel time.
> >
> > This one is much more efficient and requires even less coding:
> >
> > use LWP::Simple;
> > $content = get("http://www.sn.no/")
> >
> > And it doesn't require you to be on any particular OS, as far as I know.
> >
> > see perldoc LWP::Simple and as advised by many others LWP::UserAgent for
> > more advanced uses.
>
>
>=-=-=-=-=-=-=-=-=-=-  My God!  What have I done?  -=-=-=-=-=-=-=-=-=-=
>Steve Reppucci   [EMAIL PROTECTED] |
>Logical Choice Software  http://logsoft.com/ |
>508/958-0183 Be Open |

Jeff Beard
__
Web:www.cyberxape.com
Email:  jeff at cyberxape dot com
Location:   Boulder, Colorado, USA




Re: [OT] Content- & user management, publishing

2000-08-28 Thread Matt Sergeant

On Mon, 28 Aug 2000, Christian Jaeger wrote:

> Hello!
> 
> I don't know a better place to discuss this, please tell me if you know
> (mailing lists preferred).
> 
> Here at ETH Zurich (swiss federal institute of technology) we want to build
> a daily online journal. One of the suggestions (mine) is to build it with
> perl. It should be based on XML, and the idea is to make also the authoring
> / workflow / content management / user management parts of the system web
> based. The content should be modular: pictures, text, audio etc. should all
> be independant content elements with their own history, preferably with
> possibility to spawn children from parent elements (i.e. original picture
> and derived lower resolution pictures). For publishing, several elements
> should be composed together. Another non-trivial part is a good user- and
> group or role based user management. Suggestion for Text markup is a (pod
> like) plain text markup which is converted to XML for storage, with the
> possible option to fully go with XML when editors are really ready. For
> publishing of the articles I'm planning to use in some way AxKit (source
> should be taken from database), and Mason for the administration parts.

Well you've pretty much just described my plans for AxKit-CMS...

> Now maybe that's a bit a big project - I don't even really know yet. (My
> estimation for the whole project is 280 days of work - I'm hoping to solve
> this with 5 programmers until the end of november.. never done something
> that big :-().  Now what I would like to know:
> 
> - is anything like the mentioned things already existent? (mainly: database
> based content management system, and something of a sophisticated user
> management) (We would probably even pay for it if that matters)

Well there are lots of pre-existing content management systems. See
http://www.camworld.com/cms/ for an overview of a few of them. The only
perl ones I know of on that list are MediaSurface and Interwoven
Teamsite. Both are horribly expensive (though maybe cheaper than your 280
programmer days). Mason has a CMS, which Linux Journal just did a write up
all about. I haven't used it so I can't comment, but the article is at
http://www2.linuxjournal.com/lj-issues/issue77/4168.html

> - are things like these in the interest of other people, too? (Some weeks
> ago, in the discussion about templating, someone mentioned Zope and that
> perl should have something like that...) Would it be possible to get
> together and build such parts as open source? Preferably in a good modular
> fashion so more people can profit from it..

AxKit is building something like this right now. We have the skeleton
framework in place, its just a matter of time now. We would _very_ _much_
appreciate funding or manpower for the project. We have strong long-term
goals for the project, not just something we want to dump in the open
source community. Mail me direct if this is something you're interested in
doing, and we can talk business off the list.

> Maybe someone of you knows Vignette Storyserver? We have the option to get
> the source code of a Storyserver based online journal - although it
> requires modifications, and it's not XML based yet. So an idea is also to
> port this (TCL code) to perl, and reimplement required Storyserver
> functionality in perl. Any comments on that? (I don't know Storyserver yet)

Don't do it. StoryServer's architecture is not focused towards XML like
AxKit's is. And thats a huge undertaking (trust me from someone who is
working to port a product to perl from another language).

> The reason for not using Zope, OpenCMS or Enhydra, is a) I don't know them
> really :-(, b) some downsides are visible when looking at these solutions
> (i.e. Zope's user interface seems rather sub-optimal for use by
> journalists, especially as long as it's html based). (And we haven't
> succeeded to get OpenCMS to run until now)

UI's are always going to be a problem. See the discussion on the CMS list
about editing
interfaces: http://www.mail-archive.com/cms-list@camworld.com/

-- 


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: XML::XPath in APache::ASP -> doesn't work

2000-08-28 Thread Dmitry Beransky

> Why don't you use XMLSubs to catch the data with a custom
> tag, and then process the data with XPath... you could register
> the data in a global, and then process it later in your script
> if you like?  It just killed me to see this kind of construct
> in an ASP script:

Actually, that's exactly what I do in the real script.  What I posted was
just a simplified version (my apologies for neglecting to mention that).  
Since the "offline" version of the script did work as expected, I simply
plopped it into ASP to show off this weirdness.

> I don't know why this doesn't work for you, but I can check
> it out later if it still isn't working and no one else posts
> an answer.

thanks
Dmitry




[OT] Content- & user management, publishing

2000-08-28 Thread Christian Jaeger

Hello!

I don't know a better place to discuss this, please tell me if you know
(mailing lists preferred).

Here at ETH Zurich (swiss federal institute of technology) we want to build
a daily online journal. One of the suggestions (mine) is to build it with
perl. It should be based on XML, and the idea is to make also the authoring
/ workflow / content management / user management parts of the system web
based. The content should be modular: pictures, text, audio etc. should all
be independant content elements with their own history, preferably with
possibility to spawn children from parent elements (i.e. original picture
and derived lower resolution pictures). For publishing, several elements
should be composed together. Another non-trivial part is a good user- and
group or role based user management. Suggestion for Text markup is a (pod
like) plain text markup which is converted to XML for storage, with the
possible option to fully go with XML when editors are really ready. For
publishing of the articles I'm planning to use in some way AxKit (source
should be taken from database), and Mason for the administration parts.

Now maybe that's a bit a big project - I don't even really know yet. (My
estimation for the whole project is 280 days of work - I'm hoping to solve
this with 5 programmers until the end of november.. never done something
that big :-().  Now what I would like to know:

- is anything like the mentioned things already existent? (mainly: database
based content management system, and something of a sophisticated user
management) (We would probably even pay for it if that matters)

- are things like these in the interest of other people, too? (Some weeks
ago, in the discussion about templating, someone mentioned Zope and that
perl should have something like that...) Would it be possible to get
together and build such parts as open source? Preferably in a good modular
fashion so more people can profit from it..

Maybe someone of you knows Vignette Storyserver? We have the option to get
the source code of a Storyserver based online journal - although it
requires modifications, and it's not XML based yet. So an idea is also to
port this (TCL code) to perl, and reimplement required Storyserver
functionality in perl. Any comments on that? (I don't know Storyserver yet)

The reason for not using Zope, OpenCMS or Enhydra, is a) I don't know them
really :-(, b) some downsides are visible when looking at these solutions
(i.e. Zope's user interface seems rather sub-optimal for use by
journalists, especially as long as it's html based). (And we haven't
succeeded to get OpenCMS to run until now)

Thanks for any comments!
Christian Jaeger

*---*
   Web Office ETH Zuerich
   Christian Jaeger
   Corporate Communications
   ETH Zentrum
   CH-8092 Zurich

   office: HG J46e-mail: [EMAIL PROTECTED]
   phone: +41 (0)1 63 2 5780   fax: +41 (0)1 63 2 3525
   home:  +41 (0)1 273 65 46
*---*





RE: Bug in Apache::ASP XMLSubs when an argument includes '>'-characte rs?

2000-08-28 Thread Bryan McGuire

What 'bout $sv=$$hashref{key} instead of $sv=$hashref->{key}? It's one
less character of typing so it's easier on your fingers too!

-Original Message-
From: Henrik Tougaard [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 28, 2000 4:59 AM
To: '[EMAIL PROTECTED]'
Cc: 'Joshua Chamas'
Subject: RE: Bug in Apache::ASP XMLSubs when an argument includes
'>'-characte rs?


Joshua Chamas wrote:
>
> I think > is just about the only thing that you can't use as
> a character in the attributes for an XMLSubs and that's because
> it gets parsed with an aggressive ( or stupid ;) regexp like:
>
>   $$data =~ s|\<\s*($self->{xml_subs_match})([^\>]*)/\>


Pity!
I would like to use XMLSubs to capture some HTML-output and do
postprocess them accoring to the attributes.

Eg. if $Response->{UserName} is "Joshua" then bold part of the page.
It could be done something like this:


  ..some HTML here...
 [Stupid example, but I hope you get the idea]

OK the tags are out. I can handle that by making an XMLSub
for every tag-pair that I need, or whatever...
But it is a pian to have to say:

<% $svtwnbu=$Response->{UserName} eq 'Joshua', %>

   ...more HTML here...


[Where $svtwnbu is some-variable-that-will-never-be-used elsewhere :-]

Not so neat.

Is there a simpler way of doing this?

---
Henrik Tougaard, FOA, Denmark.




Re: Getting data from external URL

2000-08-28 Thread Stas Bekman

On Mon, 28 Aug 2000, Steve Reppucci wrote:

> 
> Just a word of warning: LWP::Simple doesn't follow redirects (at least,
> the last I checked, not sure if it's been changed in the 3 or 4
> months since I've last used it...), so you need to be certain that you're
> using it in a context where you're fetching something that won't return a
> redirect.

That's why I've mentioned this :)

LWP::UserAgent for more advanced uses.


> 
> HTH...
> 
> On Sat, 26 Aug 2000, Stas Bekman wrote:
> 
> > On Sat, 26 Aug 2000, Rodney Broom wrote:
> > 
> > > OK, lots of banter...
> > > 
> > > Hey V, if you are on a *NIX system, then this is a fast way:
> > > 
> > > open U, "lynx -source www.some.url.dom |";
> > > $data = join '', ;
> > > 
> > > There, you're finished. Admittedly, this isn't terribly efficiant, but it works
> > > just fine and has short devel time.
> > 
> > This one is much more efficient and requires even less coding:
> > 
> > use LWP::Simple;
> > $content = get("http://www.sn.no/")
> > 
> > And it doesn't require you to be on any particular OS, as far as I know.
> > 
> > see perldoc LWP::Simple and as advised by many others LWP::UserAgent for
> > more advanced uses.
> 
> 
> =-=-=-=-=-=-=-=-=-=-  My God!  What have I done?  -=-=-=-=-=-=-=-=-=-=
> Steve Reppucci   [EMAIL PROTECTED] |
> Logical Choice Software  http://logsoft.com/ |
> 508/958-0183 Be Open |
> 
> 



_
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: Getting data from external URL

2000-08-28 Thread Steve Reppucci


Just a word of warning: LWP::Simple doesn't follow redirects (at least,
the last I checked, not sure if it's been changed in the 3 or 4
months since I've last used it...), so you need to be certain that you're
using it in a context where you're fetching something that won't return a
redirect.

HTH...

On Sat, 26 Aug 2000, Stas Bekman wrote:

> On Sat, 26 Aug 2000, Rodney Broom wrote:
> 
> > OK, lots of banter...
> > 
> > Hey V, if you are on a *NIX system, then this is a fast way:
> > 
> > open U, "lynx -source www.some.url.dom |";
> > $data = join '', ;
> > 
> > There, you're finished. Admittedly, this isn't terribly efficiant, but it works
> > just fine and has short devel time.
> 
> This one is much more efficient and requires even less coding:
> 
> use LWP::Simple;
> $content = get("http://www.sn.no/")
> 
> And it doesn't require you to be on any particular OS, as far as I know.
> 
> see perldoc LWP::Simple and as advised by many others LWP::UserAgent for
> more advanced uses.


=-=-=-=-=-=-=-=-=-=-  My God!  What have I done?  -=-=-=-=-=-=-=-=-=-=
Steve Reppucci   [EMAIL PROTECTED] |
Logical Choice Software  http://logsoft.com/ |
508/958-0183 Be Open |




RE: Bug in Apache::ASP XMLSubs when an argument includes '>'-characte rs?

2000-08-28 Thread Henrik Tougaard

Joshua Chamas wrote:
> 
> I think > is just about the only thing that you can't use as
> a character in the attributes for an XMLSubs and that's because
> it gets parsed with an aggressive ( or stupid ;) regexp like:
> 
>   $$data =~ s|\<\s*($self->{xml_subs_match})([^\>]*)/\>


Pity!
I would like to use XMLSubs to capture some HTML-output and do
postprocess them accoring to the attributes.

Eg. if $Response->{UserName} is "Joshua" then bold part of the page.
It could be done something like this:


  ..some HTML here...
 [Stupid example, but I hope you get the idea]

OK the tags are out. I can handle that by making an XMLSub
for every tag-pair that I need, or whatever...
But it is a pian to have to say:

<% $svtwnbu=$Response->{UserName} eq 'Joshua', %>

   ...more HTML here...


[Where $svtwnbu is some-variable-that-will-never-be-used elsewhere :-]

Not so neat.

Is there a simpler way of doing this?

---
Henrik Tougaard, FOA, Denmark.



Re: [OT] multipart/mime messages [was: Re: Missing src/include/alloc.h ?]

2000-08-28 Thread David Hodgkinson


[EMAIL PROTECTED] writes:

> In modperl, you wrote:
> >
> >"Ime Smits" <[EMAIL PROTECTED]> writes:
> >
> >> You should compose a multi-part mime message in that case. I'm not sure if
> >> there are modules around to do that in perl...
> >
> >That would be Mime::Lite.
> 
> Actually, that would be MIME::Lite.

Yeah :-)

-- 
Dave Hodgkinson, http://www.hodgkinson.org
Editor-in-chief, The Highway Star   http://www.deep-purple.com
  Apache, mod_perl, MySQL, Sybase hired gun for, well, hire
  -



Re: [OT] multipart/mime messages [was: Re: Missing src/include/alloc.h ?]

2000-08-28 Thread marcel

In modperl, you wrote:
>
>"Ime Smits" <[EMAIL PROTECTED]> writes:
>
>> You should compose a multi-part mime message in that case. I'm not sure if
>> there are modules around to do that in perl...
>
>That would be Mime::Lite.

Actually, that would be MIME::Lite.

-- 
Marcel Gr\"unauer - Codewerk plc . . . . . . . . . . . 
Perl Consulting, Programming, Training, Code review . . .  <[EMAIL PROTECTED]>
mod_perl, XML solutions - email for consultancy availability
sub AUTOLOAD{($_=$AUTOLOAD)=~s;^.*::;;;y;_; ;;print} Just_Another_Perl_Hacker();



Re: [OT] multipart/mime messages [was: Re: Missing src/include/alloc.h ?]

2000-08-28 Thread David Hodgkinson


"Ime Smits" <[EMAIL PROTECTED]> writes:

> You should compose a multi-part mime message in that case. I'm not sure if
> there are modules around to do that in perl...

That would be Mime::Lite.

-- 
Dave Hodgkinson, http://www.hodgkinson.org
Editor-in-chief, The Highway Star   http://www.deep-purple.com
  Apache, mod_perl, MySQL, Sybase hired gun for, well, hire
  -



Re: XML::XPath in APache::ASP -> doesn't work

2000-08-28 Thread Matt Sergeant

On Sun, 27 Aug 2000, Dmitry Beransky wrote:

> Hi,
> 
> Well, it's not that it doesn't work, rather I can't get it work and this
> has been driving me nuts for two weeks (on and off).  I must be missing
> something obvious, but I can't figure out what it is.  Anyway, here's the
> problem:
> 
> When the following asp is executed, it reports the size of the nodeset as
> zero, but if I strip out all html and simply run this as a perl script
> (also included below) off
> a command line, I get 1, just as I would expect.  I'm using ASP v.2.03 and
> Xpath v.098.  Any ideas what's going on?  Matt, Joshua...?

I don't know why its working on the command line and not in your web
page. Seems very odd to me. Have you tried setting $XML::XPath::Debug=1
and seeing if that shows anything suspect (expect LOTS of stuff to come
out). Also note that XML::XPath doesn't work with Perl 5.6 yet. I'm
uploading XML::XPath 0.99 today to fix that.

-- 


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: XML::XPath in APache::ASP -> doesn't work

2000-08-28 Thread Joshua Chamas

Dmitry Beransky wrote:
> 
> Hi,
> 
> Well, it's not that it doesn't work, rather I can't get it work and this
> has been driving me nuts for two weeks (on and off).  I must be missing
> something obvious, but I can't figure out what it is.  Anyway, here's the
> problem:
> 
> When the following asp is executed, it reports the size of the nodeset as
> zero, but if I strip out all html and simply run this as a perl script
> (also included below) off
> a command line, I get 1, just as I would expect.  I'm using ASP v.2.03 and
> Xpath v.098.  Any ideas what's going on?  Matt, Joshua...?
> 

Why don't you use XMLSubs to catch the data with a custom
tag, and then process the data with XPath... you could register
the data in a global, and then process it later in your script
if you like?  It just killed me to see this kind of construct
in an ASP script:

> my $data = <<"END_XML";
> > free web link monitoring   Huntington Beach, CA  USA 
http://www.nodeworks.com1-714-625-4051