e), and also buils and runs on Solaris,
using a different fd-passing API.
--
Roger Espel Llima, [EMAIL PROTECTED]
http://www.iagora.com/~espel/index.html
permanently, but
there isn't so often the need for that.
--
Roger Espel Llima, [EMAIL PROTECTED]
http://www.iagora.com/~espel/index.html
Stas Bekman <[EMAIL PROTECTED]> wrote:
> Also check the archives for 'lingerd' keyword. Here is what I've but it
> didn't enter the guide yet, since it's waiting to be reviewed by Roger
> Espel Llima, the author of lingerd. ...and waiting, and waiting, and
f the environment crap in
mod_ssl.
if CGI scripts can't read notes, then it should be mod_cgi's job to
turn a bunch of notes into envs, preferably after the fork and
before the exec, so the parent process' environment doesn't get
polluted.
--
Roger Espel Llima, [EMAIL PROTECTED]
http://www.iagora.com/~espel/index.html
in a
single process seems quite wrong to me.
Can't all these modules (your scripts, mod_ssl, etc) just use the
request object and/or Apache notes to communicate? That's exactly
what they're there for!
At least mod_perl can be told not to mess with the environment:
PerlSetupEnv
en I added the line
PERL5LIB=/usr/local/ssl-apache/perl-lib ; export PERL5LIB
to /usr/local/new-apache/bin/apachectl
Looking at /perl-status's Modules page, @INC looks good.
--
Roger Espel Llima, [EMAIL PROTECTED]
http://www.iagora.com/~espel/index.html
--enable-module=ssl --activate-module=src/modules/perl/libperl.a \
--enable-module=perl
make
make certificate
make install
Let me know if something like that works for you... I want to
officially support mod_ssl in the next release of lingerd, but I
need more test data!
Roger
--
happen. In any case, it shouldn't be too hard to get
the two working together...
--
Roger Espel Llima, [EMAIL PROTECTED]
http://www.iagora.com/~espel/index.html
There are some cosmetic changes in the code and documentation, but
you don't really need to upgrade if you're already running an older
lingerd.
On non-Linux systems, more testing is still needed.
--
Roger Espel Llima, [EMAIL PROTECTED]
http://www.iagora.com/~espel/index.html
d increase quickly with the concurrency up to 4, but don't
increase anymore after that. That is serving relatively slow
dynamic pages; with static content I'd expect more rapidly
diminishing returns.
--
Roger Espel Llima, [EMAIL PROTECTED]
http://www.iagora.com/~espel/index.html
nd server sticks
around for a second or two as part of the lingering_close routine,
but it doesn't have to wait for the client to finish reading all the
data. Fortunately enough, spoonfeeding data to slow clients is
handled by the OS kernel.
--
Roger Espel Llima, [EMAIL PROTECTED]
http://www.iagora.com/~espel/index.html
OS's SMP to be the limiting factor on
Apache's dynamic page performance. Apache uses multiple processes,
and dynamic page generation is generally CPU bound, not I/O bound.
--
Roger Espel Llima, [EMAIL PROTECTED]
http://www.iagora.com/~espel/index.html
27;ll answer my
emails as soon as I get back.
--
Roger Espel Llima, [EMAIL PROTECTED]
http://www.iagora.com/~espel/index.html
mod_perl with any good ideas that mod_php may have.
--
Roger Espel Llima, [EMAIL PROTECTED]
http://www.iagora.com/~espel/index.html
ld take code or
inspiration from lingerd (the code is at
ftp://iagora.com/pub/software/lingerd/lingerd-0.91b.tar.gz )
--
Roger Espel Llima, [EMAIL PROTECTED]
http://www.iagora.com/~espel/index.html
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
I suggest using thttpd and Piranha for each
of these, but it's true that mod_proxy or mod_rewrite works too.
--
Roger Espel Llima, [EMAIL PROTECTED]
http://www.iagora.com/~espel/index.html
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
standalone patch to Apache, that makes processes in
lingering_close visible in /server-status. You can use this to
check if lingerd would be useful for your server.
For further instructions, read the files `README', `INSTALL' and
`testing/TESTING' in the tarball.
--
Roger
.
But you can open your filehandles with open(), sysopen() or any of the
OO file packages, as you see fit; both sets of IO functions will work on
a filehandle no matter how it was opened.
Personally, I don't like the magic parsing in open(), so I tend to use
sysopen() always, in combina
canonical' answer to these
problems is Apache::Reload, but I've been reluctant to use it because it
would presumably reload the modules separately in each child, and
therefore leaving them unshared.
So for the moment what I do is restart apache for real every couple
weeks. It's only
INGER is
badly specified, and known to be broken in most tcp/ip stacks, so
currently it's kind of a bad idea to use it, and we're stuck with the
two server model.
--
Roger Espel Llima, [EMAIL PROTECTED]
http://www.iagora.com/~espel/index.html
ust change the string Wget to Blah, then it works.
--
Roger Espel Llima, [EMAIL PROTECTED]
http://www.iagora.com/~espel/index.html
ou'll probably need a
"PerlSetupEnv Off" inside of each block.
--
Roger Espel Llima, [EMAIL PROTECTED]
http://www.iagora.com/~espel/index.html
t! I think this is the best thing that could be done at this point
to increase mod_perl's visibility.
Have you contacted the people at e.g LWN.net, so they can link to the
digest in their "linux (& free software) weekly news"?
--
Roger Espel Llima, [EMAIL PROTECTED]
http://www.iagora.com/~espel/index.html
ways meta refresh.
OTOH, you probably don't want to do that with Apache and mod_perl, for
two reasons: 1) keeping an appache process per long-term client is
hugely wasteful, and 2) multiple processes are a lousy way to implement
a chat backend, because they need to notify each other of new messages.
--
Roger Espel Llima, [EMAIL PROTECTED]
http://www.iagora.com/~espel/index.html
e with you, but it sounds so
simple to keep it in a memory buffer when it's under 16k or some similar
limit, that I just think it's much more "obviously right" to do it that
way.
--
Roger Espel Llima, [EMAIL PROTECTED]
http://www.iagora.com/~espel/index.html
sequences
to repeat. And srand() doesn't need arguments; it's smart enough to
look for a decent source of randomness on its own (using /dev/urandom or
/dev/random or similar if it exists).
--
Roger Espel Llima, [EMAIL PROTECTED]
http://www.iagora.com/~espel/index.html
rams writing to temp files and re-reading them for no particular
reason. Since you're limiting the size anyway, why not just make it a
memory buffer? Or you could write to a temp file only when it's greater
than some constant (say, 16k), which would let most of your POSTs go
without touching the filesystem.
--
Roger Espel Llima, [EMAIL PROTECTED]
http://www.iagora.com/~espel/index.html
, and standard tools like find or File::Find (or
whatever its name is) to clean up.
--
Roger Espel Llima, [EMAIL PROTECTED]
http://www.iagora.com/~espel/index.html
; change the cart contents, the cart listing does need to be current. How
> do you handle this situation?
the module gets the expiration time. if it's 0 or negative, it ignores
the cache and reads straight from the db.
--
Roger Espel Llima, [EMAIL PROTECTED]
http://www.iagora.com/~espel/index.html
t the other results interfaces in DBI?
Sounds good. This means that this module would need a config file.
--
Roger Espel Llima, [EMAIL PROTECTED]
http://www.iagora.com/~espel/index.html
ome minimal docs and give it a 'proper' module name, if there's
interest.
--
Roger Espel Llima, [EMAIL PROTECTED]
http://www.iagora.com/~espel/index.html
On Thu, Sep 07, 2000 at 01:25:21PM -0700, Randal L. Schwartz wrote:
> >>>>> "Roger" == Roger Espel Llima <[EMAIL PROTECTED]> writes:
>
> Roger> # limit allowed characters in email addresses
> Roger> $to =~ tr/-a-zA-Z0-9_+%$.,:!@=()[]//cd;
&
quot;;
}
if ($pid) {
# parent
$from = "$name <$from>" if defined $name;
print MAIL "From: $from\n";
print MAIL "To: $to\n";
print MAIL "Subject: $subject\n\n";
print MAIL $message, "\n";
close MAIL;
return 1;
e about children
doing cleanup-type things after their last request, you should really
start Apache/mod_perl with PERL_DESTRUCT_LEVEL=-1.
> which includes error_log, gdb, strace, PERL_TRACE (on UNIX of course).
I humbly bow to the Gods of Unix, in thankfulness for the strace command.
--
Rog
$r->err_header_out(URI => $url);
err_cookies($r);
return REDIRECT;
where err_cookies is:
sub err_cookies {
my $r = shift;
my @cookies = $r->headers_out->get("Set-Cookie");
$r->err_headers_out->add("Set-Cookie" => \@cookies);
}
That seems to do the trick for me.
--
Roger Espel Llima, [EMAIL PROTECTED]
http://www.iagora.com/~espel/index.html
t;X-Forwarded-For" header).
[ ... ]
thanks, that is more or less what it was thinking of doing, it's good to
know in advance that it works :)
--
Roger Espel Llima, [EMAIL PROTECTED]
http://www.iagora.com/~espel/index.html
it takes to process a request, after all.
Has anyone looked into that? If not, I can try to find a moment to log
the lingering_close times on a real server...
--
Roger Espel Llima, [EMAIL PROTECTED]
http://www.iagora.com/~espel/index.html
I'd settle for the backend getting it in a new
header (eg. X-Original-Host), using an approach similar to
mod_proxy_add_forward.c.
--
Roger Espel Llima, [EMAIL PROTECTED]
http://www.iagora.com/~espel/index.html
eird bit of syntax. I just needed this recently to
write a test.pl, and it took quite a bit of testing to get it working. :)
Incidentally, does anyone know of a way to do this that works under
strict? The above requires a "no strict 'refs'" to work.
--
Roger Espel Llima, [EMAIL PROTECTED]
http://www.iagora.com/~espel/index.html
code).
The advantage of this becomes obvious when you start using templating
techniques to share html code among pages: design bits, common
navigation for the site, for parts of the site, etc. Then the plain
files for each of the pages can't be used statically for a "dry test"
anym
would be something like:
sub fill_rows {
my ($self, $args) = @_;
my ($sec, $ret) = ($args->{repeat}, "");
foreach my $nc (&get_name_counts()) {
$self->assign_raw(row_name => $nc->[0],
row_count => $nc->[1]);
$ret .= $self->fetch($sec);
}
$ret;
}
--
Roger Espel Llima, [EMAIL PROTECTED]
http://www.iagora.com/~espel/index.html
On Mon, Jul 24, 2000 at 05:47:46PM +0200, Eric Cholet wrote:
> I've just committed a change which fixes this. Please try it and let me know
> if it works for you.
It does; now a single global "PerlSetupEnv Off" does the job. Thanks!
--
Roger Espel Llima, [
1) {
+if (stat(r->filename, &r->finfo) < 0) {
+ r->finfo.st_mode = 0;
+ laststatval = 0;
+ }
+}
#endif
OUTPUT:
-- end patch
--
Roger Espel Llima, [EMAIL PROTECTED]
http://www.iagora.com/~espel/index.html
rlstart.pl starts with
BEGIN { unshift @INC, "/www/perl" if $INC[0] ne '/www/perl' }
and nothing else could possibly be putting "/www/perl" in @INC (Apache's
root is /usr/local/apache).
I guess I've been using an undocumented behavior all long...
er reading the POST data. Then, if some cleanup function in apache
tries to read it again, it finds that there is none to read.
--
Roger Espel Llima, [EMAIL PROTECTED]
http://www.iagora.com/~espel/index.html
outside of any
apparently gets ignored. Is that a bug? I put another
"PerlSetupEnv Off" in the entry for the DocumentRoot, and
now it's not doing these annoying subrequests anymore.
Anyway, after tracing through this stuff, I'm more convinced than ever
that PerlSetupEnv is ugly and slow and to be avoided.
--
Roger Espel Llima, [EMAIL PROTECTED]
http://www.iagora.com/~espel/index.html
seriously consider using a higher-level interface,
such as Apache::Request (downloadable from mod_perl's ftp server under
the name "libapreq"), or CGI.pm.
--
Roger Espel Llima, [EMAIL PROTECTED]
http://www.iagora.com/~espel/index.html
2 worked for sockets, but not
for pipes or ttys. Anyway, limiting myself to platforms where select()
works doesn't strike me as a bad thing...
--
Roger Espel Llima, [EMAIL PROTECTED]
http://www.iagora.com/~espel/index.html
sh element; if you want your forums to share the rest of the site's
look, then you need to write templates for these things too. And
session management is spread among dozens of scripts, so you can't
easily make changes to the way it works.
The whole point of the iAct project is to have a system that works
*both* for thousands of static pages sharing a common look (in a modular
way, hence the reverse-include approach), and for "web-apps" with perl
and a database as the backend.
--
Roger Espel Llima, [EMAIL PROTECTED]
http://www.iagora.com/~espel/index.html
hreaded design
tends to be memory effective, so I'd expect this setup to handle a few
hundred simultaneous users easily. If you want more, use a standard irc
daemon as a hub, and connect several such perl servers to it; if you
want to have a java applet client too, it can talk directly to the
tw, I'm doing this for a website (www.iagora.com), and it's already
stable enough that the production server runs it; I just got the
approval to release it as Open Source... as soon as I find the time!
I'll post a pointer here before announcing it on sites like
freshmeat.net, in a week or two at most.
--
Roger Espel Llima, [EMAIL PROTECTED]
http://www.iagora.com/~espel/index.html
hin MSIE:
MSIE-5: 69.59%
MSIE-4: 28.12%
MSIE-3: 1.82%
MSIE-2: 0.30%
--
Roger Espel Llima, [EMAIL PROTECTED]
http://www.iagora.com/~espel/index.html
equest (representing /index.html) would/should have no notes...
>
> this makes sense in my head, but my head is weird - I could be wrong...
okay, that makes sense in my head too. I'll just stick the data on a
global variable and clear it at the end of the request...
thanks!
--
Roger Espe
x) mod_perl/1.21 configure
d -- resuming normal operations
Notes init (/)!
-
Notes exit!
NOTE (hello) -> (world)
-
Notes init (/)!
-----
Notes exit!
NOTE (hello) -> (world)
-
Notes init (/index.html)!
-
Notes exit!
-
Notes init (/index.html)!
-
Notes exit!
-
--
Roger Espel Llima, [EMAIL PROTECTED]
http://www.iagora.com/~espel/index.html
:)
--
Roger Espel Llima, [EMAIL PROTECTED]
http://www.iagora.com/~espel/index.html
also
thinking that PerlTransHandlers run before full header parsing, so
$r->header_in might not be recommended at that point... any clues?
--
Roger Espel Llima, [EMAIL PROTECTED]
http://www.iagora.com/~espel/index.html
got a session cookie from the
client, then that's it; if not, I also add the session data at the end
of the internal links.
--
Roger Espel Llima, [EMAIL PROTECTED]
http://www.iagora.com/~espel/index.html
way to get this done is to send a cookie with each page, so
by the time the user tries to log in, we know if cookies are on or not.
If they're on, send a cookie; if not, turn on URL rewriting.
As for JavaScript, don't get me started on sites that require it for
navigation
--
o me. Maybe ap_setup_client_block should
silently return OK if it gets called more than once in a request...
--
Roger Espel Llima, [EMAIL PROTECTED]
http://www.iagora.com/~espel/index.html
59 matches
Mail list logo