Re: Fast DB access
Matt Sergeant sent the following bits through the ether: Note that Theo Schlossnagel was saying over lunch at ApacheCon that if your filename has more than 8 characters on Linux (ext2fs) it skips from a hashed algorithm to a linear algorithm (or something to that affect). So go careful there. I don't have more details or a URL for any information on this though. I've had a look at 2.2.14 and while there are some limits[1] (note, I'm not a kernel hacker), some simple tests[2] haven't pointed to a performance degredation. I'd suggest some larger tests on bigger boxes, as this'd be interesting to know... Leon [1] such as DNAME_INLINE_LEN (16), see fs/dcache.c [2] 2000 files, with name lengths from 2..20 (substrings of md5 stuff, of course), both reading and writing random files -- Leon Brocard.http://www.astray.com/ yapc::Europehttp://yapc.org/Europe/ ... New and improved Brocard: now with Template Toolkit!
(OT) Semaphore/signalling question
What's the best way to unlock several sister processes waiting for an event at once? I just want to tell "now it's ready, go on". An idea would be to use normal unix signals, but there are only 32 of them (aren't there?) and their management would be rather complicated. I'm looking for something like semaphores instead. The problem with semaphores is that I don't see a way to release *several* waiting processes at once. $n= $sem-getncnt(XX); $sem-op(XX, $n) to increment the count for all waiting processes does not work when one process is faster (in a loop) than the others and gets away everything before the others are unlocked. Are (unix domain) sockets the right thing for this? Thanks Christian.
Re: Dealing with spiders
Robin Berjon wrote: But on a related issue, I got several logfiles corrupted because I log user-agents there and some seem to use some unicode names that confuse Apache and convert to \n. Does anyone else have this problem ? I don't think it could lead to server compromission, but it's never pleasant to have corrupted logs... if this is true, i would log an apache bug report. -- ___cliff [EMAIL PROTECTED]http://www.genwax.com/
question on DBIx::Recordset PrevNextForm
Is there any way to hide the form data that the DBIx::Recordset PrevNextForm function generates? i just noticed that if someone does a "view source," the user can view your db connection, username, password, etc. That doesn't seem very secure even though this is a pretty cool subroutine to have. I'm using embed perl to handle these request so perhaps there might be another mechanism that works with DBIx::Recordset that does the same thing without having to write that kind of sensitive information as hidden fields? Thanks -- Why is College Club the largest and fastest growing college student site? Find out for yourself at http://www.collegeclub.com
Passing data structures between Stacked Handlers
Hi! Is there a module that can do "Stacked Handler Pipelining", but doesn't pass around tied filehandles but data structures ? If there isn't, could it be implemented by dumping the data structure to $r-notes (with Data::Dumper) and have it eval'ed back by the next handler? -- D_OMM http://domm.zsi.at O_xyderkes M_echanenNEU (naja): Wohnungs-Historie M_asteuei http://domm.zsi.at/curvit/wohnen.html
premature TCP termination
Hi, I wonder if there is some sort of notification my module can receive if the user has terminated HTTP transaction(ie dowloading of a search result), by closing TCP link, or the Apache's connection has timed out... URLs, pointers would be excellent. Thanks, Pavel
Changing REMOTE_ADDR passing to a request.
hello,I have a question here. There are 2 server, server A and server B.There are also 2 cgi files.access-ip.cgi store in server A. ip.cgi store in server B.The access-ip.cgi looks like this:#!/usr/bin/perlprint "Content-type: text/html\n\n";use LWP::Simple;@testing=get('http://www.serverB.com/cgi-bin/ip.cgi');print @testing;--The ip.cgi on server B looks like this:#!/usr/bin/perl$add=$ENV{'REMOTE_ADDR'};print "Content-type: text/html\n\n";print "pIP is $add\n"So, how do I pass/set the environment variable of REMOTE_ADDR from server A ? So that I can control the env of remote_addr at the server B ?access-ip.cgi actually get the output from server B, and server B actually get the remote_addr value from server A.So, is there any way I can make$ENV{'REMOTE_ADDR'}="1.2.3.4"; from server A,And pass this variable to server B. So, server B will take 1.2.3.4 as the value of remote_addr, and as a result, access-ip will give an output of 1.2.3.4.I have tried the following code in modperl,my $r = shift;$r-connection-remote_ip('1.2.3.4');it only works in server A, meaning,$ENV{'REMOTE_ADDR'} in Server A return 1.2.3.4, but $ENV{'REMOTE_ADDR'} in server B still return the Server A ip address.Thank you very much.[EMAIL PROTECTED]
Re: Changing REMOTE_ADDR passing to a request.
On Sun, Nov 12, 2000 at 11:07:59AM +0800, Alson Wong wrote: So, how do I pass/set the environment variable of REMOTE_ADDR from server A ? So that I can control the env of remote_addr at the server B ? Well, you could do it several ways. The "normal" way is to set a header in the request that A sends to be, usually the same one that various caching proxy servers do, namely X-Forwarded-For. You won't be able to do that with LWP::Simple, have a look at the main LWP page for details on how to make more sophisticated requests. I'm assuming you've ruled out using Apache's mod_proxy, and therefore that you won't be wanting to use mod_proxy_add_forward. Then, in the B server, you can peel it out of the Apache request object manually as part of your script, or you can do it in an earlier handler phase and make a $r-remote_ip() call like the one you were making in the A server. To catch the header on the backend, you can have a look at the Guide: http://thingy.kcilink.com/modperlguide/scenario/Getting_the_Remote_Server_IP_in_.html my $r = shift; $r-connection-remote_ip('1.2.3.4'); it only works in server A, meaning, $ENV{'REMOTE_ADDR'} in Server A return 1.2.3.4, but $ENV {'REMOTE_ADDR'} in server B still return the Server A ip address. Right: nothing passes environment variables between the servers. You need to establish your own channel (the header mentioned above) for passing that value and tweak the B server to recover the value and stuff it in the environment variable. HTH, Barrie
Re: unsubscribe modperl
unsubscribe modperl - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, November 10, 2000 6:18 PM Subject: unsubscribe modperl unsubscribe modperl
cvs commit: modperl-site/embperl Changes.pod.1.html
richter 00/11/11 05:28:50 Modified:embperl Changes.pod.1.html Log: Embperl Webpages - Changes Revision ChangesPath 1.184 +3 -1 modperl-site/embperl/Changes.pod.1.html Index: Changes.pod.1.html === RCS file: /home/cvs/modperl-site/embperl/Changes.pod.1.html,v retrieving revision 1.183 retrieving revision 1.184 diff -u -r1.183 -r1.184 --- Changes.pod.1.html2000/11/09 20:25:48 1.183 +++ Changes.pod.1.html2000/11/11 13:28:50 1.184 @@ -21,7 +21,7 @@ [a href="" HOME/a]nbsp;nbsp; [a href="Changes.pod.cont.html"CONTENT/a]nbsp;nbsp; [a href="Changes.pod.cont.html"PREV (Revision History - Content)/a]nbsp;nbsp; [a href="Changes.pod.2.html"NEXT (1.3b6 (BETA) 18. Oct 2000)/a]nbsp;nbsp; brhr P -Last Update: Thu Nov 9 21:22:57 2000 (MET) +Last Update: Sat Nov 11 14:25:14 2000 (MET) P NOTE: This version is only available via A HREF="CVS.pod.1.html#INTRO" "CVS"/A @@ -54,6 +54,8 @@ neccessary, but not more often. (Handles now write to session data, after a delete in the same request correctly). - Added more tests for Sessionhandling. + - Fixed a bug that Content-Lenght was 2 to much, when escmode was set to zero. + Spotted by Michael Smith. /PRE p[a href="" HOME/a]nbsp;nbsp; [a href="Changes.pod.cont.html"CONTENT/a]nbsp;nbsp; [a href="Changes.pod.cont.html"PREV (Revision History - Content)/a]nbsp;nbsp; [a href="Changes.pod.2.html"NEXT (1.3b6 (BETA) 18. Oct 2000)/a]nbsp;nbsp; br font color="#808080"___br