Re: How to uninstall mod_perl?

2000-02-10 Thread Jeffrey W. Baker

Brian Tully wrote:
> 
> Please excuse my  naivete but how do I uninstall mod_perl?  Do i have to
> recompile Apache?

Yes.

If you used DSO you can just modify the httpd.conf, otherwise you need
to recompile Apache.

-jwb



Re: ARGV in exec subprocesses

2000-02-10 Thread Edwin Pratomo

On Fri, 11 Feb 2000, Edwin Pratomo wrote:
> Stas, the example you supplied in the miniguide 
> (http://perl.apache.org/guide/performance.html#Forking_or_Executing_Subprocesse)
> doesn't work.
> It's because the scalar returned by FreezeThaw::thaw contains shell escape
^^

Sorry, I mean ::freeze.

Regards,
Edwin.




How to uninstall mod_perl?

2000-02-10 Thread Brian Tully

Please excuse my  naivete but how do I uninstall mod_perl?  Do i have to
recompile Apache? 



ARGV in exec subprocesses

2000-02-10 Thread Edwin Pratomo


Stas, the example you supplied in the miniguide 
(http://perl.apache.org/guide/performance.html#Forking_or_Executing_Subprocesse)
doesn't work.
It's because the scalar returned by FreezeThaw::thaw contains shell escape
chars, like: [|;] so system("program.pl $params") obviously will break.

If the argument we will pass to the external script is just a simple scalar,
regexing the arg is enough, like in a SIG{__DIE__} handler in my
handler.pl:

$SIG{__DIE__} = sub {
local $ENV{'PATH'} = '/home/myhome';
my $params = $_[0];
$params =~ s#\n# #gs;
$params =~ s/'/"'"/gm;
my $taint_safe = ($params =~ m#(.*)#m)[0];
system("alertall '$taint_safe'");
};

But if the arg is in a more complicated type, of course stringification is
essential, but then we have to make it safe for shell.
MIME::Base64 is the easy way for this, but probably a bit overkill :-)

Thanks for the excellent guide.

Regards,
Edwin.



RE: Embedded Perl XML Extensions ...

2000-02-10 Thread Gerald Richter

Joshua,

>
> I have been thinking about some XML style extensions for
> Apache::ASP, and know that you are looking at the same thing
> with Embperl, and was hoping that we could sync up on the
> APi, so there might be a common mindset for a developer when
> using our extensions, even if the underlying implementation
> were different.
>...
>
> So let me know what you think.  Thanks.
>

I would be very happy to work together in this area, so extentions that
works with ASP will also work with Embperl and viceversa. I have a lot of
ideas (which also includes an interface like you describe). Just give me a
few days, before you start implementing this XML stuff and I send you a
description what I plan and we can discuss what you think about it and what
you like to change

Gerald


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

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




Re: Apache::ASP and Apache::SSI

2000-02-10 Thread Joshua Chamas

[EMAIL PROTECTED] wrote:
> 
> I reinstalled mod_perl and apache but I still get the same error
> when I try to use Apache::ASP and Apache::SSI at the same time as seen in
> the example.  Error message is
> 
> [Thu Feb 10 22:33:42 2000] [error] [asp] [25663] [error] syntax error at
> (eval 50) line 192, at EOF <--> syntax error at (eval 50) line 246, near
> "; }" <--> , /usr/lib/perl5/site_perl/Apache/ASP.pm line 1180
> 

Set Debug to -2 in the config, and tell me what you get.
What I'm looking for is the text of the script in compiled form
so I can see what might be generating the systax error.

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



ANNOUNCE: Apache::AuthCookie 2.001

2000-02-10 Thread Ken Williams

Hi,

The URL   
http://forum.swarthmore.edu/~ken/modules/archive/Apache-AuthCookie-2.001.tar.gz
has entered CPAN as

  file: $CPAN/authors/id/KWILLIAMS/Apache-AuthCookie-2.001.tar.gz
  size: 14968 bytes
   md5: 252ea4ec539f0c303ae552a4e25588d5


 - The login forms may now use the POST method instead of the GET method.
   This is a big deal, because with GET the user's credentials get logged
   to access logs, they remain in the user's browser history, and so on.
   Thanks to [EMAIL PROTECTED] (Eric Cholet) for the patch and prodding.

 - There is now a proper test suite, which will fire up an httpd and make
   requests of it.  The test code is adapted from Eric's old example
   (eg/) suite.

 - I've added a logout() method to help unset cookies.  The example
   logout.pl now uses logout().  Thanks to Aaron Ross
   ([EMAIL PROTECTED]).


These are 3 pretty important additions.  Let me know how they pan out.


  ------
  Ken Williams Last Bastion of Euclidity
  [EMAIL PROTECTED]The Math Forum





RE: How do I send a 404 from Embperl?

2000-02-10 Thread Gerald Richter

>
> I am attempting to send a 404 not found message from an Embperl
> script. Here
> is the code I am trying to use in its simplest form. This is
> test.html. Note
> that it contains no HTML.
>
> [-
>   $req_rec->status('404');
>   $req_rec->header_out('Content-Length' => undef);
>   exit;
> -]
>
>...
> Oh! So close! But the Content-Length makes the client think that there is
> something worth displaying. Both NS and IE show a blank page. What I'd
> rather see is the server's error page.
>
> The question: How do I keep Embperl from adding the content length to the
> headers when I want to send an error message?
>

You can't keep Embperl from doing so, but that isn't really the problem. The
problem is that you have to tell Apache to generate the error page for you.
In a Apache::Registry script you can do this by

sub notfound
{
return 404 ;
}

but this isn't possible within a Embperl page. So either use
Apache::Registry for that purpose, because you won't display any HTML
anyway, or use your code above and generate your own errorpage, instead of
let Apache do this for you. This should work quite well

Gerald



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

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




Re: $r->print delay?

2000-02-10 Thread Ed Loehr

Greg Stark wrote:
> 
> Ed Loehr <[EMAIL PROTECTED]> writes:
> 
> > > [EMAIL PROTECTED] (Ed Loehr) wrote:
> > > >Any ideas on why would this output statement takes 15-20 seconds to
> > > >send a 120kb page to a browser on the same host?
> > > >
> > > >$| = 1;  # Don't buffer anything...send it asap...
> > > >$r->print( $data );
> 
> You don't say how many lines your 120kb of data is. If it's about 40
> characters per line average that's 30k calls to write (because you turned
> buffering off). Calls to write ought to be around 100us but if they were slow
> for some reason and took 500us then that would explain the 15s.

A number of the lines are 5-6K each.  Context is a rather large
html-based spreadsheet-like page.

> Additionally you're probably filling the kernel buffer and forcing a context
> switch several times. If the buffer is about 4k then there would be 3k context
> switches each about 10ms on linux, or about 30s of latency. There was a debate
> over the usefulness of the ProxyReceiveBuffer parameter, and even that isn't
> the same as this buffer, but it ought to be possible for Apache to setsockopt
> to ask for a larger buffer.
> 
> In short, don't set $|=1, it will only slow down this process, and investigate
> if there's any way to increase the size of the kernel buffer for the socket in
> Apache. Lots of people would be interested to know if you turn up anything
> there.

With buffering on or off, and max "segment" size of 900 bytes in any
one call to print() (or $r->print()), but doing 120kb worth of
printing in rapid succession, the smaller-but-still-large delay shows
up typically around 100kb into it.  The only way I was able to make
the large delays disappear so far is to sleep 1 every 50 prints or
so...but that's not really disappearing, now is it...

Experimentally, it appears this is simply too much data too quickly. 
I think I've seen $|=1 make a big difference with other non-local
NT/MSIE clients, even on these 120kb pages.  I've consistently been
able to reproduce this problem in both buffered and non-buffered mode
with linux netscape 4.7, both locally and remotely.

I'll look into the kernel buffer issue... :(

Cheers,
Ed Loehr



Re: What's the benefits of using XML ?

2000-02-10 Thread Tobias Hoellrich

At 07:00 PM 2/10/00 -0800, Perrin Harkins wrote:
>

[ ... interesting XML application analysis deleted ... ]

>
>Looks I came up with some reasons after all.  So go ahead and use it if
>you see a fit.  Just don't believe anything that a person with a product
>to sell tells you about XML.  Or anything else.  But that's a different
>story.
>
>- Perrin
>


Thanks Perrin, that hit the spot :-) I'm glad I'm not the only one thinking
the way you think.

Tobias




Re: Apache::ASP and Apache::SSI problems

2000-02-10 Thread Perrin Harkins

On Thu, 10 Feb 2000, Ken Williams wrote:
> Yeah, I just saw the message.  Since I tend not to use CPAN.pm (I like to
> tinker around with stuff when I download/install) I've been ignorant of its
> procedures.

The main thing to know is that it won't install if the tests fail, unless
you force it.

> How about this: for Apache::AuthCookie I've been writing a system that will ask
> the user at "perl Makefile.PL" time for the path to an httpd.  The default is
> $ENV{APACHE} or '/usr/lib/httpd/httpd'.  
> 
> Will that work?

That would be great.

- Perrin



Re: What's the benefits of using XML ?

2000-02-10 Thread Perrin Harkins

On Thu, 10 Feb 2000, Vlad Safronov wrote:
> What's the benefits of using XML in building web site with dynamic
> content?
> (web site is a front end to database)

This is off-topic for this list, but I can't resist...

What's the benefit of using XML?  You get to buy expensive application
servers! No, that can't be it...  You get to buy a bunch of books on XML! 
No, that doesn't sound right either...  It's an excuse to learn Java!  No,
somebody went and wrote a Perl parser...  It's a way to store structured
information like a database system, but without all that pesky concurrent
access management and query capability!  No, there must be something... 

Well, it's from Microsoft, so it must be great!  Right?

Okay, I admit there are places where XML is useful.  Any place you used to
say "comma separated values" can be s/// with XML and improve the
readability of your data.  It makes nice-looking config files too.  It's
very handy when you need a format for passing complex data in an OS and
language independent way.  It's also handy when you don't know what your
data structure will be before you start, so you can't make a real database
schema for it.  Witness the folks at http://www.allaire.com/ who built an
entire product (Spectra) around serializing objects in a single field as
XML.  Of course, if you only need to manipulate data using perl, you could
just serialize with Storable and save some space/cycles.  It can also be
used when you want to store some structured data but you can't run a real
database for some reason.  It definitely beats making up your own addition
to the million or so text-based data formats out there. 

Some people like to pull data from a database, turn it into XML as an
intermediary format, and then use something like XSLT to turn it into
HTML.  Personally, I don't see a good reason to do this instead of
just using perl's internal data strutcures for your intermediary
format and using something like Template Toolkit (see CPAN) to format
it into HTML.  But, it's a matter of taste, and also of portability to
other languages.

Looks I came up with some reasons after all.  So go ahead and use it if
you see a fit.  Just don't believe anything that a person with a product
to sell tells you about XML.  Or anything else.  But that's a different
story.

- Perrin



Re: Apache::ASP and Apache::SSI problems

2000-02-10 Thread Ken Williams

[EMAIL PROTECTED] (Perrin Harkins) wrote:
>On Thu, 10 Feb 2000 [EMAIL PROTECTED] wrote:
>> Okay, I installed mod_perl, Apache::ASP and required modules like 
>> Apache::Filter, and Apache::SSI.  (Note, some of the Apache:: modules will
>> not isntall via CPAN.pm, they look for HTTP in some messed up directory
>> where it oviously doesn't exist, you have to run make install manually or
>> force the install through cpan which I have NO IDEA how to do).
>
>>From the CPAN shell:
>> force install Apache::SSI
>
>All the Ken Williams modules have this problem in their test scripts.  Any
>chance you could fix that Ken?  

Yeah, I just saw the message.  Since I tend not to use CPAN.pm (I like to
tinker around with stuff when I download/install) I've been ignorant of its
procedures.

How about this: for Apache::AuthCookie I've been writing a system that will ask
the user at "perl Makefile.PL" time for the path to an httpd.  The default is
$ENV{APACHE} or '/usr/lib/httpd/httpd'.  

Will that work?


  ------
  Ken Williams Last Bastion of Euclidity
  [EMAIL PROTECTED]The Math Forum




RE: mod_perl with authen::Smb

2000-02-10 Thread Clifford Lang

>From the Apache::AuthenSmb docs

##
NAME
 Apache::AuthenSMB - mod_perl NT Authentication module

SYNOPSIS
 
 # This is the standard authentication stuff
 AuthName "Foo Bar Authentication"
 AuthType Basic

 # Variables you need to set, you must set at least
 # the myPDC variable, the DOMAIN defaults to WORKGROUP
 PerlSetVar myPDC workgroup-pdc
 PerlSetVar myBDC workgroup-bdc
 PerlSetVar myDOMAIN WORKGROUP

 PerlAuthenHandler Apache::AuthenSmb

 # Standard require stuff, only user and
 # valid-user work currently
 require valid-user
 
##

What this means in you case is:

# Variables you need to set, you must set at least
# the myPDC variable, the DOMAIN defaults to WORKGROUP
PerlSetVar myPDC NHHQ
   # PerlSetVar myBDC workgroup-bdc
PerlSetVar myDOMAIN NHHQ


Cliff

-Original Message-
From: Sambit Nanda [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 10, 2000 11:06 AM
To: [EMAIL PROTECTED]
Subject: mod_perl with authen::Smb


Hi,
 
  i have installed apache_1.3.11 with openssl-0.9.4 and mod_per and mod_ssl 
  and every thing is working fine i need to user Authen::Smb for Nt user
authentication
  I installed Authen:Smb using cpan> install Apache::AuthenSmb and 
  Install Authen::Smb and both the product got installed with the message
Authen::Smb
  is update I also change the Httpd.conf file 

  AuthName  "NT secure area"
AuthType  Basic
PerlAuthenHandle  Apache::AuthenSmb
require   valid-user

and the file AuthenSmb.pm file Where i mentioned the PDC and WorkGroup name 
  
 
# This is the standard authentication stuff
AuthName "Foo Bar Authentication"
AuthType Basic

# Variables you need to set, you must set at least
# the myPDC variable, the DOMAIN defaults to WORKGROUP
PerlSetVar nhct-01 NHHQ
   # PerlSetVar myBDC workgroup-bdc
PerlSetVar NHHQ NHHQ

PerlAuthenHandler Apache::AuthenSmb

# Standard require stuff, only user and
# valid-user work currently
require valid-user




but, if i mentioned my nt username and password the browser is not able to
authenticate

i checked the log file and the message is as follows

[Thu Feb 10 10:57:19 2000] [error] access to / failed for 216.224.55.15,
reason:
 Apache::AuthenSmb - Configuration error, no PDC

The ip Address is mentioned of my Nt Workstation  not the NT PDC 

Please help me how toresolve the problem

Thanking You




Get Your Free, Private Email at http://www.nightmail.com

***

  Nightmail is sponsored by Friend Finder Personals.  With over
  5.0 million free personals ads, Friend Finder is the largest
  personals site on the Internet.  Get your free ad and meet people
  today at http://www.friendfinder.com

  Never forget a date again!  Have you tried ReminderEmail?
  http://reminderemail.com/go/nmm

***



Re: Apache::ASP and Apache::SSI problems

2000-02-10 Thread Perrin Harkins

On Thu, 10 Feb 2000 [EMAIL PROTECTED] wrote:
> Okay, I installed mod_perl, Apache::ASP and required modules like 
> Apache::Filter, and Apache::SSI.  (Note, some of the Apache:: modules will
> not isntall via CPAN.pm, they look for HTTP in some messed up directory
> where it oviously doesn't exist, you have to run make install manually or
> force the install through cpan which I have NO IDEA how to do).

>From the CPAN shell:
> force install Apache::SSI

All the Ken Williams modules have this problem in their test scripts.  Any
chance you could fix that Ken?  

- Perrin



Re: [HTML::Embperl] It's late and I'm getting a very odd error

2000-02-10 Thread Joshua Chamas

Jason Bodnar wrote:
> 
> I'm losing it. I've written applications like this countless times but I'm
> doing something wrong.
> 
> I've got a module called Apache::StoreFront. Right now it consists of:
> 
> package Apache::StoreFront;
> 
> 1;
> 
> There's more to it but I've cut it out to simplify things. It's in
> /$SERVER_ROOT/lib/perl/Apache
> 
> I have an embperl page that consists of:
> 
> [# MODULES #]
> [! use Apache::StoreFront !]
> 

I'm having a good day, so thought I'd give it a go, been there
with wasting hours on random bugs like this :( ..

[! use Apache::StoreFront; !]

You need the semicolon, in this case.  I duplicated your error
twice and each time it went away by adding the ;

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



$r->content_type clobbering outgoing headers

2000-02-10 Thread Aaron Ross

Hi!
 
 I have an access handler that uses $r->headers_out->add to add a set-cookie
header:

  $r->headers_out->add("Set-cookie"=>$sesc);

 If i try to access this in my ContentHandler, actually HTML::Mason, i find
a strange problem: Calling $r->content_type wipes out the header!

>From the handler.pl:

 sub handler
 {
my ($r) = @_;

$r->headers_out->do(sub { my ($k,$v) = @_; $r->log_error("OUT: $k=>$v"); 1; });

return -1 if -e $r->finfo && $r->content_type && $r->content_type !~ m|^text/|i;

$r->headers_out->do(sub { my ($k,$v) = @_; $r->log_error("OUT: $k=>$v"); 1; });
 
  snip 

 }

 The first do call works fine returning something like this:

[Thu Feb 10 12:11:47 2000] [error] OUT: Set-cookie=>MF_Session=14&950202707; 
domain=.mathforum.com; path=/

 The second returns nothing at all.

 Commenting out the content-type line fixes the problem... However, I like
that line and want it to stay!!!

 TIA,
  Confused in Swarthmore, aka Aaron




Re: [SITE] possible structure suggestion

2000-02-10 Thread Leslie Mikesell

According to Matt Sergeant:
> >This would be cool. However, in at least a few cases, the PHP docs leave
> > something to be desired. I remember looking up the Oracle connect calls for
> > PHP online once (for 3.0), and having people hold a debate about how a
> > function really worked, because the docs were wrong, but no one really
> > knew what was right--one guy would say, "I think it really returns THIS," 
> > and another would respond with, "No, I think it returns THAT." Gives you a 
> > nice warm and fuzzy feeling about quality of documentation... :)
> 
> Of course they could have just resolved it by looking at the source :)

But when the documentation and source disagree, chances are that
both are wrong.

  Les Mikesell
   [EMAIL PROTECTED]



Re: [HTML::Embperl] It's late and I'm getting a very odd error

2000-02-10 Thread Cliff Rayman

try:
[! use Apache::StoreFront; !]

notice the semicolon.
gerald has written about this before so you can
find more details in the archives.

cliff rayman
genwax.com

Jason Bodnar wrote:

> I'm losing it. I've written applications like this countless times but I'm
> doing something wrong.
>
> I've got a module called Apache::StoreFront. Right now it consists of:
>
> package Apache::StoreFront;
>
> 1;
>
> There's more to it but I've cut it out to simplify things. It's in
> /$SERVER_ROOT/lib/perl/Apache
>
> I have an embperl page that consists of:
>
> [# MODULES #]
> [! use Apache::StoreFront !]
>
> 
> 
> Hello World!
> 
> 
>
> When I go to the page I get the following error:
>
> [5602]ERR: 24: Line 2: Error in Perl code: syntax error at
> /opt/apache/dw3.tivoli.com/81/lib/perl/Apache/StoreFront.pm line 1, near
> "package
> Apache::StoreFront"
> BEGIN failed--compilation aborted (in cleanup) syntax error at
> /opt/apache/dw3.tivoli.com/81/lib/perl/Apache/StoreFront.pm line 1, near
> "package Apache::StoreFront"
> BEGIN failed--compilation aborted at
> /opt/apache/dw3.tivoli.com/81/htdocs/home/people/orgchart/test.phtml line 2.
>
> Apache is configured correctly because other embperl stuff works so please
> point out some incredibly stupid mistake so I can shoot myself and then finish
> this project.
>
> Oh yeah, if all goes well and management doesn't hassle me, mod_perl will have
> a shopping cart system for use with embedded perl languages.
>
> Thanks for your help.
> ---
> Jason Bodnar + [EMAIL PROTECTED] + Tivoli Systems
>
> That boy wouldn't know the difference between the Internet and a hair net. --
> Jason Bodnar



Re: exit signal Alarm Clock (14)

2000-02-10 Thread Bill Moseley

Still still trying to figure this out:

I get about 10 or 20 exit signal Alarm Clock (14) messages a day -- out of
15,000+ requests.  Not very many.

I log the PID of my mod_perl script each request, and for each 'exit signal
Alarm Clock (14)' there seems to be a mod_perl request about 5 minutes and
two or three seconds before the time of the Alarm message in the main log
file.

The Apache Timeout setting is 5 minutes.

So it would seem that my mod_perl script is somehow not restoring
$SIG{ALRM} in some cases, even though it's localized in an eval block.
That is, the Apache Timeout is triggering an alarm, but there's no handler
to catch it.  I'm always calling alarm( 0 ) after exiting the block.

I have failed to duplicate the error message on a test server.  I've tried
a server with only one child process, running the mod_perl script, then
running another mod_cgi script that just sits for longer than the Timeout
setting.  But it times out as expected without killing the process.

I could try using Sys::Signal, but I understand that's not need with
$SIG{ALRM}.  Besides, I do see other normal timeouts (e.g. send body timed
out) in the server log file.  So it's not happening all the time.

Any suggestion on what else to look at?

BTW -- I did remove the CORE:: from CORE::sub {} as Stas suggested.


Bill Moseley
mailto:[EMAIL PROTECTED]



Re: [SITE] possible structure suggestion

2000-02-10 Thread Bill


Matt Sergeant wrote:
> 
> >
> >This would be cool. However, in at least a few cases, the PHP docs leave
> > something to be desired. I remember looking up the Oracle connect calls for
> > PHP online once (for 3.0), and having people hold a debate about how a
> > function really worked, because the docs were wrong, but no one really
> > knew what was right--one guy would say, "I think it really returns THIS,"
> > and another would respond with, "No, I think it returns THAT." Gives you a
> > nice warm and fuzzy feeling about quality of documentation... :)
> 
> Of course they could have just resolved it by looking at the source :)
> 
> --
> 

   Yeah, given enough scrutiny and/or experimentation, none of these sorts
of problems are difficult to solve, specifically. But it takes time to
sort all these things out, which is why having good, accurate 
documentation is a worthy goal. :) The page in question {I believe) is:

http://www.php.net/manual/function.ora-parse.php3

...if you're curious. :)

- Bill



[HTML::Embperl] It's late and I'm getting a very odd error

2000-02-10 Thread Jason Bodnar

I'm losing it. I've written applications like this countless times but I'm
doing something wrong.

I've got a module called Apache::StoreFront. Right now it consists of:

package Apache::StoreFront;

1;

There's more to it but I've cut it out to simplify things. It's in
/$SERVER_ROOT/lib/perl/Apache

I have an embperl page that consists of:

[# MODULES #]
[! use Apache::StoreFront !]



Hello World!



When I go to the page I get the following error:

[5602]ERR: 24: Line 2: Error in Perl code: syntax error at
/opt/apache/dw3.tivoli.com/81/lib/perl/Apache/StoreFront.pm line 1, near
"package
Apache::StoreFront" 
BEGIN failed--compilation aborted (in cleanup) syntax error at
/opt/apache/dw3.tivoli.com/81/lib/perl/Apache/StoreFront.pm line 1, near
"package Apache::StoreFront" 
BEGIN failed--compilation aborted at
/opt/apache/dw3.tivoli.com/81/htdocs/home/people/orgchart/test.phtml line 2.

Apache is configured correctly because other embperl stuff works so please
point out some incredibly stupid mistake so I can shoot myself and then finish
this project.

Oh yeah, if all goes well and management doesn't hassle me, mod_perl will have
a shopping cart system for use with embedded perl languages.

Thanks for your help.
---
Jason Bodnar + [EMAIL PROTECTED] + Tivoli Systems

That boy wouldn't know the difference between the Internet and a hair net. --
Jason Bodnar



Re: Apache::ASP and Apache::SSI problems

2000-02-10 Thread ericb

No the ssi_filter.ssi example does not work. And I tried preloading
Apache::ASP and Apache::SSI but not Apache::Filter I downloaded the l
I'm reinstalling right now, so I'll let you know.

Thanks

Enry

On Thu, 10 Feb 2000, Joshua Chamas wrote:

> [EMAIL PROTECTED] wrote:
> > 
> > Here is my statement:
> > 
> > 
> > SetHandler perl-script
> > PerlHandler Apache::ASP Apache::SSI
> > PerlSetVar NoCache 1
> > PerlSetVar Global /tmp/
> > PerlSetVar Filter On
> > PerlSetVar Dynamic Includes 0
> > PerlSetVar StateDB DB_File
> > PerlSetVar GlobalPackage main
> > PerlSetVar Debug
> > PerlSetVar UseStrict 1
> > 
> > 
> > And in error_log I get the message
> > [date..] [err]r Can't locate object method "filter_input" via package
> > "Apache" at /usr/lib/perl5/site_perl/Apache/SSI.pm line 28
> > 
> 
> Your config looks fine.  Apache::Filter when loaded should
> define the filter_input method.  Try preloading Apache::Filter 
> with "PerlModule Apache::Filter" in your httpd.conf, and perhaps
> also try preloading Apache::ASP.  Apache::ASP should load
> Apache::Filter automatically in this case, so your results
> seem odd.
> 
> Question, does the ./site/eg/ssi_filter.ssi example work
> for you?  Then we probably just have a config problem here.
> 
> -- Joshua
> _
> Joshua Chamas Chamas Enterprises Inc.
> NodeWorks >> free web link monitoring Huntington Beach, CA  USA 
> http://www.nodeworks.com1-714-625-4051
> 



Re: Apache::ASP and Apache::SSI problems

2000-02-10 Thread Joshua Chamas

[EMAIL PROTECTED] wrote:
> 
> Here is my statement:
> 
> 
> SetHandler perl-script
> PerlHandler Apache::ASP Apache::SSI
> PerlSetVar NoCache 1
> PerlSetVar Global /tmp/
> PerlSetVar Filter On
> PerlSetVar Dynamic Includes 0
> PerlSetVar StateDB DB_File
> PerlSetVar GlobalPackage main
> PerlSetVar Debug
> PerlSetVar UseStrict 1
> 
> 
> And in error_log I get the message
> [date..] [err]r Can't locate object method "filter_input" via package
> "Apache" at /usr/lib/perl5/site_perl/Apache/SSI.pm line 28
> 

Your config looks fine.  Apache::Filter when loaded should
define the filter_input method.  Try preloading Apache::Filter 
with "PerlModule Apache::Filter" in your httpd.conf, and perhaps
also try preloading Apache::ASP.  Apache::ASP should load
Apache::Filter automatically in this case, so your results
seem odd.

Question, does the ./site/eg/ssi_filter.ssi example work
for you?  Then we probably just have a config problem here.

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



Re: mod_perl (preferably Embperl) based shopping cart?

2000-02-10 Thread Edward Moon

Check out .

I don't recall if they use mod_perl or Embperl, but I do know that they
use Perl (gee is that vague enough :).

On Thu, 10 Feb 2000, Jason Bodnar wrote:

> A while ago somebody posted that they were working on an open source shopping
> cart using mod_perl. Did anything come of that?
> 
> I'm wroking with minivend right now and, well, it's not very nice.
> 
> What would be nice is to have a perl Minivend API (since it's so full-featured)
> so you could create your pages with Embperl, ePerl, Apache::ASP, etc and still
> use the MiniVend backend.
> 
> ---
> Jason Bodnar + [EMAIL PROTECTED] + Tivoli Systems
> 
> In Jail Rock house Rock, he was everything Rockabilly's about.
> No, I mean he is Rockabilly. Mean, Surly, Nasty, Brute.
> I mean in that movie he couldn't give a  about nothin'.
> Just rockin' and rollin', livin' fast, dying young, leavin' a good lookin'
> corpse.
> 
> --Clarence Worley, True Romance
> 



mod_perl with authen::Smb

2000-02-10 Thread Sambit Nanda

Hi,
 
  i have installed apache_1.3.11 with openssl-0.9.4 and mod_per and mod_ssl 
  and every thing is working fine i need to user Authen::Smb for Nt user authentication
  I installed Authen:Smb using cpan> install Apache::AuthenSmb and 
  Install Authen::Smb and both the product got installed with the message Authen::Smb
  is update I also change the Httpd.conf file 

  AuthName  "NT secure area"
AuthType  Basic
PerlAuthenHandle  Apache::AuthenSmb
require   valid-user

and the file AuthenSmb.pm file Where i mentioned the PDC and WorkGroup name 
  
 
# This is the standard authentication stuff
AuthName "Foo Bar Authentication"
AuthType Basic

# Variables you need to set, you must set at least
# the myPDC variable, the DOMAIN defaults to WORKGROUP
PerlSetVar nhct-01 NHHQ
   # PerlSetVar myBDC workgroup-bdc
PerlSetVar NHHQ NHHQ

PerlAuthenHandler Apache::AuthenSmb

# Standard require stuff, only user and
# valid-user work currently
require valid-user




but, if i mentioned my nt username and password the browser is not able to authenticate

i checked the log file and the message is as follows

[Thu Feb 10 10:57:19 2000] [error] access to / failed for 216.224.55.15, reason:
 Apache::AuthenSmb - Configuration error, no PDC

The ip Address is mentioned of my Nt Workstation  not the NT PDC 

Please help me how toresolve the problem

Thanking You




Get Your Free, Private Email at http://www.nightmail.com

***

  Nightmail is sponsored by Friend Finder Personals.  With over
  5.0 million free personals ads, Friend Finder is the largest
  personals site on the Internet.  Get your free ad and meet people
  today at http://www.friendfinder.com

  Never forget a date again!  Have you tried ReminderEmail?
  http://reminderemail.com/go/nmm

***



mod_perl with authen::Smb

2000-02-10 Thread Sambit Nanda

Hi,
 
  i have installed apache_1.3.11 with openssl-0.9.4 and mod_per and mod_ssl 
  and every thing is working fine i need to user Authen::Smb for Nt user authentication
  I installed Authen:Smb using cpan> install Apache::AuthenSmb and 
  Install Authen::Smb and both the product got installed with the message Authen::Smb
  is update I also change the Httpd.conf file 

  AuthName  "NT secure area"
AuthType  Basic
PerlAuthenHandle  Apache::AuthenSmb
require   valid-user

and the file AuthenSmb.pm file Where i mentioned the PDC and WorkGroup name 
  
 
# This is the standard authentication stuff
AuthName "Foo Bar Authentication"
AuthType Basic

# Variables you need to set, you must set at least
# the myPDC variable, the DOMAIN defaults to WORKGROUP
PerlSetVar nhct-01 NHHQ
   # PerlSetVar myBDC workgroup-bdc
PerlSetVar NHHQ NHHQ

PerlAuthenHandler Apache::AuthenSmb

# Standard require stuff, only user and
# valid-user work currently
require valid-user




but, if i mentioned my nt username and password the browser is not able to authenticate

i checked the log file and the message is as follows

[Thu Feb 10 10:57:19 2000] [error] access to / failed for 216.224.55.15, reason:
 Apache::AuthenSmb - Configuration error, no PDC

The ip Address is mentioned of my Nt Workstation  not the NT PDC 

Please help me how toresolve the problem

Thanking You




Get Your Free, Private Email at http://www.nightmail.com

***

  Nightmail is sponsored by Friend Finder Personals.  With over
  5.0 million free personals ads, Friend Finder is the largest
  personals site on the Internet.  Get your free ad and meet people
  today at http://www.friendfinder.com

  Never forget a date again!  Have you tried ReminderEmail?
  http://reminderemail.com/go/nmm

***



Re: $r->print delay?

2000-02-10 Thread Ken Williams

What context is this in?  Are you using anything like Embperl, Mason, etc. that
might buffer the entire output in order to find the content-length?

Any difference if you change it to print() instead of $r->print(), or if you
break it into lines and print each line?

Actually, I bet that last trick might work.


[EMAIL PROTECTED] (Ed Loehr) wrote:
>Ken Williams wrote:
>> 
>> Are you sure it's waiting?  You might try debug timestamps before &
>> after the $r->print().  You might also be interested in the send_fd()
>> method if the data are in a file.
>
>Fairly certain it's waiting there.  I cut my debug timestamps out for
>ease on your eyes in my earlier post, but here's one output (of many
>like it) when I had the print sandwiched...
>
>Thu Feb 10 14:41:59.053 2000 [v1.3.7.1 2227:1 ed:1]  INFO : Sending
>120453 bytes to client...
>Thu Feb 10 14:42:14.463 2000 [v1.3.7.1 2227:1 ed:1]  INFO : Send of
>120453 bytes completed.
>
>Re send_fd(), it's all dynamically generated data, so that's not an
>option...
>
>Other clues?
>
>> [EMAIL PROTECTED] (Ed Loehr) wrote:
>> >Any ideas on why would this output statement takes 15-20 seconds to
>> >send a 120kb page to a browser on the same host?
>> >
>> >$| = 1;  # Don't buffer anything...send it asap...
>> >$r->print( $data );
>> >
>> >modperl 1.21, apache/modssl 1.3.9-2.4.9...lightly loaded Linux (RH6.1)
>> >Dual PIII 450Mhz with local netscape 4.7 client...
>

  ------
  Ken Williams Last Bastion of Euclidity
  [EMAIL PROTECTED]The Math Forum




RE: How can I share mod_perl config info with shell perl processe s?

2000-02-10 Thread Stas Bekman

> I like the idea of using LWP to get config info, but what if the server is
> down?

What? Your server can be found in down state? :)

> I guess you could do a httpd -X, or is there another way?

There are many ways to do that. See the watchdog section in the guide...

> 
> Thanks, Cliff 
> 
> -Original Message-
> From: Stas Bekman
> To: Clifford Lang
> Cc: [EMAIL PROTECTED]
> Sent: 2/10/00 5:59 AM
> Subject: Re: How can I share mod_perl config info with shell perl processes?
> 
> > I have data I need access to via WEB or filesystem. or more correctly
> with
> > email.  Since the data lives in Web server territory, my
> Apache/mod_perl
> > configuration files know where everything is -
> > 
> > What I think I would like to do, is when the mail process starts up,
> I'd
> > like to reach inside of apache and pull configuration data right out
> from
> > the active server.  Is this possible?  I know I can dump config data
> from
> > between  blocks, but I believe that is static at startup.
> I'd
> > like to take advantage of the Active servers memory cache if I could -
> some
> > how access the same memory pool - check whos on-line and such.
> > 
> > I'm I going places I should?  If not could someone point me in the
> right
> > direction?
> 
> Take a look at Apache::Scoreboard it knows to fetch the scoreboard info
> from remote server. I guess in the same fashion you can write a module
> to
> connect and retrieve other data as well.
> 
> But wait, why not to write a script/handler that will deliver all the
> required data on request? Use LWP for retrieval and Storable or/and
> Data::Dumper for easy serialization and later restore.
> 
> ___
> Stas Bekmanmailto:[EMAIL PROTECTED]  http://www.stason.org/stas
> Perl,CGI,Apache,Linux,Web,Java,PC http://www.stason.org/stas/TULARC
> perl.apache.orgmodperl.sourcegarden.org   perlmonth.comperl.org
> single o-> + single o-+ = singlesheavenhttp://www.singlesheaven.com
> 



___
Stas Bekmanmailto:[EMAIL PROTECTED]  http://www.stason.org/stas
Perl,CGI,Apache,Linux,Web,Java,PC http://www.stason.org/stas/TULARC
perl.apache.orgmodperl.sourcegarden.org   perlmonth.comperl.org
single o-> + single o-+ = singlesheavenhttp://www.singlesheaven.com



How do I send a 404 from Embperl?

2000-02-10 Thread Alan Gutierrez

I am attempting to send a 404 not found message from an Embperl script. Here
is the code I am trying to use in its simplest form. This is test.html. Note
that it contains no HTML.

[-
  $req_rec->status('404');
  $req_rec->header_out('Content-Length' => undef);
  exit;
-]

Normally, a 404 looks from Apache looks like this:

GET /monkey.html HTTP/1.0

HTTP/1.1 404 Not Found
Date: Thu, 10 Feb 2000 20:43:34 GMT
Server: Apache/1.3.9 (Unix) mod_perl/1.21
Connection: close
Content-Type: text/html



404 Not Found

Not Found
The requested URL /monkey.html was not found on this server.

Apache/1.3.9 Server at sauron.mindsinc.com Port 8386

Connection closed by foreign host.

I left the "Connection closed ..." so we could see where exactly the
documents end.

Here is the output from test.html:

GET /mtn-dev/resources/test.html HTTP/1.0

HTTP/1.1 404 Not Found
Date: Thu, 10 Feb 2000 20:40:17 GMT
Server: Apache/1.3.9 (Unix) mod_perl/1.21
Content-Length: 2
Connection: close
Content-Type: text/html


Connection closed by foreign host.

Oh! So close! But the Content-Length makes the client think that there is
something worth displaying. Both NS and IE show a blank page. What I'd
rather see is the server's error page.

The question: How do I keep Embperl from adding the content length to the
headers when I want to send an error message?

Alan Gutierrez - [EMAIL PROTECTED]



Re: $r->print delay?

2000-02-10 Thread Greg Stark


Ed Loehr <[EMAIL PROTECTED]> writes:

> > [EMAIL PROTECTED] (Ed Loehr) wrote:
> > >Any ideas on why would this output statement takes 15-20 seconds to
> > >send a 120kb page to a browser on the same host?
> > >
> > >$| = 1;  # Don't buffer anything...send it asap...
> > >$r->print( $data );

You don't say how many lines your 120kb of data is. If it's about 40
characters per line average that's 30k calls to write (because you turned
buffering off). Calls to write ought to be around 100us but if they were slow
for some reason and took 500us then that would explain the 15s.

Additionally you're probably filling the kernel buffer and forcing a context
switch several times. If the buffer is about 4k then there would be 3k context
switches each about 10ms on linux, or about 30s of latency. There was a debate
over the usefulness of the ProxyReceiveBuffer parameter, and even that isn't
the same as this buffer, but it ought to be possible for Apache to setsockopt
to ask for a larger buffer.

In short, don't set $|=1, it will only slow down this process, and investigate
if there's any way to increase the size of the kernel buffer for the socket in
Apache. Lots of people would be interested to know if you turn up anything
there.


-- 
greg



Re: [SITE] possible structure suggestion

2000-02-10 Thread Bill


Matt Sergeant wrote:
> 
> Something I'd really love to see, is documentation to the extent that the
> php site has docs. And thier docs are user-annotatable, which is a really
> cool feature.
> 
> --
> 

   This would be cool. However, in at least a few cases, the PHP docs leave
something to be desired. I remember looking up the Oracle connect calls for
PHP online once (for 3.0), and having people hold a debate about how a
function really worked, because the docs were wrong, but no one really
knew what was right--one guy would say, "I think it really returns THIS," 
and another would respond with, "No, I think it returns THAT." Gives you a 
nice warm and fuzzy feeling about quality of documentation... :)

- Bill



Re: [SITE] possible structure suggestion

2000-02-10 Thread Matt Sergeant

On Thu, 10 Feb 2000, Bill wrote:
> Matt Sergeant wrote:
> > 
> > Something I'd really love to see, is documentation to the extent that the
> > php site has docs. And thier docs are user-annotatable, which is a really
> > cool feature.
> > 
> > --
> > 
> 
>This would be cool. However, in at least a few cases, the PHP docs leave
> something to be desired. I remember looking up the Oracle connect calls for
> PHP online once (for 3.0), and having people hold a debate about how a
> function really worked, because the docs were wrong, but no one really
> knew what was right--one guy would say, "I think it really returns THIS," 
> and another would respond with, "No, I think it returns THAT." Gives you a 
> nice warm and fuzzy feeling about quality of documentation... :)

Of course they could have just resolved it by looking at the source :)

-- 


Details: FastNet Software Ltd - XML, Perl, Databases.
Tagline: High Performance Web Solutions
Web Sites: http://come.to/fastnet http://sergeant.org
Available for Consultancy, Contracts and Training.



Re: $r->print delay?

2000-02-10 Thread Ken Williams

Are you sure it's waiting?  You might try debug timestamps before & after the
$r->print().  You might also be interested in the send_fd() method if the data
are in a file.

[EMAIL PROTECTED] (Ed Loehr) wrote:
>Any ideas on why would this output statement takes 15-20 seconds to
>send a 120kb page to a browser on the same host?
>
>sub send_it {
>my ($r, $data) = @_;
>
>$| = 1;  # Don't buffer anything...send it asap...
>$r->print( $data );
>}   
>
>modperl 1.21, apache/modssl 1.3.9-2.4.9...lightly loaded Linux (RH6.1)
>Dual PIII 450Mhz with local netscape 4.7 client...
>

  ------
  Ken Williams Last Bastion of Euclidity
  [EMAIL PROTECTED]The Math Forum




Re: $r->print delay?

2000-02-10 Thread Ed Loehr

Ken Williams wrote:
> 
> Are you sure it's waiting?  You might try debug timestamps before & after the
> $r->print().  You might also be interested in the send_fd() method if the data
> are in a file.

Fairly certain it's waiting there.  I cut my debug timestamps out for
ease on your eyes in my earlier post, but here's one output (of many
like it) when I had the print sandwiched...

Thu Feb 10 14:41:59.053 2000 [v1.3.7.1 2227:1 ed:1]  INFO : Sending
120453 bytes to client...
Thu Feb 10 14:42:14.463 2000 [v1.3.7.1 2227:1 ed:1]  INFO : Send of
120453 bytes completed.

Re send_fd(), it's all dynamically generated data, so that's not an
option...

Other clues?

> [EMAIL PROTECTED] (Ed Loehr) wrote:
> >Any ideas on why would this output statement takes 15-20 seconds to
> >send a 120kb page to a browser on the same host?
> >
> >$| = 1;  # Don't buffer anything...send it asap...
> >$r->print( $data );
> >
> >modperl 1.21, apache/modssl 1.3.9-2.4.9...lightly loaded Linux (RH6.1)
> >Dual PIII 450Mhz with local netscape 4.7 client...



Re: $r->content_type clobbering outgoing headers

2000-02-10 Thread Aaron Ross

hi all!

 the problem is me. the handler works fine with a full, existing path. the
problem occurs when i think that a request for a directory is just like a 
request for a file, which is isn't. 
 basically, i need to handle setting cookies with a redirect, then this 
problem along with a related one for images go away.

 sorry to bother you all, 

aaron 

 

> hi Tim!
> 
>  tried it. didn't work.
> 
>  what difference were you thinking that might make? maybe there is another
> way to achieve it.
> 
> Aaron
> 
> > Try retrieving the content type and then working on that scalar.
> > 
> > my $ct = $r->content_type;
> > return -1 if ((-e $r->finfo) && $ct && ($ct !~ m|^text/|i));
> > 
> > 
> > Thanks,
> > 
> > Tim Tompkins
> > --
> > Programmer / IS Technician
> > http://www.arttoday.com/
> > 
> > 
> > - Original Message -
> > From: Aaron Ross <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Thursday, February 10, 2000 10:16 AM
> > Subject: $r->content_type clobbering outgoing headers
> > 
> > 
> > > Hi!
> > >
> > >  I have an access handler that uses $r->headers_out->add to add a
> > set-cookie
> > > header:
> > >
> > >   $r->headers_out->add("Set-cookie"=>$sesc);
> > >
> > >  If i try to access this in my ContentHandler, actually HTML::Mason, i
> > find
> > > a strange problem: Calling $r->content_type wipes out the header!
> > >
> > > >From the handler.pl:
> > >
> > >  sub handler
> > >  {
> > > my ($r) = @_;
> > >
> > > $r->headers_out->do(sub { my ($k,$v) = @_; $r->log_error("OUT:
> > $k=>$v"); 1; });
> > >
> > > return -1 if -e $r->finfo && $r->content_type && $r->content_type !~
> > m|^text/|i;
> > >
> > > $r->headers_out->do(sub { my ($k,$v) = @_; $r->log_error("OUT:
> > $k=>$v"); 1; });
> > >
> > >   snip 
> > >
> > >  }
> > >
> > >  The first do call works fine returning something like this:
> > >
> > > [Thu Feb 10 12:11:47 2000] [error] OUT:
> > Set-cookie=>MF_Session=14&950202707; domain=.mathforum.com; path=/
> > >
> > >  The second returns nothing at all.
> > >
> > >  Commenting out the content-type line fixes the problem... However, I like
> > > that line and want it to stay!!!
> > >
> > >  TIA,
> > >   Confused in Swarthmore, aka Aaron
> > >
> > >



Apache::ASP and Apache::SSI problems

2000-02-10 Thread ericb

Okay, I installed mod_perl, Apache::ASP and required modules like 
Apache::Filter, and Apache::SSI.  (Note, some of the Apache:: modules will
not isntall via CPAN.pm, they look for HTTP in some messed up directory
where it oviously doesn't exist, you have to run make install manually or
force the install through cpan which I have NO IDEA how to do).

Anhow, Apache::ASP works fine, mod_perl works fine, no complaints from
anyone.  However, Apache::SSI will not run on top of Apache::ASP.

Here is my statement:


SetHandler perl-script
PerlHandler Apache::ASP Apache::SSI
PerlSetVar NoCache 1
PerlSetVar Global /tmp/
PerlSetVar Filter On
PerlSetVar Dynamic Includes 0
PerlSetVar StateDB DB_File
PerlSetVar GlobalPackage main
PerlSetVar Debug
PerlSetVar UseStrict 1


And in error_log I get the message  
[date..] [err]r Can't locate object method "filter_input" via package 
"Apache" at /usr/lib/perl5/site_perl/Apache/SSI.pm line 28

I just installed all the modules off CPAN yesterday.

I have a distinct feeling that mod_perl is not configured
properly.  I let CPAN do the installation and I put 
AddModule mod_perl.c
in my httpd.conf.
Is there anything else to do? 

PS I am running apache 1.3.9
PPS I am downloading 1.3.11

Eric



??? Proxy request order

2000-02-10 Thread Clifford Lang

I have a production UltraSparc-1 server running Solaris 2.5.1, Apache-1.3.9,
mod_perl-1.21, MySql, (168mhz, 512MB ram). I am at the edge of memory usage,
and occasionally even swap (bad I know).

I don't have a development box so I want to try something with out breaking
whats working already.

I want to leave my core server alone, but insert a proxy rule for all
^/images/ on my server and redirect them to a light weight Apache server
running on the same box.

The average memory "RES" is 6-7Meg per child.  I remember running a light
weight sever before and it was just over 1Meg each.


Now - to my real question:  
Is this order big-server -> little-server going to benifit me much?  Would
just a simple ReWrite proxy rule do it?  I know the normal order would be
little -> big, but I think thats a bit risky at this point.

TIA,  Cliff



PerlDispatchHandler for error handling?

2000-02-10 Thread David Harris

Hey,

Does anybody know how to use PerlDispatchHandler to somehow trap errors in
perl? I think I remember somebody mentioning that... I've been looking around
and I can't find too much of any documentation about what PerlDispatchHandler
actually does. (Already checked the archives and www.modperl.com.) Anybody know
what actually PerlDispatchHandler does? :-)

 - David Harris
   Principal Engineer, DRH Internet Services




$r->print delay?

2000-02-10 Thread Ed Loehr

Any ideas on why would this output statement takes 15-20 seconds to
send a 120kb page to a browser on the same host?

sub send_it {
my ($r, $data) = @_;

$| = 1;  # Don't buffer anything...send it asap...
$r->print( $data );
}   

modperl 1.21, apache/modssl 1.3.9-2.4.9...lightly loaded Linux (RH6.1)
Dual PIII 450Mhz with local netscape 4.7 client...



Re: Site unique MAC secret

2000-02-10 Thread Bill Jones

Won't work...

Matt has control over his system - but not mine -- see?  -Sneex-  :]

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

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

--- Quoting Fixed ---
> From: Greg Stark <[EMAIL PROTECTED]>
 
> I don't understand, just take the first 1k of data from /dev/random and store
> that in a file somewhere. Protect that file appropriately, and use the
> contents of it. It's completely under your control and you can distribute it
> to share the secret across several load balanced hosts.
> 
> Why would you look for things that aren't under your control and would tie you
> to your ethernet card or particular hardware or whatever?


>> Matt Sergeant <[EMAIL PROTECTED]> writes:
>> 
>> But it's sensitive to perl upgrades. I'm pretty certain there must be
>> _something_ I can use. I'm thinking perhaps of join('', `ls -la
>> $some_dir_created_on_install`), but again, the sysadmin could easily
>> inadvertently touch something in that dir.



Re: ??? Proxy request order

2000-02-10 Thread Vivek Khera

> "CL" == Clifford Lang <[EMAIL PROTECTED]> writes:

CL> Now - to my real question:  
CL> Is this order big-server -> little-server going to benifit me much?  Would
CL> just a simple ReWrite proxy rule do it?  I know the normal order would be
CL> little -> big, but I think thats a bit risky at this point.

But you can test it trivially.   Just set up the "little" server on an
alternate port.  Once you have it working and are satisfied, just
switch the ports on the config files and restart the httpds.




mod_perl (preferably Embperl) based shopping cart?

2000-02-10 Thread Jason Bodnar

A while ago somebody posted that they were working on an open source shopping
cart using mod_perl. Did anything come of that?

I'm wroking with minivend right now and, well, it's not very nice.

What would be nice is to have a perl Minivend API (since it's so full-featured)
so you could create your pages with Embperl, ePerl, Apache::ASP, etc and still
use the MiniVend backend.

---
Jason Bodnar + [EMAIL PROTECTED] + Tivoli Systems

In Jail Rock house Rock, he was everything Rockabilly's about.
No, I mean he is Rockabilly. Mean, Surly, Nasty, Brute.
I mean in that movie he couldn't give a  about nothin'.
Just rockin' and rollin', livin' fast, dying young, leavin' a good lookin'
corpse.

--Clarence Worley, True Romance



Re: $r->content_type clobbering outgoing headers

2000-02-10 Thread Aaron Ross

hi Tim!

 tried it. didn't work.

 what difference were you thinking that might make? maybe there is another
way to achieve it.

Aaron

> Try retrieving the content type and then working on that scalar.
> 
> my $ct = $r->content_type;
> return -1 if ((-e $r->finfo) && $ct && ($ct !~ m|^text/|i));
> 
> 
> Thanks,
> 
> Tim Tompkins
> --
> Programmer / IS Technician
> http://www.arttoday.com/
> 
> 
> - Original Message -
> From: Aaron Ross <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, February 10, 2000 10:16 AM
> Subject: $r->content_type clobbering outgoing headers
> 
> 
> > Hi!
> >
> >  I have an access handler that uses $r->headers_out->add to add a
> set-cookie
> > header:
> >
> >   $r->headers_out->add("Set-cookie"=>$sesc);
> >
> >  If i try to access this in my ContentHandler, actually HTML::Mason, i
> find
> > a strange problem: Calling $r->content_type wipes out the header!
> >
> > >From the handler.pl:
> >
> >  sub handler
> >  {
> > my ($r) = @_;
> >
> > $r->headers_out->do(sub { my ($k,$v) = @_; $r->log_error("OUT:
> $k=>$v"); 1; });
> >
> > return -1 if -e $r->finfo && $r->content_type && $r->content_type !~
> m|^text/|i;
> >
> > $r->headers_out->do(sub { my ($k,$v) = @_; $r->log_error("OUT:
> $k=>$v"); 1; });
> >
> >   snip 
> >
> >  }
> >
> >  The first do call works fine returning something like this:
> >
> > [Thu Feb 10 12:11:47 2000] [error] OUT:
> Set-cookie=>MF_Session=14&950202707; domain=.mathforum.com; path=/
> >
> >  The second returns nothing at all.
> >
> >  Commenting out the content-type line fixes the problem... However, I like
> > that line and want it to stay!!!
> >
> >  TIA,
> >   Confused in Swarthmore, aka Aaron
> >
> >



Re: Perl and SQL, which is the most scalable SQL server to use?

2000-02-10 Thread Ken Y. Clark

On Wed, 9 Feb 2000, Ryan, Aaron wrote:

> Hi,
> 
> We have designed a web site creator that uses
> Perl and DBI to work with MySQL.  The integration
> between the two was great, but recently our website has
> been over run with users and our poor MySQL database is showing
> some major slow downs. So we have two possible solutions we
> are researching.  Trying to optimize the MySQL to work better
> under these stressful condition (which are going to get worse) or
> moving the SQL server onto another machine with a more scalable SQL server
> such as Sybase.  
> 
> However, we would like to make the move with the least amount of perl code
> modification. So if we could replace the current DBI:MySQL calls with Sybase
> DBI:DBLib
> calls or the like, that would be very attractive.

at the very least, you should move mysql to a separate box, anyway.
3-tiered architecture should include physical and as well as logical
separation of presentation/logic/data/.

ky



Re: Perl and SQL, which is the most scalable SQL server to use?

2000-02-10 Thread Pascal Eeftinck

At 13:02 10-2-00 +0200, Stas Bekman wrote:
>On Thu, 10 Feb 2000, Leslie Mikesell wrote:
>
>> According to Ryan, Aaron:
>> 
>> > We found that we are quicking using up the max connections to the MySQL
>> > database 
>> > and when we raise the max connection, the performance gets worse. What
was
>> > MySQL designed
>> > to handle, should it be able to handle 2000 connections, or is that
outside
>> > the scope
>> > of the design of the server.
>> > 
>> > Does anyone have any suggestions or similar experiences with scaling.
>> 
>> Have you already taken the step of setting up a non-mod_perl proxy
>> front end and avoiding sending any unnecessary requests (images,
>> static html, etc.) to the database-connected backend?  If not, you
>> may be able to reduce the number of connections you need by a
>> factor of 10 or so.
>
>Plus using Mason to cache components to reduce the number of queries or
>any other method to cache the query results. I think you can also run more
>than one mysql server on the same DB... 

There are a couple of things to look out for.

For one, if you have multiple databases and you use persistent
database connections you'll quickly run out of your connections.
Assuming you have 4 different databases and 50 processes, it
doesn't take many requests to reach 200 database connections.
Disable persistent connections in that case. MySQL doesn't take
much of a performance hit without them anyway.

The number of connections your MySQL database can handle is
highly dependant of a lot of things such as the number of
tables you're using. Out of memory I believe it needs a
couple of file descriptors for every n tables that a
connection opens. (See docs for specific details). There
will be a time you run out of file descriptors ... I've
seen a properly configured server handle up to some 200
simultaneous connections [not queries, mostly idle
connections] I vaguely recall. But you really do want to
try to get that number down as best as possible.

You can gain quite a bit of performance by (a) bringing the
number of queries down and (b) making sure all your queries
have proper indexes. Try not to make a crazy amount of
updates either, as that means that your indexes have to
be maintained as well.

If you have very varying database needs (such as one db
with sessions, very frequently updated but tiny amounts
of data, and another with large sets of data that's hardly
ever updated) you might be able to gain a lot by running
two differently configured databases on one server. One
would benefit from lots of caching, the other would
probably reduce the efficiency of the cache but would gain
from fast disk access. Different usage profiles require
vastly different performance needs.

Basically consider every SQL query you have to do as one
too much. :) Using a module like HTML::Mason allows you
to cache the output of your page for a specified amount of
time, for example. If your page needs nothing more than an
hourly update but you have to do 15 queries to build it
and it's often accessed, Mason's caching might be a lot
faster instead. Besides, it will take some load off our
database as well, which might or might not be good
depending on your situation.

Grtz,
Pascal



Re: Apache::DBI woes

2000-02-10 Thread Greg Cope


From: "Adam Cassar" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: 09 February 2000 05:50
Subject: Apache::DBI woes


: Hello All,
:
: I have been having numerous problems with Apache::DBI, I have tried using
: PerlRequire startup.pl
:
: with startup.pl containing
: use Apache::DBI;
:
: and also tried
: PerlModule Apache::DBI;
:
: in httpd.conf
:
: with only this module loaded but to no success. I can load
Apache::Registry fine.
:
:
: basically my server refuses to start if I have it included in httpd.conf
: with no debugging output from apache
:
: version of ApacheDBI: 0.87
: version of DBI: 1.13
: database Postgres 6.5.2, dbd driver version 0.93
: mod_perl: 1.21
: apache: 1.3.11
:


Is this an Apache rpm and mod_perl rpm of redhat linux - if it is then it
may be a redhat rpm Apache::DBI problem that may not have been solved (to my
knowledge, could be wrong) - if it is an rpm install then try compling
everything from source - and see if it works.

Greg






RE: How can I share mod_perl config info with shell perl processes?

2000-02-10 Thread Clifford Lang

I like the idea of using LWP to get config info, but what if the server is
down?

I guess you could do a httpd -X, or is there another way?

Thanks, Cliff 

-Original Message-
From: Stas Bekman
To: Clifford Lang
Cc: [EMAIL PROTECTED]
Sent: 2/10/00 5:59 AM
Subject: Re: How can I share mod_perl config info with shell perl processes?

> I have data I need access to via WEB or filesystem. or more correctly
with
> email.  Since the data lives in Web server territory, my
Apache/mod_perl
> configuration files know where everything is -
> 
> What I think I would like to do, is when the mail process starts up,
I'd
> like to reach inside of apache and pull configuration data right out
from
> the active server.  Is this possible?  I know I can dump config data
from
> between  blocks, but I believe that is static at startup.
I'd
> like to take advantage of the Active servers memory cache if I could -
some
> how access the same memory pool - check whos on-line and such.
> 
> I'm I going places I should?  If not could someone point me in the
right
> direction?

Take a look at Apache::Scoreboard it knows to fetch the scoreboard info
from remote server. I guess in the same fashion you can write a module
to
connect and retrieve other data as well.

But wait, why not to write a script/handler that will deliver all the
required data on request? Use LWP for retrieval and Storable or/and
Data::Dumper for easy serialization and later restore.

___
Stas Bekmanmailto:[EMAIL PROTECTED]  http://www.stason.org/stas
Perl,CGI,Apache,Linux,Web,Java,PC http://www.stason.org/stas/TULARC
perl.apache.orgmodperl.sourcegarden.org   perlmonth.comperl.org
single o-> + single o-+ = singlesheavenhttp://www.singlesheaven.com



Re: [SITE] possible structure suggestion

2000-02-10 Thread G.W. Haywood

Hi all,

On Thu, 10 Feb 2000, Stas Bekman wrote:

> > >text
> >   - this is much easier obviously, however I've often heard people say
> > they thought text-navigation was easier with the navbar at the top
> > and bottom of the page. I'd like to have opinions on this, but
> > please let's avoid religion wars on this subject.
> 
> I think what you wanted/need to write here is a lynx compatibility for
> the impared folks and those who prefer text mode browsing.

For speed, I like to use Lynx but it's a pain with sites that have
navbars at the *top*.  Unless they have thought about it carefully
they are often not navigable with Lynx.

73,
Ged.




Re: Problems with configuration

2000-02-10 Thread G.W. Haywood

Hi there.

On Sun, 6 Feb 2000, al wrote:

> I'm having the following problems:

>   i) Occasionally, for not reason at all, I get 'The Document
> contained no data, try again later' errors on Netscape, and pressing
> reload usually gets rid of this. Also, nothing is logged in the
> error logs when this happens. Is there any way to get rid of this
> tempementality?

My guess is that it's your code that's tempermental.  See

http://perl.apache.org/guide

and look at (for example) "Sometimes it works, sometimes it doesn't".

>   ii) When I use 'print "Location: some_page.cgi\n\n";', it
> usually prints this on the screen. I have PerlSendHeader set to On,
> though I assumed this would parse existing headers appropriately.

Can you explain to me what you are trying to do here?

>   iii) Sometimes a dynamical script gets cached, though even
> when values that the script relies on change in the database, the
> page displayed doesn't report these changes.

Sound like you're not asking the database for the new values.  Time to
do some debugging.  It's in the Guide.

> I'm running mod_perl 1.19 and Apache 1.3.4.
> Does anyone have any idea if I'm doing something wrong?

I'd think about upgrading both, maybe after the 2 Feb CERT patch for
1.3.11 (or 1.3.12?) comes out.  How far away is 2.0.0, anybody?

73,
Ged.




Re: Commercial app demo

2000-02-10 Thread G.W. Haywood

Hi there,

On Thu, 10 Feb 2000, Fabrice Scemama wrote:

> There's another way. We can't build pre-compiled modules easily,
> but even when you code in C or Java, desassemblers can extract
> some source from the binaries you deliver. As far as perl scripts are
> concerned, a workaround consists in trivially removing all comments
> and \n from the source, which makes it as hard to understand as
> raw C desassembled code.

Perl is only *semi* free-format.  Removing \n will break much Perl
code, for example because of the use of the print <


Re: Perl and SQL, which is the most scalable SQL server to use?

2000-02-10 Thread Stas Bekman

On Thu, 10 Feb 2000, Leslie Mikesell wrote:

> According to Ryan, Aaron:
> 
> > We found that we are quicking using up the max connections to the MySQL
> > database 
> > and when we raise the max connection, the performance gets worse. What was
> > MySQL designed
> > to handle, should it be able to handle 2000 connections, or is that outside
> > the scope
> > of the design of the server.
> > 
> > Does anyone have any suggestions or similar experiences with scaling.
> 
> Have you already taken the step of setting up a non-mod_perl proxy
> front end and avoiding sending any unnecessary requests (images,
> static html, etc.) to the database-connected backend?  If not, you
> may be able to reduce the number of connections you need by a
> factor of 10 or so.

Plus using Mason to cache components to reduce the number of queries or
any other method to cache the query results. I think you can also run more
than one mysql server on the same DB... 


___
Stas Bekmanmailto:[EMAIL PROTECTED]  http://www.stason.org/stas
Perl,CGI,Apache,Linux,Web,Java,PC http://www.stason.org/stas/TULARC
perl.apache.orgmodperl.sourcegarden.org   perlmonth.comperl.org
single o-> + single o-+ = singlesheavenhttp://www.singlesheaven.com



Re: How can I share mod_perl config info with shell perl processes?

2000-02-10 Thread Stas Bekman

> I have data I need access to via WEB or filesystem. or more correctly with
> email.  Since the data lives in Web server territory, my Apache/mod_perl
> configuration files know where everything is -
> 
> What I think I would like to do, is when the mail process starts up, I'd
> like to reach inside of apache and pull configuration data right out from
> the active server.  Is this possible?  I know I can dump config data from
> between  blocks, but I believe that is static at startup.  I'd
> like to take advantage of the Active servers memory cache if I could - some
> how access the same memory pool - check whos on-line and such.
> 
> I'm I going places I should?  If not could someone point me in the right
> direction?

Take a look at Apache::Scoreboard it knows to fetch the scoreboard info
from remote server. I guess in the same fashion you can write a module to
connect and retrieve other data as well.

But wait, why not to write a script/handler that will deliver all the
required data on request? Use LWP for retrieval and Storable or/and
Data::Dumper for easy serialization and later restore.

___
Stas Bekmanmailto:[EMAIL PROTECTED]  http://www.stason.org/stas
Perl,CGI,Apache,Linux,Web,Java,PC http://www.stason.org/stas/TULARC
perl.apache.orgmodperl.sourcegarden.org   perlmonth.comperl.org
single o-> + single o-+ = singlesheavenhttp://www.singlesheaven.com



Fw: failure notice

2000-02-10 Thread Jens-Uwe Walther

>Patrick,
>
>if you use Solaris too then have a look at "man ld.so.1" which explains all
>possible run time linker environment variables using shared libraries stuff
>
>NAME
> ld.so.1 - runtime linker for dynamic objects
>
>SYNOPSIS
> /usr/lib/ld.so.1
>
>...
>
>
> LD_PRELOAD
>   Provides a  whitespace-separated  list  of  shared
>   objects  that are to be interpreted by the runtime
>   linker. The specified shared  objects  are  linked
>   after the program is executed but before any other
>   shared objects that the program references.
>
>It seems that there are some side affects of letting the run time linker
>determine the order of the libraries load because there are a perl/mod_perl
>misbehaviour in apaches DSO case. This should be fixed in the next perl
>release. It works with the experimental 5.005_63 and mod_perl-2.xxx
>But it works with the LD_PRELOAD settings from my attached apache start
>script too when using perl5.005_03 (statically linked libperl.a !!! ) and
>mod_perl-1.21.
>If you use a libperlso then you need to find out another "LD_PRELOAD"
order,
>maybe:
>
>LD_PRELOAD='your-apache-path/libexec/libperl.so
>your-perl-path/CORE/libperl.so' your-apache-path/apachectl start
>
>The apache DSO object has to be started before the perl libperl.so. See
Alan
>Burlison's interesting mail 17793 at egroups.com modperl archive!
>
>Uwe
>
>Uwe
>
>
>
>--=_NextPart_000_00E3_01BF73B6.2E700A80
>Content-Type: application/octet-stream;
> name="apache"
>Content-Transfer-Encoding: base64
>Content-Disposition: attachment;
> filename="apache"
>
>IyEvYmluL3NoCiNpZGVudCAgIkAoIylhcGFjaGUuc2VydmVyIDEuMCAgIDk2LzA2LzE5IFRLIiA
g
>ICAvKiBTVnI0LjAgMS4xLjEzLjEqLwojCiMgSlVXOTgwNjA5MDEKIwoKIyBTdGFydC9zdG9wIHB
y
>b2Nlc3NlcyByZXF1aXJlZCBmb3IgYXBhY2hlIHNlcnZlcgpBUEFDSEVfRElSPS9vcHQvYXBhY2h
l
>CkVUQ19ESVI9JHtBUEFDSEVfRElSfS9jb25mCgpjYXNlICIkMSIgaW4KCidzdGFydCcpCiMKIyB
F
>ZGl0IHRoZXNlIGxpbmVzIHRvIHN1aXQgeW91ciBpbnN0YWxsYXRpb24gKHBhdGhzLCB3b3JrZ3J
v
>dXAsIGhvc3QpCiMKaWYgWyAtZiAke0VUQ19ESVJ9L2h0dHBkLmNvbmYgXSA7IHRoZW4KCWlmIFs
g
>LXggJHtBUEFDSEVfRElSfS9iaW4vYXBhY2hlY3RsIF0KCXRoZW4KCQlMRF9QUkVMT0FEPScvb3B
0
>L2FwYWNoZS9saWJleGVjL2xpYmh0dHBkLnNvIC9vcHQvYXBhY2hlL2xpYmV4ZWMvbGlicGVybC5
z
>bycgJHtBUEFDSEVfRElSfS9iaW4vYXBhY2hlY3RsIHN0YXJ0c3NsICYmIGVjaG8gIkFwYWNoZSB
k
>YWVtb24gc3RhcnRlZC4iCgllbHNlCgkJZWNobyAnIiR7QVBBQ0hFX0RJUn0vYmluL2FwYWNoZWN
0
>bCIgaXMgbWlzc2luZy4nCglmaQplbHNlCgllY2hvICdBIGNvbmZpZ3VyYXRpb24gZmlsZSBpbiA
i
>JHtFVENfRElSfSIgaXMgbWlzc2luZy4nCmZpCjs7CidzdG9wJykKCWlmIFsgLWYgL3Zhci9odHR
w
>ZC9odHRwZC5waWQgXQoJdGhlbgoJCWVjaG8gJ1N0b3BwaW5nIEFwYWNoZSAuLi4gXGMnICYmIGt
p
>bGwgLVRFUk0gYGNhdCAvdmFyL2h0dHBkL2h0dHBkLnBpZGAKCQllY2hvICdkb25lLicKCWVsc2U
K
>CQllY2hvICJObyBBcGFjaGUgUElEIGZpbGUuIG1heWJlIEFwYWNoZSBpc24ndCBydW5uaW5nLiI
K
>CWZpCgk7OwoncmVjb25maWd1cmUnKQoJaWYgWyAtZiAvdmFyL2h0dHBkL2h0dHBkLnBpZCBdCiA
g
>ICAgICAgdGhlbgoJCWVjaG8gJ1JlY29uZmlndXJpbmcgQXBhY2hlIC4uLiBcYycgJiYga2lsbCA
t
>VVNSMSBgY2F0IC92YXIvaHR0cGQvaHR0cGQucGlkYAogICAgICAgICAgICAgICAgZWNobyAnZG9
u
>ZS4nCiAgICAgICAgZWxzZQogICAgICAgICAgICAgICAgZWNobyAiTm8gQXBhY2hlIFBJRCBmaWx
l
>LiBtYXliZSBBcGFjaGUgaXNuJ3QgcnVubmluZy4iCiAgICAgICAgZmkKCTs7CiopCiAgIGVjaG8
g
>IlVzYWdlOiAvZXRjL2luaXQuZC9hcGFjaGUgeyBzdGFydHxzdG9wfHJlY29uZmlndXJlIH0iCiA
g
>IDs7CmVzYWMK
>
>--=_NextPart_000_00E3_01BF73B6.2E700A80
>Content-Type: text/x-vcard;
> name="Jens-Uwe Walther.vcf"
>Content-Transfer-Encoding: quoted-printable
>Content-Disposition: attachment;
> filename="Jens-Uwe Walther.vcf"
>
>BEGIN:VCARD
>N:Walther;Jens-Uwe
>FN:Jens-Uwe Walther
>ORG:FORCE Computers GmbH;IS
>TITLE:System and Network Administrator
>TEL;WORK;VOICE:+49(0)8960814-0
>TEL;WORK;FAX:+49(0)896014-376
>ADR;WORK:;;Prof.-Messerschmitt-Str.1;Neubiberg/Munich;;85579;Germany
>LABEL;WORK;ENCODING=3DQUOTED-PRINTABLE:Prof.-Messerschmitt-Str.1=3D0D=3D0=
>ANeubiberg/Munich 85579=3D0D=3D0AGermany
>X-WAB-GENDER:Unspecified
>http://www.forcecomputers.de
>EMAIL;PREF;INTERNET:Jens-Uwe [EMAIL PROTECTED]
>END:VCARD
>
>--=_NextPart_000_00E3_01BF73B6.2E700A80--
>
>


BEGIN:VCARD
N:Walther;Jens-Uwe
FN:Jens-Uwe Walther
ORG:FORCE Computers GmbH;IS
TITLE:System and Network Administrator
TEL;WORK;VOICE:+49(0)8960814-0
TEL;WORK;FAX:+49(0)896014-376
ADR;WORK:;;Prof.-Messerschmitt-Str.1;Neubiberg/Munich;;85579;Germany
LABEL;WORK;ENCODING=QUOTED-PRINTABLE:Prof.-Messerschmitt-Str.1=0D=0ANeubiberg/Munich 85579=0D=0AGermany
X-WAB-GENDER:Unspecified
URL:http://www.forcecomputers.de
EMAIL;PREF;INTERNET:Jens-Uwe [EMAIL PROTECTED]
END:VCARD



Re: [SITE] possible structure suggestion

2000-02-10 Thread Robin Berjon

At 11:05 10/02/2000 +0200, Stas Bekman wrote:
>Please decide whether you want to have the discussion at the mod_perl list
>or its sister advocacy list. I've added the advocacy list to CC, so at
>least the person who will search the advocacy archive in the future will
>find all the info about this important issue. Therefore I quote it in all
>completeness here.

I'm moving it to modperl-advocacy now that I've found out that it exists.

>TomC, please don't tell me that I don't know how to quote. Thank you!

lol :) Well that proves how good he is at getting a message echoed to the
entire community.



.Robin
Earth is a beta site.



Re: [SITE] possible structure suggestion

2000-02-10 Thread Matt Sergeant

Something I'd really love to see, is documentation to the extent that the
php site has docs. And thier docs are user-annotatable, which is a really
cool feature.

-- 


Details: FastNet Software Ltd - XML, Perl, Databases.
Tagline: High Performance Web Solutions
Web Sites: http://come.to/fastnet http://sergeant.org
Available for Consultancy, Contracts and Training.



Re: Commercial app demo

2000-02-10 Thread Matt Sergeant

On Thu, 10 Feb 2000, Fabrice Scemama wrote:
> There's another way. We can't build pre-compiled modules easily,
> but even when you code in C or Java, desassemblers can extract
> some source from the binaries you deliver. As far as perl scripts are
> concerned, a workaround consists in trivially removing all comments
> and \n from the source, which makes it as hard to understand as
> raw C desassembled code.

Maybe the way _you_ write code :)

-- 


Details: FastNet Software Ltd - XML, Perl, Databases.
Tagline: High Performance Web Solutions
Web Sites: http://come.to/fastnet http://sergeant.org
Available for Consultancy, Contracts and Training.



Re: PerlHandler precedence?

2000-02-10 Thread Stas Bekman

> Here's the problem.  I have a number of cgi scripts I want to run
> under PerlRun (some under Registry, but not all of them are cleaned up
> yet), and also run a new Mason interface we've put together.  But with
> the config below, only HTML::Mason processes them.  My understanding
> of SetHandler in apache is that it goes from the more specific to the
> less specific, but this does not seem to be the case with PerlHandler.
> 
> 
>   Options +ExecCGI
>   SetHandler perl-script
>   PerlHandler Apache::PerlRun
>   PerlSendHeader on
> 
> 
> PerlRequire conf/mason.pl
> 
> 
> Options +ExecCGI
> SetHandler perl-script
> PerlHandler HTML::Mason
> 
> 
> I'm nonplussed about resorting to a FixupHandler, and I'm just
> wondering about what kind of precedence is out there to select which
> PerlHandler or PerlAccessHandler or what have you to run given
> a directory configuration.  Is mod_perl using the same dir config
> as apache?  Have I somehow screwed up the configuration?  Is there
> something I'm missing that could pass processing off to PerlRun
> instead of HTML::Mason when pages get accessed?
> 
> Thanks for any help.  I've looked through both the Mason documentation
> and the mod_perl documentation looking for help (the former because
> it does have a related issue answered concerning SetHandler..).  Is
> there somewhere else I've missed?
> 
> Thanks for any help, I've run across this kind of problem before but
> I've always been able to get away from it with clever placement
> the handlers in the uri space -- I can't do that this time.

I believe the problem is not in Perlhandler precedence but in:
How Directory, Location and Files Sections are Merged 
http://perl.apache.org/guide/config.html#How_Directory_Location_and_File

> 
> --Rob
> 



___
Stas Bekmanmailto:[EMAIL PROTECTED]  http://www.stason.org/stas
Perl,CGI,Apache,Linux,Web,Java,PC http://www.stason.org/stas/TULARC
perl.apache.orgmodperl.sourcegarden.org   perlmonth.comperl.org
single o-> + single o-+ = singlesheavenhttp://www.singlesheaven.com



Re: [SITE] possible structure suggestion

2000-02-10 Thread Stas Bekman


Here comes the followup according to the TomC's protocol :)

On Wed, 9 Feb 2000, Robin Berjon wrote:

> Hello fellow mod_perlians,
> 
> I know I had promised to send this in by the end of December / early
> January, I am really late and sorry. I was caught in France by the french
> army for being an alleged deserteur, and they were *very* insistent on
> having me stay there. Anyway I'm out now :)

Robin, I thought it happens only in Israel :) I hope you are free now. I
went free on this Sunday. Hooray!!!

> The following document is also available at:
> http://modperl.knowscape.org/outline2209.txt

Great document! Seems great to me!

>   - small, concentrated Netcraft box heralding usage and growth
>   . Apache Servers: x million / 63%
>   . Modperl Powered: x hundred thousand / 5%
>   . Modperl presence keeps growing at an incredible pace,
>   . more -> link to /about/netcraft/

Won't it make the index.html overloaded?

>   /docs/guide/
> - Stas' guide from http://perl.apache.org/guide/
> Note: there's a lot of great documentation out there. I don't know
>   if we should do a separate section for the guide or not, or
>   for all. The size of the guide seems to require it.


Ged, I and probably Andrew will work on restructing the guide to improve
the structure and navigatability. But this after Ged completes the review
of the current chapters more or less, and me inserting the long list of
items from my todo list. 

> Note: should the guide match layout of the rest of the site ? Doing
>   it shouldn't be a problem and it might be better to have a
>   consistent layout but I'm totally unsure of this, and of
>   course it is up to Stas to make the final decision on this
>   point. The HTML of the guide being generated, I guess we can
>   have as many layouts as we want/need.

Everything is generated from the POD sources. I'll tweak the output
generator as you will like, to make the look and feel consistent. 


BTW, you didn't mention a usage of CSS files to enforce the look and feel. 

> - mention Stas' guide + Eric -> book

Please don't forget Eric, he works harder than me, but you cannot see that
before the book gets published. The news item at the demo page doesn't
mention his name. Thank you!

> Wrapper/converter for text and pod files
> 
> 
> Much of the user-contributed material comes in text or pod. To provide a
> look and feel consistent with the rest of the site, we will need to
> develop a script to "wrap" into a template for the site. The pod2html
> script is insufficient for this task but we can probably leverage
> earlier work by Stas (for the Guide) on such scripts as well as
> Pod::Parser.

Yup, I've hacked the original pod2html, which I use in the guide. You can
use it. Another code to use is the Site::Builder that I wrote for the
Source Garden. It knows automatically generate htmls from .pod, .prepod
(item lists + pod) and .txt -- see
http://modperl.sourcegarden.org/safari/modperl/-/-/site_builder/


> Module Database
> ===
> 
> A list of the names + download link + description/author/last_modified/
> CPAN_status + link to the homepage for the module + synopsis.
> 
> Part of this can be handled automatically by a cron script that would
> check CPAN on a regular basis (or the already existing database of
> search.cpan.org) and update the list using more or less the same method
> as for the news.
> 
> This would hopefully help keep the modlist constantly up-to-date while
> reducing the maintenance to be done on it. Meanwhile, the maintenance
> can still be done by hand.

That's something that Fresh:: modules should cope with when James
completes them. They will serve the sourcegarden goal to make all the
stuff generated from the DB. The intention is to remove all the static
pages (from the perl.apache.org) that would benefit from the
administration speedup.

>  . sending PNG instead of GIF to user-agents that support them would
>be nice, but I haven't come up with a reliable way to do this yet
>(content-negotiation is probably insufficient)

Be careful with PNG as they kicks off my older Netscape browser on linux!

> >text
>   - this is much easier obviously, however I've often heard people say
> they thought text-navigation was easier with the navbar at the top
> and bottom of the page. I'd like to have opinions on this, but
> please let's avoid religion wars on this subject.

I think what you wanted/need to write here is a lynx compatibility for
the impared folks and those who prefer text mode browsing.

-

Thanks Robin!!!

___
Stas Bekmanmailto:[EMAIL PROTECTED]  http://www.stason.org/stas
Perl,CGI,Apache,Linux,Web,Java,PC http://www.stason.org/stas/TULARC
perl.apache.orgmodperl.sourcegarden.org   perlmonth.comperl.org
single

Re: [SITE] possible structure suggestion

2000-02-10 Thread Stas Bekman


Please decide whether you want to have the discussion at the mod_perl list
or its sister advocacy list. I've added the advocacy list to CC, so at
least the person who will search the advocacy archive in the future will
find all the info about this important issue. Therefore I quote it in all
completeness here.

TomC, please don't tell me that I don't know how to quote. Thank you!

> Hello fellow mod_perlians,
> 
> I know I had promised to send this in by the end of December / early
> January, I am really late and sorry. I was caught in France by the french
> army for being an alleged deserteur, and they were *very* insistent on
> having me stay there. Anyway I'm out now :)
> 
> Some time ago Matt Arnold and I started work with the aim of redesigning
> the perl.apache.org website. A draft of the proposed layout is sitting at
> http://modperl.knowscape.org/ . But adding graphic layout not being the
> primary goal we also wanted to change the site architecture so that things
> would be more easily found. One of the goals was also to make an "about"
> section targetted at people that are not developers but need be convinced
> that mod_perl is the way to go. I beleive that could help some of us in
> their daily jobs.
> 
> I haven't had as much time as I wanted to work on this, but here is the
> latest version of the draft. It is by no means final, and any input is
> obviously very very welcome. And of course, we didn't write "In my/our
> humble opinion" before every element seeing that it might make the read a
> bit boring, but consider that it is there in thought.
> 
> Also, I know that some work has been done on the site, but I haven't yet
> finished readin my mod_perl list mailbox (should be finished by tonight). I
> am in no way excluding things that have been said while I wasn't reading, I
> just haven't seen them yet :)
> 
> The following document is also available at:
> http://modperl.knowscape.org/outline2209.txt
> 
> 
> 
> 
> #--#
> # I. Site Structure
> #--#
> 
> 
> 
> Home Page
> =
> 
>   - brief introduction to mod_perl "What is mod_perl?", "More than CGI",
> links to more detailed introductory content.
>   - news box (top n headlines and teasers)
>   - short text explaining where to find what is in the site
>   - quick "get started fast" link to Stas' guide section on that subject
>   - small, concentrated Netcraft box heralding usage and growth
>   . Apache Servers: x million / 63%
>   . Modperl Powered: x hundred thousand / 5%
>   . Modperl presence keeps growing at an incredible pace,
>   . more -> link to /about/netcraft/
> 
> 
> 
> News
> 
> 
>   /news/?id=x or /news/x.html
> - script/handler shows full news article for article number x or static
>   page pregenerated
> 
>   /news/search.html
> - quick way to search past news items
> 
> 
> 
> Download
> 
> 
>   /download/
> - link to the mod_perl bundle
> - list of the latest CHANGES
> - requirements (Apache 1.3.xx, etc...)
> - links to install help documentation, including mod_perl help, the
>   guide and the entire docset.
> 
>   /download/modules/
> - about CPAN
> - info on Apache::* modules
>   (from http://perl.apache.org/src/apache-modlist.html or the new
>   version if it is a workable solution cf II. Tools)
> - link to /docs/modules/ documentation (it would be nice to
>   centralise the docs for all the modules)
> 
> 
> About
> =
>   (i.e. marketing info, introduction to features (the detailed developer
>   info is kept in the doc section))
> 
>   /about/
> - links to the various pages in this section with descriptions of
>   their content
> 
>   /about/usage/
> - Netcraft usage info found at http://perl.apache.org/netcraft/
>   - extracts from the following:
>   . customer list/testimonials, use a subset of info from
> http://perl.apache.org/tidbits.html,
> http://perl.apache.org/stories/,
> http://perl.apache.org/sites.html
>   . info on high-profile sites gathered by Rex Staples
> 
>   /about/usage/customers/
> - complete list of customers (to the best of our knowledge anyway)
> 
>   /about/usage/testimonials/
> - complete list of customer testimonials and success stories
> 
>   /about/press/
> - mod_perl in the news (i.e. press saying how cool mod_perl is)
> - use info from http://perl.apache.org/tidbits.html, search around
>   for more (eg the Beanie Award)
> 
>   /about/performance/
> - boast about speed, intro to the content that lives at
>   http://www.chamas.com/hello_world.html or host the content
>   directly (split among multiple pages ? It's a very long document),
>   borrow ideas from the mySQL crash_me comparison database
> 
> - should we use a crashme script too ? Does it make sense ?
> 
>   /abo

What's the benefits of using XML ?

2000-02-10 Thread Vlad Safronov


What's the benefits of using XML in building web site with dynamic
content?
(web site is a front end to database)

-- 

Best regards,
**
Vlad A. Safronov [EMAIL PROTECTED]