Re: Apache::ASP rules [was: Sorry men]

2000-04-28 Thread Francesc Guasch

Ime Smits wrote:
 
 Bottomline: Apache::ASP made me really happy because now don't have to
 develop for IIS anymore and I can stick to my Linux environment. I can

I'm also being told every once in a while by management
about why we aren't using IIS, you know, when they receive
marketing information.

I have a list of lack of features in mind but I'll like
to hear horror stories and so from somone who really used it.


-- 
 - frankie -



Re: Apache::ASP rules [was: Sorry men]

2000-04-28 Thread Joshua Chamas

Ime Smits wrote:
 
 | Oh, almost forget it... ASP is a loose of time on developer time... and
 the
 | module is to heavy, sorry but betwen oracle and ASP our server is down in
 | performance, we run unix on a SGI and with 256mb ram...
 | If you are trying to put ASP cause you don´t want to break the designer
 | work, you are loosing your time (that was the intention here, but it
 doesn´t
 | work), the design is all broke.
 | Is more estructured and I vote for put HTML into Perl and not Perl into
 HTML
 | or the same with ASP.
 
 I think you have a point if you're writing stuff which is going to get a
 million or so pageviews a day. In that case, you'll probably have a pretty
 good insight in how things are going to be in advance and you can spent some
 valuable time into thinking out every aspect of your application before you
 actually start coding.
 

A million page views a day will be nothing to an Apache::ASP modperl 
application that is properly tuned for both the modperl  Oracle components.
This is especially true if you are running Linux, which is a very fast OS.
Check out:

  http://www.nodeworks.com/asp/tuning.html
  http://www.perlmonth.com/features/apacheasp/apacheasp.html?issue=7

Note that for extreme memory savings, see the two server setup
in the modperl guide, my favorite is the proxy in front using ProxyPass.

Oh,  Ime, you rock.

-- Joshua



Re: Security in displaying arbitrary HTML

2000-04-28 Thread Dirk Lutzebaeck

Matt Sergeant writes:

  Unfortunately there's also a browser bug to contend with. They treat \x8b
  (I think that's the right code) as  and there's a similar code for
  . Since most web developers are just doing s//lt;/g; they are open to
  attacks based on character sets like this. Sad, but true. Even our loved
  CGI.pm was (is?) open to this bug - I think Lincoln has fixed the
  HTMLEncode function now though.

Gerald, what about Embperl, does it escape \x8b?

Dirk




RE: Security in displaying arbitrary HTML

2000-04-28 Thread Leon Brocard

Jeremy Howard wrote:

 I'm interested in providing 'HTML email' support for my users 
 (like HotMail, Outlook Express, Eudora 4.0, etc provide), but 
 I'm very nervous about security. Essentially, providing HTML 
 email involves letting any arbitrary HTML get displayed by Apache...

I've been through this problem with my webmail program, acmemail.
The problem is much greater with webmail than general other web 
applications due to the fact that you actually want to allow HTML
emails to display properly.

I currently use some code based on John Hardin's "Defang HTML
active-content tags" routine in his procmail security package.
URL:http://www.wolfenet.com/~jhardin/procmail-security.html
He's been working on it for a while, and appears to have it
down to a fine art. It hopefully disables any (possibly malicious)
code in an HTML message.

However, I'm sure it doesn't cope with everything. Someone should
really come up with an ultimate, general, solution...

Leon
--
Leon Brocard   |   perl "programmer"   |   [EMAIL PROTECTED]



Re: Security in displaying arbitrary HTML

2000-04-28 Thread Dirk Lutzebaeck

Matt Sergeant writes:

  Unfortunately there's also a browser bug to contend with. They treat \x8b
  (I think that's the right code) as  and there's a similar code for
  . Since most web developers are just doing s//lt;/g; they are open to
  attacks based on character sets like this. Sad, but true. Even our loved
  CGI.pm was (is?) open to this bug - I think Lincoln has fixed the
  HTMLEncode function now though.

Gerald, what about Embperl, does it escape \x8b?

Dirk




Re: Apache::ASP rules [was: Sorry men]

2000-04-28 Thread Matt Sergeant

On Fri, 28 Apr 2000, Francesc Guasch wrote:

 Ime Smits wrote:
  
  Bottomline: Apache::ASP made me really happy because now don't have to
  develop for IIS anymore and I can stick to my Linux environment. I can
 
 I'm also being told every once in a while by management
 about why we aren't using IIS, you know, when they receive
 marketing information.
 
 I have a list of lack of features in mind but I'll like
 to hear horror stories and so from somone who really used it.

My boss has lots of lovely (NOT!) things to say about it. But then he is
biased - he's the product manager for O'Reilly's WebSite.

IIS does lots wrong, but it's not terrible. The API is a bit pants, and
while it's very quick at static files, it cheats. See
http://www.wgg.com/rants/benchmark.html for some details on that. It's
also a bloated pig - and you thought Apache+mod_perl used up lots of RAM,
wait till you get IIS+MTS+Index Server running

-- 
Matt/

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




RE: Security in displaying arbitrary HTML

2000-04-28 Thread Gerald Richter


 Gerald, what about Embperl, does it escape \x8b?


No, there is no html escape for \x8b (and I guess the other one Matt
mentioned is \0x8d for ) I know, so Embperl will not escape it, but this
could be simply change by an entry in epchar.c. Any suggestion to what this
should be escaped? Then I will make a patch.

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: Security in displaying arbitrary HTML

2000-04-28 Thread Matt Sergeant

On Fri, 28 Apr 2000, Gerald Richter wrote:

 
  Gerald, what about Embperl, does it escape \x8b?
 
 
 No, there is no html escape for \x8b (and I guess the other one Matt
 mentioned is \0x8d for ) I know, so Embperl will not escape it, but this
 could be simply change by an entry in epchar.c. Any suggestion to what this
 should be escaped? Then I will make a patch.

"#" . ord("\0x8a") . ";"

Whatever that produces. Same for \0x8d.

-- 
Matt/

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




Install probs.

2000-04-28 Thread Dominic Blythe

please reply to [EMAIL PROTECTED] as i'm not on the list...

on Corel Linux (which is Debian slink)...

I'm compiling mod_perl into apache 1.3.xx (19 i think) and all the mod_perl
make, make install goes ok. APACI ./configure is fine too, but when i make
apache, I get about a page of complaints about mod_perl, mostly of the
format "Undefined reference to mod_perl_some_function_name in mod_perl.c"
and it won't make.

make and make test on mod_perl both complained about libwww missing, but all
the install notes said this isn't absolutely required.

without the activate-module=src/modules/perl/mod_perl.c apache completed
make install with no probs (well it runs anyway)

any ideas?



Re: Apache::ASP rules [was: Sorry men]

2000-04-28 Thread Tom Peer

Horror stories?

On a live site when a static page is being accessed NT can lock the page
and not unlock it even when you've stopped the internet service - handy
when you've got someone shouting at you to change a mistake.

If you change the default (eg index.htm) page in a directory to a dynamic
one eg index.asp, IIS will show an older cached version of the page if you
view the page using just the directory name in the URL and th new version
if you call it explicitly.

Oh - and try looking for the error log on IIS.

Also take a look at the IIS version of W3C logs - they're full of corrupt
chunks of HTML (?? - this makes them near impossible to process with PERL
on NT - I had a site once where we zipped up the logs and sent them to a
Linux machine for processing)

Much touted as an advantage of IIS is the Site Server add-on. This is even
worse than IIS.

Index Server is the worst piece of software I have ever worked with. If you
search for two words and have a document that contains 14 occurences of one
word and 1 of another it will rank higher than one with 7 of each. If you
try to catalogue a collection with over about 20,000 pages it can't push
the collection to other servers so you have to set up indexing on all your
servers which is something Microsoft tell you not to do because Indexing
brings your server to a halt.

The LDAP service is a joke. It stops and starts for a hobby and relies on
you first setting NT group permissions on all the folders you want to apply
it to (??). Try ringing MS for LDAP support and you will get to speak to a
lot of very confused people. The last time I tried I waited a week and then
got back a list of people offering IIS training in my area.

And have you ever tried sending mail from an NT server? I tried to use the
Membership stuff to send a weekly newsletter from a $40,000 Compaq server
and worked out it was going to run into next week's letter. Roll on Linux
running on an old Pentium II.

And have you ever tried dialling in remotely?

And my favourite - MS make a great dea about how much of the Linux stuff is
freeware or open source. If you get a runaway process on NT and you can't
kill it - ring up MS Support and they'll recommend installing a shareware
utility called kill. Sure I use shareware to do lots of stuff - but to kill
a process on a mission critical server??

Still it's not all bad...I like the Unix compatibility pack and the GUI
gets more like the Mac every release.

I feel better now.

Tom
 :(

Francesc Guasch wrote:

 Ime Smits wrote:
 
  Bottomline: Apache::ASP made me really happy because now don't have to
  develop for IIS anymore and I can stick to my Linux environment. I can

 I'm also being told every once in a while by management
 about why we aren't using IIS, you know, when they receive
 marketing information.

 I have a list of lack of features in mind but I'll like
 to hear horror stories and so from somone who really used it.

 --
  - frankie -




Re: Security in displaying arbitrary HTML

2000-04-28 Thread Marc Slemko

On Thu, 27 Apr 2000, Matt Sergeant wrote:

 Unfortunately there's also a browser bug to contend with. They treat \x8b
 (I think that's the right code) as  and there's a similar code for
 . Since most web developers are just doing s//lt;/g; they are open to
 attacks based on character sets like this. Sad, but true. Even our loved
 CGI.pm was (is?) open to this bug - I think Lincoln has fixed the
 HTMLEncode function now though.

Mmm?  Which browsers?  Do they have to be configured for any particular
character set?  And can you provide an example that demonstrates it?

I can't reproduce it...




Re: Security in displaying arbitrary HTML

2000-04-28 Thread Matt Sergeant

On Fri, 28 Apr 2000, Marc Slemko wrote:

 On Thu, 27 Apr 2000, Matt Sergeant wrote:
 
  Unfortunately there's also a browser bug to contend with. They treat \x8b
  (I think that's the right code) as  and there's a similar code for
  . Since most web developers are just doing s//lt;/g; they are open to
  attacks based on character sets like this. Sad, but true. Even our loved
  CGI.pm was (is?) open to this bug - I think Lincoln has fixed the
  HTMLEncode function now though.
 
 Mmm?  Which browsers?  Do they have to be configured for any particular
 character set?  And can you provide an example that demonstrates it?
 
 I can't reproduce it...

Well if you have Apache 1.3.12, it implicitly sets the Content-Encoding,
or the character set, so this bug is minimised. But only on static
content. If there's no character set in the Content-type or
Content-Encoding the browser sniffer comes into play, and Netscape
(IIRC) picks it up as Latin-1, or US-ASCII, I can't recall which. The
details are all available over the web. Tom Christiansen had an excellent
informative discussion about it on p5p - search the archives.

-- 
Matt/

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




sample modperl script pls

2000-04-28 Thread Jaime Teng

Hi,

I want to learn writing modperl scripts.

Im not referring to any perl scripts that are executed by
Apache::Registry, but rather a perl script that is invoked
by the Apache itself - same level like Apache::Registry.

also, know to fetch the URL. Is it stored in the %ENV?

thanx

Jaime



RE: sample modperl script pls

2000-04-28 Thread Eric Cholet

 Hi,
 
 I want to learn writing modperl scripts.
 
 Im not referring to any perl scripts that are executed by
 Apache::Registry, but rather a perl script that is invoked
 by the Apache itself - same level like Apache::Registry.

You're talking about handlers. The best resource is the Eagle
book (http://www.modperl.com/).

 also, know to fetch the URL. Is it stored in the %ENV?

$r-uri

'perldoc Apache' will give you a list of all the API methods.

--
Eric




Re: [RFC] modproxy:modperl ratios...

2000-04-28 Thread Dave Hodgkinson

Vivek Khera wrote:
 
  "MS" == Matt Sergeant [EMAIL PROTECTED] writes:
 
  doing - and the TCP listen queue will hold a few more
  connections if you are slightly short of backends.
 
 MS Is there any benefit of mod_proxy over a real proxy front end like "Oops"?
 
 Not being familiar with "Oops", I can say that I use mod_proxy as the
 front end so that I can do virtual hosting.  Doing this with Squid is
 not so straight-forward (meaning it requires me to spend lots of time
 learning something else to maintain.)

We use squid as the front end proxy for about 180 domains and it works
well. It catches about 50 "stupid redirect" domains, ones that bounce
to a subdirectory of a larger site. We reckon at least 50% of all 
traffic is cached, which is to be expected as our sites are heavily
SSI driven and therefore regular html just doesn't cache and nor
should it.

Squid's OK and a lot better than it used to be. If we were running on
less hardware (currently 3 tier: proxy, 2xmod_perl servers, database),
then I'd think hard about using a single, modular apache build
and two instances of apache. 

I'm currently arguing about this very thing with my BOFH - I think we
should have, effectively, an SSI apache and a mod_perl apache, he's
going with the KISS principle. Since at the moment we're by no means
constrained by "concurrent" users eating connections to fat servers
and you can always turn off keepalive on apache, I'm leaning towards
KISS too.

-- 
David Hodgkinson, Technical Director, Sift PLChttp://www.sift.co.uk
Editor, "The Highway Star"   http://www.deep-purple.com
Dave endorses Yanagisawa saxes, Apache, Perl, Linux, MySQL, emacs, gnus



Re: Security in displaying arbitrary HTML

2000-04-28 Thread Gunther Birznieks

At 10:25 AM 4/28/00 +0100, Matt Sergeant wrote:
On Fri, 28 Apr 2000, Marc Slemko wrote:

  On Thu, 27 Apr 2000, Matt Sergeant wrote:
 
   Unfortunately there's also a browser bug to contend with. They treat \x8b
   (I think that's the right code) as  and there's a similar code for
   . Since most web developers are just doing s//lt;/g; they are open to
   attacks based on character sets like this. Sad, but true. Even our loved
   CGI.pm was (is?) open to this bug - I think Lincoln has fixed the
   HTMLEncode function now though.
 
  Mmm?  Which browsers?  Do they have to be configured for any particular
  character set?  And can you provide an example that demonstrates it?
 
  I can't reproduce it...

Well if you have Apache 1.3.12, it implicitly sets the Content-Encoding,
or the character set, so this bug is minimised. But only on static
content. If there's no character set in the Content-type or
Content-Encoding the browser sniffer comes into play, and Netscape
(IIRC) picks it up as Latin-1, or US-ASCII, I can't recall which. The
details are all available over the web. Tom Christiansen had an excellent
informative discussion about it on p5p - search the archives.

The latest version of CGI.pm also mitigates this for scripts or apps that 
use it to print the header.

perl -MCGI -e '$q = new CGI(); print $q-header();'
Content-Type: text/html; charset=ISO-8859-1

I assume Apache's request object send_http_header does whatever Apache does 
to get the header printed out with the charset stuff when the static pages 
are displayed?

Later,
Gunther


__
Gunther Birznieks ([EMAIL PROTECTED])
Extropia - The Web Technology Company
http://www.extropia.com/




out of memory

2000-04-28 Thread FEITO Nazareno

I´ve installed apache 1.3.12 and mod_perl 1.23 but when I want to start
apache it starts and then eat almost all the memory on the system, I have a
PII 333 with 128MB ram.
When i want to access the page i can´t doit and everything get slow... when
i check error_log I found a nice prhase that say: out of memory(repeat it a
lot of times).
Any idea what I´m doing wrong?How can I fix that?Is an script problem or
httpd.conf problem?
I´m running only mod_perl with mysql databases and it say that handler is
bad too... 
Help, S.O.S, Ayuda, Auxilio, Socorro.

Nazareno
Perl Programmer www.obsequie.com
[EMAIL PROTECTED]



Re: out of memory

2000-04-28 Thread Ime Smits

Getting mod_perl to suck up all RAM ain't that difficult. But you have to
give us details...

Ime

- Original Message -
From: FEITO Nazareno [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, April 28, 2000 14:22
Subject: out of memory


I´ve installed apache 1.3.12 and mod_perl 1.23 but when I want to start
apache it starts and then eat almost all the memory on the system, I have a
PII 333 with 128MB ram.
When i want to access the page i can´t doit and everything get slow... when
i check error_log I found a nice prhase that say: out of memory(repeat it a
lot of times).
Any idea what I´m doing wrong?How can I fix that?Is an script problem or
httpd.conf problem?
I´m running only mod_perl with mysql databases and it say that handler is
bad too...
Help, S.O.S, Ayuda, Auxilio, Socorro.

Nazareno
Perl Programmer www.obsequie.com
[EMAIL PROTECTED]





Unsubscribe requests are being incorrectly routed to this list

2000-04-28 Thread Lloyd Zusman

Hello.

I've been trying to unsubscribe from this mailing list for the past
several days, but with no success.

Some emails to `[EMAIL PROTECTED]' seem to be getting
incorrectly routed to this list with the "To:" address being munged
into `[EMAIL PROTECTED]'.  Other emails to this same unsubscribe
address seem to be getting totally ignored.

I'm sending this email to both addresses this time.

Could someone who can unsubscribe me from this modperl mailing list
please do so?

Thanks in advance.

-- 
 Lloyd Zusman   [EMAIL PROTECTED]
 perl -le '$n=170;for($d=2;($d*$d)=$n;$d+=(1+($d%2))){for($t=0;($n%$d)==0;
 $t++){$n=int($n/$d);}while($t--0){push(@r,$d);}}if($n1){push(@r,$n);}
 $x=0;map{$x+=(($_0)?(1log($_-0.5)/log(2.0)+1):1)}@r;print $x'



Re: Install probs.

2000-04-28 Thread Jeff Beard

Try this when you configure Apache:

--activate-module=src/modules/perl/libperl.a

But before that, read the mod_perl install doc INSTALL.apaci.

--Jeff

At 10:02 AM 4/28/00, Dominic Blythe wrote:
please reply to [EMAIL PROTECTED] as i'm not on the list...

on Corel Linux (which is Debian slink)...

I'm compiling mod_perl into apache 1.3.xx (19 i think) and all the mod_perl
make, make install goes ok. APACI ./configure is fine too, but when i make
apache, I get about a page of complaints about mod_perl, mostly of the
format "Undefined reference to mod_perl_some_function_name in mod_perl.c"
and it won't make.

make and make test on mod_perl both complained about libwww missing, but all
the install notes said this isn't absolutely required.

without the activate-module=src/modules/perl/mod_perl.c apache completed
make install with no probs (well it runs anyway)

any ideas?



Jeff Beard
_
Web:www.cyberxape.com
Email:  jeff at cyberxape.com
Location:   Boulder, CO, USA






Re: Proxy front end behind 64k

2000-04-28 Thread Dave Hodgkinson

Matt Sergeant wrote:
 
 I'm behind a 64k leased line here (net access is *extremely* expensive
 here in the UK) and I was thinking, a proxy front end is probably really
 not necessary for me. Worst case scenario: I get 8 clients connecting to
 my at about 1KB/s - my pipe is maxed out anyway, so pushing them
 onto a proxy is just making more work! Just a thought for anyone
 thinking about a proxy front end - evaluate your pipe too.
 

I couldn't get your CV:

Not Found

The requested URL /cgi-bin/xmerge.pl was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use
an ErrorDocument to handle the request. 


Cheers!

Dave

-- 
David Hodgkinson, Technical Director, Sift PLChttp://www.sift.co.uk
Editor, "The Highway Star"   http://www.deep-purple.com
Dave endorses Yanagisawa saxes, Apache, Perl, Linux, MySQL, emacs, gnus



Re: [RFC] modproxy:modperl ratios...

2000-04-28 Thread Vivek Khera

 "DH" == Dave Hodgkinson [EMAIL PROTECTED] writes:

DH I'm currently arguing about this very thing with my BOFH - I think we
DH should have, effectively, an SSI apache and a mod_perl apache, he's

I tend to call mod_perl scripts from my SSI's, so it makes sense for
me to keep them on the same server.

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



Apache Redirection

2000-04-28 Thread FEITO Nazareno

May be this isn´t exactly the question for this mailing list, if it is to
that way please tell me, but I really need help with this.
I have a problem loading pictures on IE5, www.obsequie.com and
www.obsequie.com.ar -(this redirect to www.obsequie.com) is having troubles
with load images from IE5, with Netscape all is ok but with IE5 no images on
the screen, is a problem about apache?
This one, when i put www.obsequie.com it redirect me to:
www.obsequie.com/scripts/formato/home.phtml on IE5 no pictures but if I add
.ar after .com it loads the pictures on both navigators, i can´t understand
what´s de problem. Thanks for your help buddies, see y :)

Nazareno
Perl Programmer www.obsequie.com
[EMAIL PROTECTED]




Re: Apache::VMonitor not loading..

2000-04-28 Thread Stas Bekman

Hi, Alex

 Sorry about emailing you personally, but I tried the mod_perl list with
 no success.

 I'm trying to get Apache::VMonitor to load on a new mod_perl 1.23/Apache
 1.3.12/perl 5.005_03 installation. mod_perl is up and running fine,
 however I can't get Apache::VMonitor working. If I add 
 
   use Apache::VMonitor;
 
 to my startup file, I can't start httpd, I get:
 
 [root@alex apache_perl]# perlctl start
 [Wed Apr 26 16:13:45 2000] [error] Can't locate loadable object for module 
Apache::Util in @INC (@INC contains: /usr/lib/perl5/5.00503/i386-linux 
/usr/lib/perl5/5.00503 /usr/lib/perl5/site_perl/5.005/i386-linux 
/usr/lib/perl5/site_perl/5.005 . /usr/local/apache_perl/ 
/usr/local/apache_perl/lib/perl) at 
/usr/lib/perl5/site_perl/5.005/i386-linux/mod_perl.pm line 65535
 BEGIN failed--compilation aborted at 
/usr/lib/perl5/site_perl/5.005/Apache/VMonitor.pm line 10.
 BEGIN failed--compilation aborted at /usr/local/apache_perl/startup.pl line 11.
 
 Syntax error on line 38 of /usr/local/apache_perl/conf/httpd.conf:
 Can't locate loadable object for module Apache::Util in @INC (@INC contains: 
/usr/lib/perl5/5.00503/i386-linux /usr/lib/perl5/5.00503 
/usr/lib/perl5/site_perl/5.005/i386-linux /usr/lib/perl5/site_perl/5.005 . 
/usr/local/apache_perl/ /usr/local/apache_perl/lib/perl) at 
/usr/lib/perl5/site_perl/5.005/i386-linux/mod_perl.pm line 65535
 BEGIN failed--compilation aborted at 
/usr/lib/perl5/site_perl/5.005/Apache/VMonitor.pm line 10.
 BEGIN failed--compilation aborted at /usr/local/apache_perl/startup.pl line 11.
 
 /usr/local/apache_perl/bin/perlctl start: httpd could not be started
 [root@alex apache_perl]# 
 
 Apache::Util is installed, and everything else seems to work.. 
 
 Any ideas where to look?
 
 Cheers,
 
 Alex
 

I'm sorry, I was away and didn't have a chance to answer mod_perl emails
yet. I saw your post at the list.

It seems that you and me have the same system. Mine is linux RH6.1
apache1.13 mod_perl1.23 perl5.005_03. And it works Ok. 

Your problem has nothing to do with Apache::VMonitor, since it relies on
Apache::Util to work. You should post a proper bug report to the list. By
proper I mean asking for help with Apache::Util and not Apache::VMonitor,
so the right people will look into it.

You should try this script:

  my $r = Apache-request;
  $r-send_http_header("text/html");
  use Apache::Util ();
  print Apache::Util::escape_html("code");

If this doesn't produce "code" and produces the same errors, you have
some problem with Apache::Util. Did 'make test' pass Ok when you have
installed mod_perl?



__
Stas Bekman | JAm_pH--Just Another mod_perl Hacker
http://stason.org/  | mod_perl Guide  http://perl.apache.org/guide 
mailto:[EMAIL PROTECTED]  | http://perl.orghttp://stason.org/TULARC/
http://singlesheaven.com| http://perlmonth.com http://sourcegarden.org
--




Oh oh

2000-04-28 Thread FEITO Nazareno

I was just changing some scripting things DBI and those... but now i´m
trying to connect to my localhost and i receive this message:
Proxy Error
The proxy server received an invalid response from an upstream server. 
The proxy server could not handle the request GET
/scripts/formato/home.phtml /scripts/formato/home.phtml. 
Reason: Could not connect to remote machine: Connection refused 

Apache/1.3.12 Server at 32.95.95.202 Port 80

anyone can tellme what´s the problem now? i´m a little newbie and I like
this font ;)
Nazareno 
Perl Programmer(yea, right)  www.obsequie.com





RE: Apache Redirection

2000-04-28 Thread FEITO Nazareno

I am under an IBM proxy I don´t know if that is afecting me...
I´m not using mod_proxy or something like that...
My httpd.conf is nothing weird...



Re: Proxy front end behind 64k

2000-04-28 Thread Matt Sergeant

On Fri, 28 Apr 2000, Dave Hodgkinson wrote:

 Matt Sergeant wrote:
  
  I'm behind a 64k leased line here (net access is *extremely* expensive
  here in the UK) and I was thinking, a proxy front end is probably really
  not necessary for me. Worst case scenario: I get 8 clients connecting to
  my at about 1KB/s - my pipe is maxed out anyway, so pushing them
  onto a proxy is just making more work! Just a thought for anyone
  thinking about a proxy front end - evaluate your pipe too.
  
 
 I couldn't get your CV:
 
 Not Found
 
 The requested URL /cgi-bin/xmerge.pl was not found on this server.
 
 Additionally, a 404 Not Found error was encountered while trying to use
 an ErrorDocument to handle the request. 

That's OK - I'm snowed under work-wise for just about the rest of my life
;-)

-- 
Matt/

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




Re: Apache Redirection

2000-04-28 Thread Ime Smits

| I have a problem loading pictures on IE5, www.obsequie.com and
| www.obsequie.com.ar -(this redirect to www.obsequie.com) is having
troubles
| ith load images from IE5, with Netscape all is ok but with IE5 no images
on
| the screen, is a problem about apache?

If you even get MSIE not to recognise things, you propably messed up real
bad. Most of the time, IE accepts about anything - and thus masquerade the
fact that something is really wrong. It's the only browser I know which
totally refuses to obey any standards in the returned headers and makes it's
own decision: processing a text/plain or even image/* document as html as
soon as it sees a html tag, accepting images just because somewhere in the
datastream it recognises something, regardless of content-type headers etc.
etc. etc.

From what I see I think you seriously messed up proxiepass, proxyreverse and
303/304 redirects. It seems to be a http 1.1 specific problem also... But
wait... what kind of config do you have anyway? See this:

[ime@gtw ~/.html]$ wget -S
http://www.obsequie.com/imagenes/header/obsequie.gif
--17:57:36--  http://www.obsequie.com:80/imagenes/header/obsequie.gif
   = `obsequie.gif'
Connecting to www.obsequie.com:80... connected!
HTTP request sent, awaiting response... 200 OK
2 Date: Tue, 11 Apr 2000 02:23:37 GMT
3 Server: Apache/1.3.4 (Unix)
4 Last-Modified: Wed, 23 Feb 2000 17:01:54 GMT
5 ETag: "20906f7-917-38b41282"
6 Accept-Ranges: bytes
7 Content-Length: 2327
8 Connection: close
9 Content-Type: image/gif
10 Warning: 13 :80 Heuristic expiration  ?
11 Warning: 99 :80 Expiry checking disabled - ?
12 Age: 1535620

Please... if you want some help, provide us  with more details and show us
relevant sections of your httpd.conf.

Ime






Re: speed up/load balancing of session-based sites

2000-04-28 Thread Jeffrey W. Baker

On Fri, 28 Apr 2000, Joshua Chamas wrote:

 Dan McCormick wrote:
  
  All this talk of mod_proxy has me wondering:  What's the conventional
  wisdom regarding the speed up or load balancing of a server running
  something like Apache::ASP, or anything else that tracks sessions?
  
  If you split things between a proxy and a mod_perl server, the first hit
  would have to go through to the mod_perl server to initiate the session,
  but subsequent requests which may not need the session info could be
  sent to the proxy.  Is that possible?
  
  Further, what are the standard ways to load balance a session-tracking
  app across multiple servers when the sessions are stored in memory and a
  given user has to be consistently sent back to the same machine?  Can
  round-robin DNS be counted on to send people back to the same server
  over the life of a given session?
  
 
 They can all go through the proxy, the savings is that the proxy
 will buffer down the slow internet pipes that clients have, freeing
 up the modperl httpd for other things.
 
 About load balancing, we are running the StateDir to a non caching
 NFS mount point to a NetApp cluster.  There is a problem with NFS
 locking, and Apache::ASP can't ensure data integrety over the 
 network, even if patched up to use NFS locking.  Seem like there 
 might be Linux NFS locking unresolved issues, that people see 
 with MySQL too.  
 
 The upshot is that in this environment, it helps to use SDBM_File, 
 the default, not DB_File, since DB_File gets corrupted, whereas 
 SDBM_File may just not save some data if there are too many 
 concurrent hits, but Apache::ASP will repair the parts that 
 are necessary, as this is all really concerning a central db that 
 it keeps.
 
 Further, I have recently done some work in my dev v.19 so that 
 there will be fewer problems with the Session_OnEnd event, with the 
 fix being to have one process on one web server being responsible
 for session management at any one time, so there are not conflicts
 which there would otherwise be.
 
 With sharing state files to an NFS share, the sessions can move
 from server to server even if one server goes offline, which 
 you won't find with solutions that have clients stay on a server 
 saving session data locally in RAM or disk.

On my sites I use a central database for storing the session objects, and
all of the https servers access this central resource.  Obviously if it
goes down, everything is toast, but the same can be said of the database
that stores all of the customer information, etc.

-jwb




error in Apache::Util

2000-04-28 Thread Alex Krohn

Hi!

I'm running mod_perl 1.23/apache 1.3.12/perl 5.005_03 on Mandrake 7.
mod_perl seems to be up and running and things are working well.
However, I add:

Location /test
SetHandler perl-script
PerlHandler My::Test
/Location

and Test.pm looks like:

sub handler {
  my $r = shift;
  $r-send_http_header("text/html");
  use Apache::Util ();
  print Apache::Util::escape_html("code");
}

When I go to /test I get internal server error, and this in the logs:

[Fri Apr 28 12:59:57 2000] [error] Can't locate loadable object for 
module Apache::Util in @INC (@INC contains: /home/alex
/usr/lib/perl5/5.00503/i386-linux /usr/lib/perl5/5.00503
/usr/lib/perl5/site_perl/5.005/i386-linux /usr/lib/perl5/site_perl/5.005
. /usr/local/apache_perl/ /usr/local/apache_perl/lib/perl) at
/usr/lib/perl5/site_perl/5.005/i386-linux/mod_perl.pm line 65535
BEGIN failed--compilation aborted at /home/alex/My/Tester.pm line 8.

[Fri Apr 28 12:59:57 2000] [error] Undefined subroutine My::Tester::handler called.

which seems to be a problem loading Apache::Util. Any idea where to go
from here to debug?

Cheers,

Alex



Re: MS IE does not accept my cookies!

2000-04-28 Thread jb

On Fri, Apr 28, 2000 at 03:01:01PM -0500, Igor Chudov @ home wrote:
 
 Glad you liked it! I am having fun writing it... I hope that it is helpful
 to children...

Maybe, but if I see more of those punch the monkey ads, i'm going to retire
to a log cabin in the woods and write an anti-web manifesto ..



HELP: modules/ssi...FAILED before any test output arrived

2000-04-28 Thread James Olsen

Hello,

I'm trying to compile Apache 1.3.12 and mod_perl 1.23 against perl 5.005_02

I'm using this to build mod_perl/Apache:

perl Makefile.PL USE_APACI=1 \
 EVERYTHING=1 \
 APACHE_PREFIX=$PREFIX \
 APACHE_SRC=$APACHE/src \
 DO_HTTPD=1 \
 APACI_ARGS=--enable-module=so,--enable-shared=perl

And make test returns the following error (and surrounding lines)

modules/src.ok
modules/ssi.FAILED before any test output arrived
modules/stage...skipping test on this platform

I'm not sure how to troubleshoot this problem.

Any suggestions? I've kept the entire output from makefile.pl, make, and 
make test if you want to view any information from them.

--James





IGNORE: modules/ssi...FAILED before any test output arrived

2000-04-28 Thread James Olsen

Hello,

Sorry, I missed the line in the output stating DSO and PERLSSI don't play 
nice together.

I should have paid more attention. My apologies.

--James




Re: speed up/load balancing of session-based sites

2000-04-28 Thread Dan McCormick

"Jeffrey W. Baker" wrote:
 
 On my sites I use a central database for storing the session objects, and
 all of the https servers access this central resource.  Obviously if it
 goes down, everything is toast, but the same can be said of the database
 that stores all of the customer information, etc.
 
 -jwb

Are you using Apache::ASP to generate sessions?  

Has anyone tried using Tie::DBI to store Apache::ASP sessions in a db? 
That might solve problems with NFS sharing issues, though it might also
bog things down.

Dan



mod_perl Win32 binary

2000-04-28 Thread Randy Kobes

Hi,
   I've placed at ftp://theoryx5.uwinnipeg.ca/pub/other/ (linked
to from http://perl.apache.org/) a self-extracting archive
(perl-win32-bin-0.6.exe) containing Win32 binaries of Perl-5.6.0,
mod_perl-1.23, Apache_1.3.12, and mod_ssl-2.6.3-1.3.12. Perl was 
compiled without fork emulation, and consequently this binary
is not compatible with ActiveState's Perl. As well as some popular
non-core modules such as libwww, Tk, and GD, this package also 
contains DBI and drivers such as CSV, ODBC, mysql, and msql, as well
as HTML::Embperl-1.3b3, HTML::EP, HTML::Mason, and others. Included 
are installation instructions - please let me know of any problems.

best regards,
randy kobes




Help - Install mod_perl-1.23

2000-04-28 Thread James Xie

Helllo,

I recently downloaded Apache_1.3.12 and installed it on Redhat 6.1,
everything was working fine. I run into problems when I tried to install
mod_perl-1.23. Everything was compiled ok, but I got error messages (see
below) when I try to run the make test. I'm new to both Apache and mod_perl,
thank you for your help in advance. 

Thanks:

how I make it:
perl Makefile EVERYTHING=1 APACHE_PREFIX=/usr/local/apache
make
make test

*
My Environment:
RedHat 6.1
apache_1.3.12
Perl5.004 (comes with Redhat)
mod_perl-1.23 
CGI-modules-2.76
Bundle-libnet-1.00
Digest-MD5-2.09
HTML-Parser-3.07
MIME-Base64-2.11
URI-1.06
lcwa-1.0.0
libwww-perl-5.48


Output from make test

cd ../apache_1.3.12  make)
make[1]: Entering directory `/home/jxie/apache_1.3.12'
=== src
make[2]: Entering directory `/home/jxie/apache_1.3.12'
make[3]: Entering directory `/home/jxie/apache_1.3.12/src'
=== src/regex
make[4]: Nothing to be done for `all'.
=== src/regex
=== src/os/unix
make[4]: Nothing to be done for `all'.
=== src/os/unix
=== src/ap
make[4]: Nothing to be done for `all'.
=== src/ap
=== src/main
make[4]: Nothing to be done for `all'.
=== src/main
=== src/lib
=== src/lib
=== src/modules
=== src/modules/standard
make[5]: Nothing to be done for `all'.
=== src/modules/standard
=== src/modules/perl
make[5]: Nothing to be done for `all'.
=== src/modules/perl
=== src/modules
cc -c -I. -I/usr/lib/perl5/5.00503/i386-linux/CORE -I./os/unix -I./include
-DLINUX=2 -DMOD_PERL -DUSE_PERL_SSI -Dbool=char -DHAS_BOOL
-I/usr/local/include -DUSE_HSREGEX -DNO_DL_NEEDED `./apaci` modules.c
cc -c -I. -I/usr/lib/perl5/5.00503/i386-linux/CORE -I./os/unix -I./include
-DLINUX=2 -DMOD_PERL -DUSE_PERL_SSI -Dbool=char -DHAS_BOOL
-I/usr/local/include -DUSE_HSREGEX -DNO_DL_NEEDED `./apaci` buildmark.c
cc  -DLINUX=2 -DMOD_PERL -DUSE_PERL_SSI -Dbool=char -DHAS_BOOL
-I/usr/local/include -DUSE_HSREGEX -DNO_DL_NEEDED `./apaci`\
  -o httpd buildmark.o modules.o modules/standard/libstandard.a
modules/perl/libperl.a main/libmain.a ./os/unix/libos.a ap/libap.a
regex/libregex.a   -lm -lcrypt -rdynamic  -L/usr/local/lib
/usr/lib/perl5/5.00503/i386-linux/auto/DynaLoader/DynaLoader.a
-L/usr/lib/perl5/5.00503/i386-linux/CORE -lperl -lnsl -ldl -lm -lc -lposix
-lcrypt 
make[3]: Leaving directory `/home/jxie/apache_1.3.12/src'
make[2]: Leaving directory `/home/jxie/apache_1.3.12'
make[2]: Entering directory `/home/jxie/apache_1.3.12'
=== src/support
make[3]: Entering directory `/home/jxie/apache_1.3.12/src/support'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/jxie/apache_1.3.12/src/support'
=== src/support
make[2]: Leaving directory `/home/jxie/apache_1.3.12'
=== src
make[1]: Leaving directory `/home/jxie/apache_1.3.12'
make[1]: Entering directory `/home/jxie/mod_perl-1.23/Apache'
make[1]: Leaving directory `/home/jxie/mod_perl-1.23/Apache'
make[1]: Entering directory `/home/jxie/mod_perl-1.23/Connection'
make[1]: Leaving directory `/home/jxie/mod_perl-1.23/Connection'
make[1]: Entering directory `/home/jxie/mod_perl-1.23/Constants'
make[1]: Leaving directory `/home/jxie/mod_perl-1.23/Constants'
make[1]: Entering directory `/home/jxie/mod_perl-1.23/File'
make[1]: Leaving directory `/home/jxie/mod_perl-1.23/File'
make[1]: Entering directory `/home/jxie/mod_perl-1.23/Leak'
make[1]: Leaving directory `/home/jxie/mod_perl-1.23/Leak'
make[1]: Entering directory `/home/jxie/mod_perl-1.23/Log'
make[1]: Leaving directory `/home/jxie/mod_perl-1.23/Log'
make[1]: Entering directory `/home/jxie/mod_perl-1.23/ModuleConfig'
make[1]: Leaving directory `/home/jxie/mod_perl-1.23/ModuleConfig'
make[1]: Entering directory `/home/jxie/mod_perl-1.23/PerlRunXS'
make[1]: Leaving directory `/home/jxie/mod_perl-1.23/PerlRunXS'
make[1]: Entering directory `/home/jxie/mod_perl-1.23/Server'
make[1]: Leaving directory `/home/jxie/mod_perl-1.23/Server'
make[1]: Entering directory `/home/jxie/mod_perl-1.23/Symbol'
make[1]: Leaving directory `/home/jxie/mod_perl-1.23/Symbol'
make[1]: Entering directory `/home/jxie/mod_perl-1.23/Table'
make[1]: Leaving directory `/home/jxie/mod_perl-1.23/Table'
make[1]: Entering directory `/home/jxie/mod_perl-1.23/URI'
make[1]: Leaving directory `/home/jxie/mod_perl-1.23/URI'
make[1]: Entering directory `/home/jxie/mod_perl-1.23/Util'
make[1]: Leaving directory `/home/jxie/mod_perl-1.23/Util'
cp t/conf/mod_perl_srm.conf t/conf/srm.conf
../apache_1.3.12/src/httpd -f `pwd`/t/conf/httpd.conf -X -d `pwd`/t 
httpd listening on port 8529
will write error_log to: t/logs/error_log
letting apache warm up...\c
done
/usr/bin/perl t/TEST 0
still waiting for server to warm up...not ok

Error log

[Fri Apr 28 09:52:07 2000] [warn] pid file
/home/jxie/mod_perl-1.23/t/logs/httpd
.pid overwritten -- Unclean shutdown of previous Apache run?
[notice] Destruction-DESTROY called for $global_object
[Fri Apr 28 09:52:08 2000] [warn] [notice] child_init for process 5843,

Re: speed up/load balancing of session-based sites

2000-04-28 Thread Joshua Chamas

"Jeffrey W. Baker" wrote:

 
  With sharing state files to an NFS share, the sessions can move
  from server to server even if one server goes offline, which
  you won't find with solutions that have clients stay on a server
  saving session data locally in RAM or disk.
 
 On my sites I use a central database for storing the session objects, and
 all of the https servers access this central resource.  Obviously if it
 goes down, everything is toast, but the same can be said of the database
 that stores all of the customer information, etc.
 

How many writes and session ties per second does this system
handle, and what kind of db are you using.  Currently the NetApp
NFS file sharing approach seems to max out around 40 Apache::ASP 
style session creations per second.  This involves writing to a 
central internal session for session tracking, and the creation of 
the relevant db files.

I ask because I'm looking at going with your approach to handle greater 
loads, and wondering where you max out at with MySQL/Oracle (?),  what 
kind of hardware you are running.

-- Joshua



Re: speed up/load balancing of session-based sites

2000-04-28 Thread Joshua Chamas

Dan McCormick wrote:
 
 Are you using Apache::ASP to generate sessions?
 
 Has anyone tried using Tie::DBI to store Apache::ASP sessions in a db?
 That might solve problems with NFS sharing issues, though it might also
 bog things down.
 

If you just want a simple $Session holder, you can always define
the $Session object as an Apache::Session in your global.asa
Script_OnStart, and it will be available for every script.
This could then be easily database driven.

The reason why I have not done a db version of the Apache::ASP
session is that the session management logic is non trivial,
when you are talking about realtime session garbage collection,
and the handling of the Session_OnEnd event.

--Joshua



Re: speed up/load balancing of session-based sites

2000-04-28 Thread Adi

"Jeffrey W. Baker" wrote:
 
 On Fri, 28 Apr 2000, Dan McCormick wrote:
 
  "Jeffrey W. Baker" wrote:
  
   On my sites I use a central database for storing the session objects, and
   all of the https servers access this central resource.  Obviously if it
   goes down, everything is toast, but the same can be said of the database
   that stores all of the customer information, etc.
  
   -jwb
 
  Are you using Apache::ASP to generate sessions?
 
  Has anyone tried using Tie::DBI to store Apache::ASP sessions in a db?
  That might solve problems with NFS sharing issues, though it might also
  bog things down.
 
 No, I use Apache::Session - jwb

Dan,

I suggest you switch to Apache::Session.  If you've got a site that gets
heavy traffic (which sounds like is the case if you're thinking about load
balancing), you definitely want a true DBMS handling your session data, not
just a Berkeley DB_File.

I used to use Apache::ASP for session management but switched to
Apache::Session for this reason.  I think Apache::ASP is a great solution
for low-traffic sites, but Apache::Session is a must for high-volume and/or
load-balanced sites.

Apache::Session incorporates its own Tie::DBI implementation to manage
sessions.  (is this correct, Jeffrey?)  I don't know how successful you'd be
taking a hash already tied to a DB_File (via Apache::ASP) and then trying to
tie it to a DBMS via Tie::DBI.  At best, you'd have two copies of your
session data, but most likely it wouldn't work.

-Adi




Re: speed up/load balancing of session-based sites

2000-04-28 Thread Jeffrey W. Baker

On Fri, 28 Apr 2000, Adi wrote:

 "Jeffrey W. Baker" wrote:
  
  On Fri, 28 Apr 2000, Dan McCormick wrote:
  
   "Jeffrey W. Baker" wrote:
   
On my sites I use a central database for storing the session objects, and
all of the https servers access this central resource.  Obviously if it
goes down, everything is toast, but the same can be said of the database
that stores all of the customer information, etc.
   
-jwb
  
   Are you using Apache::ASP to generate sessions?
  
   Has anyone tried using Tie::DBI to store Apache::ASP sessions in a db?
   That might solve problems with NFS sharing issues, though it might also
   bog things down.
  
  No, I use Apache::Session - jwb
 
 Dan,
 
 I suggest you switch to Apache::Session.  If you've got a site that gets
 heavy traffic (which sounds like is the case if you're thinking about load
 balancing), you definitely want a true DBMS handling your session data, not
 just a Berkeley DB_File.

I wouldn't buy that one on its own merits.  I think that each site should
evaluate their performance situation and see what backing store works for
them.  Sleepycat DB (nee Berkeley DB) 3.x, using balanced tree storage, is
a damn fast storage mechanism.  If you only have a single web server, dbm
files are often the fastest blob storage mechanism.  With that said,
remote DBMS storage scales best with more than a single web server.  Much
better than NFS.

 I used to use Apache::ASP for session management but switched to
 Apache::Session for this reason.  I think Apache::ASP is a great solution
 for low-traffic sites, but Apache::Session is a must for high-volume and/or
 load-balanced sites.
 
 Apache::Session incorporates its own Tie::DBI implementation to manage
 sessions.  (is this correct, Jeffrey?)  I don't know how successful you'd be
 taking a hash already tied to a DB_File (via Apache::ASP) and then trying to
 tie it to a DBMS via Tie::DBI.  At best, you'd have two copies of your
 session data, but most likely it wouldn't work.

Apache::Session is similar to Tie::DBI in that it knows how to take your
perl structures, put them in a backing store, and get them back out.  It
is unlike Tie::DBI in that it also knows how to put your data in flat
files, berkeley DBs, and whatever else you need.

"Apache::Session is a persistence framework"

-jwb




What's next for Apache::Session

2000-04-28 Thread Jeffrey W. Baker

The next version of Apache::Session is almost ready.  This version is
dubbed 1.50 because of it's significant-but-not-outrageous changes.  The
changes from 1.03 are:

1) New backing stores can stash data in Berkeley DB via the BerkeleyDB
module, or any dbm format via AnyDBM_File.

2) The ID generator and the data serializer are no longer hard-wired into
the Session superclass.  They are pluggable and interchangeable in the
same way that the backing store and locking manager are in 1.03.  This was
done mainly for people who implement non-jwb session ID policies and to
increase compatibility with non-mysql databases.  Users of postgres can
now create ASCII serialized sessions by using the Base64
serializer.  FreezeThaw serialization is also supported.

3) The new interface class Apache::Session::Flex allows the runtime
specification of the backing store, lock manager, serializer, and ID
generator.  This was by popular demand, and should benefit rapid
development as well as other systems like Embperl and ASP.

4) The DBI interface class has been modified to accept an already-open DBI
handler as an argument.

5) New interface classes have been added for Apache::Session::Postgres,
::Sybase, and ::Oracle.  These are special cases of ::Flex.

That is all.  I'm working on it this weekend if anyone has any more
suggestions.

Regards,
Jeffrey




Re: speed up/load balancing of session-based sites

2000-04-28 Thread Jeffrey W. Baker

On Fri, 28 Apr 2000, Adi wrote:

 Joshua Chamas wrote:
  How many writes and session ties per second does this system
  handle, and what kind of db are you using.  Currently the NetApp
  NFS file sharing approach seems to max out around 40 Apache::ASP
  style session creations per second.  This involves writing to a
  central internal session for session tracking, and the creation of
  the relevant db files.
  
  I ask because I'm looking at going with your approach to handle greater
  loads, and wondering where you max out at with MySQL/Oracle (?),  what
  kind of hardware you are running.
  
  -- Joshua
 
 I don't have any exact figures, but it is very high.  I run MySQL on a
 single processor Linux box with a 500Mhz K6-2 with 128M RAM.  Even if it's
 40/sec on that hardware, it is a scalable solution.  All decent DBMSes are
 multi-threaded and scale with number of CPUs.  Is the NetApp NFS approach as
 scalable ?  I don't know enough about it to compare...
 
 Sorry for not providing exact benchmark numbers..

It ought to be a lot higher than 40/sec on that hardware.  On low class
hardware a year ago, I was getting number an order of magnitude higher
than that with the database on the local machine.  See here:

http://forum.swarthmore.edu/epigone/modperl/feespaysmox

-jwb

PS: I love epigone because it produces wonderfully pronouncable mangled
URLs.




Re: What's next for Apache::Session

2000-04-28 Thread Ajit Deshpande

On Fri, Apr 28, 2000 at 03:25:18PM -0700, Jeffrey W. Baker wrote:
 The next version of Apache::Session is almost ready.  This version is
 dubbed 1.50 because of it's significant-but-not-outrageous changes.  The
 changes from 1.03 are:
 
  ...

 4) The DBI interface class has been modified to accept an already-open DBI
 handler as an argument.

Excellent!

 5) New interface classes have been added for Apache::Session::Postgres,
 ::Sybase, and ::Oracle.  These are special cases of ::Flex.

I currently modify the connection sub in DBIStore.pm  as follows:

sub connection {
my $self= shift;
my $session = shift;

return if (defined $self-{dbh});

$self-{dbh} = DBI-connect($session-{args}-{DataSource},
$session-{args}-{UserName}, $session-{args}-{Password},
{ RaiseError = 1, AutoCommit = 1, 
  LongReadLen = $session-{args}-{LongReadLen} 
}) || die $DBI::errstr;
}

i.e. I pass the LongReadLen parameter for Oracle. Would something like 
this be a part of the new ::Oracle interface class?

Ajit



Re: speed up/load balancing of session-based sites

2000-04-28 Thread Adi

"Jeffrey W. Baker" wrote:
 
 On Fri, 28 Apr 2000, Adi wrote:
 
  "Jeffrey W. Baker" wrote:
  
   On Fri, 28 Apr 2000, Dan McCormick wrote:
  
"Jeffrey W. Baker" wrote:

 On my sites I use a central database for storing the session objects, and
 all of the https servers access this central resource.  Obviously if it
 goes down, everything is toast, but the same can be said of the database
 that stores all of the customer information, etc.

 -jwb
   
Are you using Apache::ASP to generate sessions?
   
Has anyone tried using Tie::DBI to store Apache::ASP sessions in a db?
That might solve problems with NFS sharing issues, though it might also
bog things down.
  
   No, I use Apache::Session - jwb
 
  Dan,
 
  I suggest you switch to Apache::Session.  If you've got a site that gets
  heavy traffic (which sounds like is the case if you're thinking about load
  balancing), you definitely want a true DBMS handling your session data, not
  just a Berkeley DB_File.
 
 I wouldn't buy that one on its own merits.  I think that each site should
 evaluate their performance situation and see what backing store works for
 them.  Sleepycat DB (nee Berkeley DB) 3.x, using balanced tree storage, is
 a damn fast storage mechanism.  If you only have a single web server, dbm
 files are often the fastest blob storage mechanism.  With that said,
 remote DBMS storage scales best with more than a single web server.  Much
 better than NFS.
 

Good point, I didn't think of blob data.  Storable is relatively slow
compared to dbm?  How hard do you think it would be to take DBM code and
write it into simply a data serializer (like Storable's nfreeze)?  That
would be the best of both worlds, eh?

I was under the impression that Sleepycat is a much better solution for
embedding into an application, where all data is kept in memory.  I wouldn't
think .db files could come close to a caching DBMS like MySQL, unless the
.db file is on a caching filesystem.

Another plus for using MySQL to store sessions is that version 3.23 (alpha)
has entirely in-memory heap tables.  This is a perfect fit for session data,
since sessions typically last a very short time, and one can assume the
database restart to session turnover ratio is very low.

-Adi




Re: speed up/load balancing of session-based sites

2000-04-28 Thread Adi

"Jeffrey W. Baker" wrote:
 
 On Fri, 28 Apr 2000, Adi wrote:
 
  Joshua Chamas wrote:
   How many writes and session ties per second does this system
   handle, and what kind of db are you using.  Currently the NetApp
   NFS file sharing approach seems to max out around 40 Apache::ASP
   style session creations per second.  This involves writing to a
   central internal session for session tracking, and the creation of
   the relevant db files.
  
   I ask because I'm looking at going with your approach to handle greater
   loads, and wondering where you max out at with MySQL/Oracle (?),  what
   kind of hardware you are running.
  
   -- Joshua
 
  I don't have any exact figures, but it is very high.  I run MySQL on a
  single processor Linux box with a 500Mhz K6-2 with 128M RAM.  Even if it's
  40/sec on that hardware, it is a scalable solution.  All decent DBMSes are
  multi-threaded and scale with number of CPUs.  Is the NetApp NFS approach as
  scalable ?  I don't know enough about it to compare...
 
  Sorry for not providing exact benchmark numbers..
 
 It ought to be a lot higher than 40/sec on that hardware.  On low class
 hardware a year ago, I was getting number an order of magnitude higher
 than that with the database on the local machine.  See here:
 

~300 req/sec, good to hear!  I am sort of in the dark, as we haven't had
time to benchmark anything yet.

Thanks -Adi




Re: speed up/load balancing of session-based sites

2000-04-28 Thread Joshua Chamas

"Jeffrey W. Baker" wrote:
 
  Sorry for not providing exact benchmark numbers..
 
 It ought to be a lot higher than 40/sec on that hardware.  On low class
 hardware a year ago, I was getting number an order of magnitude higher
 than that with the database on the local machine.  See here:
 
 http://forum.swarthmore.edu/epigone/modperl/feespaysmox
 

Thanks Jeff, that's just what I was looking for:

Performance on a Celeron 333/128MB/Linux/mySQL box:
Create new empty session: 385 requests/second
Create new session and write to it: 233 requests/second
Retrieve old session: 400 requests/second
Retrieve old session and read from it: 400 requests/second
Retrieve old session, read it, write to it: 256 requests/second

Has anyone done similar benchmarks with Apache::Session 
hooked into Oracle?

Thanks,

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



Re: What's next for Apache::Session

2000-04-28 Thread Bryan McGuire

ditto!
- Original Message - 
From: Igor Chudov @ home [EMAIL PROTECTED]
To: Jeffrey W. Baker [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, April 28, 2000 8:11 PM
Subject: Re: What's next for Apache::Session


 reuse of already open database handles is what I was parying for. I use
 oracle
 
 
 - Igor.




Re: speed up/load balancing of session-based sites

2000-04-28 Thread Autarch

On Fri, 28 Apr 2000, Igor Chudov @ home wrote:

 My persistent oracle connections are cached properly with mod_perl and
 are no problem.

Are you loading Apache::DBI before you use Apache::Session?  Also make
sure that whatever params you give in your connects (or
connect_on_init) match those you give to Apache::Session.

-dave


/*==
www.urth.org
We await the New Sun
==*/




Re: speed up/load balancing of session-based sites

2000-04-28 Thread Joshua Chamas

"Igor Chudov @ home" wrote:
 
 Joshua Chamas wrote:
  Performance on a Celeron 333/128MB/Linux/mySQL box:
  Create new empty session: 385 requests/second
  Create new session and write to it: 233 requests/second
  Retrieve old session: 400 requests/second
  Retrieve old session and read from it: 400 requests/second
  Retrieve old session, read it, write to it: 256 requests/second
 
  Has anyone done similar benchmarks with Apache::Session
  hooked into Oracle?
 
 It took a few seconds per request:) Seriously. It takes a long time
 to open an oracle connection... Had to switch to FileStore...
 
 - Igor.

Shouldn't this performance be better if using Apache::DBI
to cache db handles per process?

-- Joshua



[ANNOUNCE] Apache::DumpHeaders 0.20

2000-04-28 Thread Ask Bjoern Hansen


The uploaded file

Apache-DumpHeaders-0.20.tar.gz

has entered CPAN as

  file: $CPAN/authors/id/ABH/Apache-DumpHeaders-0.20.tar.gz
  size: 2717 bytes
   md5: f826dc5f776398e826e6579557e2ac80

http://www.cpan.org/authors/id/ABH/Apache-DumpHeaders-0.20.tar.gz

0.20  Fri Apr 28 2000
- Added DumpHeaders_Percent option
- Added DumpHeaders_Conditional option
- Included Apache::ProxyPassThru.pm (Not tested very well though)

These options makes it easier to enable Apache::DumpHeaders in a busy
production environment. I'm using it to dump the headers of n percent of
the transactions if another module sees a certain problem and marks the
request as "dumpable".

I've also included Apache::ProxyPassThru.pm from the old contrib package.
It makes it very easy to dump all headers from your browser to all sites
you visit for debugging.


 - ask

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




Re: modproxy:modperl ratios...

2000-04-28 Thread Greg Stark


A few lessons on this arena:

1) Move your pictures to another server *even if you're using a proxy*
   Search back in the archives for my previous post on this topic.

2) If you use mod_proxy you can give it the same web root and have it serve
   some static objects itself instead of having to cache them. But 1) is even
   better than doing this. Sometimes you might not have a choice, such as with
   java applets.

3) mod_proxy is poorly designed and poorly implemented. The main deficiency is
   that each process is responsible for opening and maintaining its connection
   to the backend. This defeats keep-alives completely and forces a lot of
   overhead in the kernel and the servers.
 
   There's a much better design that involves creating a fixed number of
   sockets and treating that as a shared pool. In that design the backend can
   have a long keep-alive timeout and maintain persistent connections to the
   front-end. 


Despite these concerns I've been using mod_proxy myself and it does work. I'm
planning to change to mod_backhand though which implements 3) but it's new
code.

-- 
greg




Re: modproxy:modperl ratios...

2000-04-28 Thread shane


Yep all these things are true.  Well, the part about being poorly
designed is wrong, it just was designed well, then hacked to death
:-), I guess I'm splitting hairs, but the essential design is easy to
follow.  I picked up the entire module in a just a few hours.  (I just
think it isn't fair to the original designer to say that :-)

Anyhow... I've heard the keepalives are getting fixed, but I haven't
seen any code yet.  Theres also other stuff in the mix that I think
you guys will see start to show up in say 1-2 months that will make
mod_proxy..., or whatever mod_proxy becomes into a mean lean
webserving proxy machine!  Seriously though... with all the stuff
that's happening with this module, I think you guys will be really
happy with the results.

One thing to note that might be slightly sad..., I've heard it might
be breaking from apache into a seperate program.  Become a seperate
ASF project.  This is something that's being tossed around, but likely
it will use all the same directives that folks are used too etc.  Oh
well, I don't know if that will happen, but admittedly it makes sense.
It just seems theres so much that could be done with it for 90% of the
platforms, but 100% just won't make it in.  So it's either split with
apache and have mind numbing performance, or have something mediocre 
(like we have now).  Also if we split, it's going to be a lot lighter
weight than it already is.

In short... this module is in for lots of cool stuff.  And I'm
speaking of lots of developers working on it.  Four that I know of for
sure, two of which have already done a huge body of work on this
module.

Thanks,
Shane.


On Sat, Apr 29, 2000 at 12:35:39AM -0400, Greg Stark wrote:
 
 A few lessons on this arena:
 
 1) Move your pictures to another server *even if you're using a proxy*
Search back in the archives for my previous post on this topic.
 
 2) If you use mod_proxy you can give it the same web root and have it serve
some static objects itself instead of having to cache them. But 1) is even
better than doing this. Sometimes you might not have a choice, such as with
java applets.
 
 3) mod_proxy is poorly designed and poorly implemented. The main deficiency is
that each process is responsible for opening and maintaining its connection
to the backend. This defeats keep-alives completely and forces a lot of
overhead in the kernel and the servers.
  
There's a much better design that involves creating a fixed number of
sockets and treating that as a shared pool. In that design the backend can
have a long keep-alive timeout and maintain persistent connections to the
front-end. 
 
 
 Despite these concerns I've been using mod_proxy myself and it does work. I'm
 planning to change to mod_backhand though which implements 3) but it's new
 code.
 
 -- 
 greg
 



cvs commit: modperl-2.0/src/modules/perl mod_perl.h

2000-04-28 Thread dougm

dougm   00/04/28 13:07:34

  Modified:src/modules/perl mod_perl.h
  Log:
  fixed in apache-2.0
  
  Revision  ChangesPath
  1.13  +0 -4  modperl-2.0/src/modules/perl/mod_perl.h
  
  Index: mod_perl.h
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/mod_perl.h,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- mod_perl.h2000/04/25 05:57:48 1.12
  +++ mod_perl.h2000/04/28 20:07:34 1.13
  @@ -12,10 +12,6 @@
   #undef dNOOP
   #define dNOOP extern int __attribute__ ((unused)) Perl___notused
   
  -/*XXX*/
  -#undef TRUE
  -#undef FALSE
  -
   #include "ap_mmn.h"
   #include "httpd.h"
   #include "http_config.h"
  
  
  



cvs commit: modperl-2.0/src/modules/perl modperl_callback.c modperl_interp.c

2000-04-28 Thread dougm

dougm   00/04/28 19:28:36

  Modified:.00README_FIRST Makefile.PL
   src/modules/perl modperl_callback.c modperl_interp.c
  Removed: patches  perl_no_get_context.pat
  Log:
  no patch to 5.6.0 is needed when PERL_SET_CONTEXT is properly used
  tell perl_clone() not to clone the stacks (requires scopestack_ix hack)
  
  Revision  ChangesPath
  1.6   +1 -2  modperl-2.0/00README_FIRST
  
  Index: 00README_FIRST
  ===
  RCS file: /home/cvs/modperl-2.0/00README_FIRST,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- 00README_FIRST2000/04/25 05:16:07 1.5
  +++ 00README_FIRST2000/04/29 02:28:34 1.6
  @@ -8,8 +8,7 @@
   and on the list
   
   if you want to try building with an interpreter pool, you'll need Perl
  -5.6.0 with patches/perl_no_get_context.pat applied and Perl built like 
  -so:
  +5.6.0 built like so:
   
   % ./Configure -des -Dusethreads
   
  
  
  
  1.17  +1 -1  modperl-2.0/Makefile.PL
  
  Index: Makefile.PL
  ===
  RCS file: /home/cvs/modperl-2.0/Makefile.PL,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- Makefile.PL   2000/04/26 07:28:45 1.16
  +++ Makefile.PL   2000/04/29 02:28:35 1.17
  @@ -26,7 +26,7 @@
   VERSION = $VERSION,
   macro = {
   MODPERL_SRC = $code-path,
  -PERL = $build-perl_config('perl5'),
  +PERL = $build-perl_config('perlpath'),
   },
   clean = {
   FILES = "@{ clean_files() }",
  
  
  
  1.8   +1 -0  modperl-2.0/src/modules/perl/modperl_callback.c
  
  Index: modperl_callback.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_callback.c,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- modperl_callback.c2000/04/27 22:18:36 1.7
  +++ modperl_callback.c2000/04/29 02:28:35 1.8
  @@ -339,6 +339,7 @@
   /* Child{Init,Exit}, OpenLogs */
   aTHX = scfg-mip-parent-perl;
   }
  +PERL_SET_CONTEXT(aTHX);
   #endif
   
   MP_TRACE_h(MP_FUNC, "running %d %s handlers\n",
  
  
  
  1.10  +11 -1 modperl-2.0/src/modules/perl/modperl_interp.c
  
  Index: modperl_interp.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_interp.c,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- modperl_interp.c  2000/04/27 21:42:25 1.9
  +++ modperl_interp.c  2000/04/29 02:28:35 1.10
  @@ -24,8 +24,17 @@
   );
   #endif
   
  -interp-perl = perl_clone(perl, TRUE);
  +interp-perl = perl_clone(perl, FALSE);
  +{
  +/* XXX: hack for bug fixed in 5.6.1 */
  +dTHXa(interp-perl);
  +if (PL_scopestack_ix == 0) {
  +ENTER;
  +}
  +}
  +
   MpInterpCLONED_On(interp);
  +PERL_SET_CONTEXT(mip-parent-perl);
   
   #ifdef MP_USE_GTOP
   MP_TRACE_m_do(
  @@ -50,6 +59,7 @@
   MP_TRACE_i(MP_FUNC, "*error - still in use!*\n");
   }
   
  +PERL_SET_CONTEXT(interp-perl);
   PL_perl_destruct_level = 2;
   perl_destruct(interp-perl);
   perl_free(interp-perl);