duplicate the client's requests with mod_proxy (or mod_perl)?

2011-12-21 Thread Jeff Pang
When apache mod_proxy pass the client's request to an original server, I want it always duplicate the request to another webserver. For example, the request is following: client - mod_proxy - original-server What I want is: client - proxy - original-server |- another

Re: Re: modperl for ubuntu

2010-12-01 Thread Jeff Pang
use the same packages as Debian? On Debian I do: apt-get install apache2 libapache2-mod-perl2 libapache2-request-perl libapache2-mod-apreq2 Hope this helps! Marilyn On Wed, Dec 1, 2010 at 2:07 AM, Dave Hodgkinson daveh...@gmail.com wrote: On 1 Dec 2010, at 02:51, Jeff Pang wrote: Hello

modperl for ubuntu

2010-11-30 Thread Jeff Pang
Hello, Does modperl and Apache2::Request have a port for Ubuntu and which will be installed by apt-get? Ubuntu's development environment is so worse, has been losing so many libraries, compiling modperl under which is hard. Thanks. Jeff Pang http

Re: unsubscribe

2010-11-22 Thread Jeff Pang
unsubscribe from the list, send an empty message to: modperl-unsubscr...@perl.apache.org Jeff Pang http://blog.sina.com.cn/pajeu - Original Message - From: biao zhou biaoz...@hotmail.com To: modperl@perl.apache.org Subject: unsubscribe

Re: session module

2010-10-29 Thread Jeff Pang
于 2010-10-29 20:28, Fayland Lam 写道: try a framework. that's much more popular. :) I wrote a small application with few scripts. A framework like catalyst is too large to use for me. Thanks. Jeff.

Re: session module

2010-10-29 Thread Jeff Pang
于 2010-10-29 20:20, Perrin Harkins 写道: Both work. CGI::Session was better maintained for a while but it looks like Apache::Session has been updated recently. Pick the one that you find easiest to understand from the documentation. I know CGI::Session well. But have been thinking does

Re: session module

2010-10-29 Thread Jeff Pang
于 2010-10-29 20:42, Fayland Lam 写道: try Dancer. which is very suitable for small application. just one file. Ok I will check out it. I first time knew Dancer from ruby 2 years ago. Never know that there is a perl execution of that.

session module

2010-10-28 Thread Jeff Pang
is Apache::Session or CGI::Session better for mod_perl? Thanks.

Re: UNSUBSRIBE

2009-09-24 Thread Jeff Pang
2009/9/24 Robertson, Gordon H CIV DISA GES-E gordon.robert...@disa.mil: Hi, Please take me out of mailing list please send an empty mail to modperl-unsubscr...@perl.apache.org, thanks.

Re: Why people not using mod_perl

2009-09-16 Thread Jeff Pang
On Tue, 30 Nov 2004 22:38:11 + modperl[at]att.net wrote: 3) capacity/scalable mod_perl is very scalable --- I mean, one can properly config a single server to handle dynamic content for 200K daily unique IPs. PHP may end up with just 100K and servlet ends up at around 50K. I'm just

google's web music player

2009-04-04 Thread Jeff Pang
Hello, Google has introduced its music searching here (music.google.cn), with an online web music player. what I'm surprised with is, even I deleted all the browser's cookies and buffers (I use firefox), after re-open that web music player, the list of songs is still there (I also tried

Re:modperl or php? Re: decline and fall of modperl?

2009-03-27 Thread Jeff Pang
Message du 27/03/09 07:09 De : Phil Van A : modperl@perl.apache.org Copie à : Objet : modperl or php? Re: decline and fall of modperl? daily traffic: 100,000 - 500,000 unique sessions (medium to medium-large sites) = modperl in a cluster environment me again: modperl as well as

Re: which reverse proxy for modperl?

2008-12-17 Thread Jeff Pang
, Jeff Pang wrote: Hello, I have a modperl application on a host which is running with heavy load. I have the plan to put a reverse proxy before it. There are two well known reverse proxy software, one is Squid, another is nginx. Which one is better for modperl application

Re: which reverse proxy for modperl?

2008-12-17 Thread Jeff Pang
), not a proxy server. One of our applications, have two LVS before 200+ Squid boxes, the backend are hundreds of fastcgi servers. LVS and Squid run with DR mode, could reach to 10G+ traffic. -- Jeff Pang http://home.arcor.de/pangj/ Créez votre adresse électronique prenom@laposte.net 1

mod_perl vs. mod_python

2008-12-13 Thread Jeff Pang
Just ask out of being curious, are mod_perl and mod_python the same or similar stuff? Which is better (in performance or ease to use)? Thanks. Jeff. Créez votre adresse électronique prenom@laposte.net 1 Go d'espace de stockage, anti-spam et anti-virus intégrés.

which reverse proxy for modperl?

2008-12-12 Thread Jeff Pang
Hello, I have a modperl application on a host which is running with heavy load. I have the plan to put a reverse proxy before it. There are two well known reverse proxy software, one is Squid, another is nginx. Which one is better for modperl application? or is there any others which are better

Re: Any success with storing photos in a database?

2008-09-30 Thread Jeff Pang
Message du 29/09/08 23:05 De : Perrin Harkins A : Mark Stosberg Copie à : modperl@perl.apache.org Objet : Re: Any success with storing photos in a database? On Mon, Sep 29, 2008 at 3:00 PM, Mark Stosberg wrote: We have a large, busy, database application that relates to millions of

a require problem

2008-08-29 Thread Jeff Pang
I have began a project, but meet some problems,:) say there are three dirs: |- cgi-bin |- cgi-bin - lib |- cgi-bin - template I have a script in cgi-bin, which requires the template file from template dir. This script also uses a library file (.pm) from lib dir. Finally the library need to

Re: modperl static or dynamic

2008-07-18 Thread jeff pang
These are the install documents for mp2: http://perl.apache.org/docs/2.0/user/install/install.html#Dynamic_mod_perl http://perl.apache.org/docs/2.0/user/install/install.html#Static_mod_perl I just think both are fine. For me I use dynamic install most time. On Sat, Jul 19, 2008 at 5:42 AM,

Re: share objects

2008-04-03 Thread Jeff Pang
On Thu, Apr 3, 2008 at 11:32 PM, Felipe de Jesús Molina Bravo [EMAIL PROTECTED] wrote: hi I have installed static mp2 with apache 2.0.63 (forker). I am using perl bind (Sleepycat::DBXML) from dbxml; then I create an object (reference to Sleepycat::DBXML) in startup.pl because i want to

Re: get UserAgent

2008-01-21 Thread Jeff Pang
yup,thanks for the reminding. I checked the doc, for mp1 it's $r-header_in(); for mp2 it's $r-headers_in(). -Original Message- From: Foo JH [EMAIL PROTECTED] Sent: Jan 21, 2008 3:52 PM To: Jeff Pang [EMAIL PROTECTED] Cc: modperl-list modperl@perl.apache.org Subject: Re: get UserAgent

get UserAgent

2008-01-20 Thread Jeff Pang
Hello, what are the methods to get UserAgent setting in both mp1 and mp2? I tried search,but got no results. Thanks! Regards, Jeff Pang

restrict virtual hosts programs

2008-01-11 Thread Jeff Pang
Hello, I met a strange requirement that, given Apache has two virtual hosts, vhA and vhB, vhA's document root is: /path/a/; vhB's document root is: /path/b/. vhA's programs are running under /path/a/cgi-bin, but actually, the programs of vhA can access vhB's directory (ie,they can open and

Re: restrict virtual hosts programs

2008-01-11 Thread Jeff Pang
-Original Message- From: Roberto C. Sánchez [EMAIL PROTECTED] I prefer to run multiple httpd processes on high numbered ports (one for each site), then have the main httpd on port 80 do proxypass proxypassrever and name-based vhosting. Then you can also customize each httpd to only

Re: help about Apache::Scoreboard

2007-12-14 Thread Jeff Pang
2007/12/14, Malcolm [EMAIL PROTECTED]: On Thursday 13 December 2007 10:00:30 am Jeff Pang wrote: right now I got these exceptions in error_log: [Thu Dec 13 21:53:49 2007] [notice] child pid 4660 exit signal Segmentation fault (11) Apache::Scoreboard is basically just a wrapper around

Re: help about Apache::Scoreboard

2007-12-13 Thread Jeff Pang
2007/12/13, Malcolm [EMAIL PROTECTED]: Just to confirm, you do have a use Apache::Scoreboard in there somewhere? surely I used it. right now I got these exceptions in error_log: [Thu Dec 13 21:53:49 2007] [notice] child pid 4660 exit signal Segmentation fault (11) [Thu Dec 13 21:53:49 2007]

Apache::Scoreboard for mp1

2007-12-12 Thread Jeff Pang
I need Apache::Scoreboard for mp1, where to find it? please help.

Re: Apache::Scoreboard for mp1

2007-12-12 Thread Jeff Pang
Thank you all guys. At first I used mod_limitipconn for limiting ip concurrent connections. But I found it got conflict with my mp handler (the PerlAccessHandler one). So I checked its source (it came with a perl version), and found it's easy to be integrated into my handler.And it used

help about Apache::Scoreboard

2007-12-12 Thread Jeff Pang
When added these code in my handler: my $r = shift; # We decline to handle subrequests: otherwise, a few lines down we # could get into an infinite loop. return DECLINED unless $r-is_initial_req; # # for limit-ip-conn # my $ip_count = 0; my $limit =

which mp for file downloading server?

2007-12-02 Thread Jeff Pang
We have another project to get start with, some linux hosts to server file downloading requests. Apache is just used to server static large files, without any external modules, except the modperl handler for access control, like ip and processes limit. We have run mp1 in large application, and run

Re: get apache's concurrent connection number

2007-11-25 Thread Jeff Pang
On Nov 26, 2007 11:16 AM, Roberto C. Sánchez [EMAIL PROTECTED] wrote: Umm, why would you want to do that? Why not just use a proper load balancing solution? because, when redirecting, apache doesn't know the exact location for that redirection. apache must do some querying to get the

switch codes from mp1 to mp2

2007-11-06 Thread Jeff Pang
hello, we have some mp1 programs including both handlers and registry scripts,run for long days. since apache2 is better than apache1.3, we have made the choice to upgrade the mp1 programs to mp2. Is there any easy way or guide to do it? thank you. National Bingo Night. Play along

Re: dev environment

2007-11-05 Thread Jeff Pang
- Original Message - From: Jeff Armstrong [EMAIL PROTECTED] Cc: modperl modperl@perl.apache.org 2. Pay up for VMWare Workstation. With VMWare you can have virtual linux sessions running in Windows. There's a free player and some free Linux virtual machines but if you want to

Re: [QUESTION] mod_perl2 and selfmade Modules

2007-10-04 Thread Jeff Pang
2007/10/5, D. Hageman [EMAIL PROTECTED]: The module will be preloaded just like your script, thus any speed up experienced by your script will also be experienced by the module. Hi, If you don't preload it in startup.pl or with PerlModule directive in httpd.conf,I don't think registry

Re: Apache 2.2.6 and mod_perl 2.0.3

2007-10-03 Thread Jeff Pang
Hello, Does apache2.2+mp2 have much advantage than apache2.0+mp2? 2007/10/4, Foo JH [EMAIL PROTECTED]: You may want to hold back on 2.2.6. Use either 2.2.4 from ASF or 2.2.5 from ApacheLounge. Tracy E Schreiber wrote: Hi, I believe that mod_perl 2.0.3 is not compatible with Apache

Re: Starting / Stopping Sendmail

2007-10-01 Thread Jeff Pang
2007/10/2, Tyler Bird [EMAIL PROTECTED]: Hi List, I know this is off topic, but does anyone know if you restart the sendmail MTA daemon if all mail in the mail queues will still be delivered or any email will be lost as a result? No.when you restart a sendmail,mail queues will neither be

Re: set request params

2007-09-28 Thread Jeff Pang
2007/9/28, [EMAIL PROTECTED] [EMAIL PROTECTED]: as i see there is no way to set request parameter in mod_perl2 You can rewrite an url using mp2's PerlTransHandler. This is the sample code from book mp2 user's guide. If the URI: http://example.com/news/20021031/09/index.html is now handled by:

Re: mod_perl success stories on ZDNet

2007-09-26 Thread Jeff Pang
Great story,thanks. btw,is there any article about performance comparsion between modperl and php? 2007/9/26, Perrin Harkins [EMAIL PROTECTED]: My Google alert sent this to me today: http://whitepapers.zdnet.com/abstract.aspx?docid=257555 - Perrin

Re: add httpd.conf directive

2007-09-17 Thread Jeff Pang
2007/9/17, André Warnier [EMAIL PROTECTED]: If the above is not applicable, then you could use something like location /xyz PerlSetVar AllowedIps ip1 ip2 ip3 ... /location and in your module do sub handler { my $r = shift; # the request object my $AllowedIps =

Re: Internal Server Error

2007-08-23 Thread Jeff Pang
2007/8/24, Perrin Harkins [EMAIL PROTECTED]: On 8/21/07, Jeff Pang [EMAIL PROTECTED] wrote: PerlHandler Package::Name instead of: PerlHandler Package::Name-handler So on the first case,we need to write the handler as sub handler { my $r = shift; ...} because Apache may call

Re: Internal Server Error

2007-08-21 Thread Jeff Pang
he error_log message:Can't call method "send_http_header" on an undefined value at /path/to/module/Name.pmThe handler method starts out with: sub handler ($$) { my ($class, $r) = @_; -- Jeff Pang - [EMAIL PROTECTED] http://home.arcor.de/jeffpang/

Re: Internal Server Error

2007-08-21 Thread Jeff Pang
always used the first config. -- Jeff Pang - [EMAIL PROTECTED] http://home.arcor.de/jeffpang/

Apache2::Request install

2007-06-13 Thread Jeff Pang
hello, When I installed Apache2::Request (without make test) and rut it I got the errors: [EMAIL PROTECTED] libapreq2-2.08]# perl -MApache2::Request -e '' Can't load '/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/APR/APR.so' for module APR: libaprutil-0.so.0: cannot open shared

Re: Apache2::Request install

2007-06-13 Thread Jeff Pang
Jeff Pang 写道: hello, When I installed Apache2::Request (without make test) and rut it I got the errors: Sorry,forgot the info for my system. [EMAIL PROTECTED] ~]# cat /etc/redhat-release Red Hat Enterprise Linux AS release 4 (Nahant) [EMAIL PROTECTED] ~]# uname -r 2.6.9-5.EL [EMAIL

Re: Apache2::Request install

2007-06-13 Thread Jeff Pang
Jonathan Vanasco 写道: On Jun 13, 2007, at 5:44 AM, Jeff Pang wrote: When I installed Apache2::Request (without make test) and rut it I got the errors: at the risk of stating the obvious... what happens why you run make test ? It said I was making test with root identify,but Apache would

IO buffer for modperl

2007-06-11 Thread Jeff Pang
Hello, When compiling modperl (I used mp2),what's the correct I/O buffer for it?The server has 1G ethernet interface,would server for something like flv/wma content.The default buffer is 8K,I think I could increase this value for better performance. Thanks!

Re: [mp2] The right way to use CGI parameters in a handler

2007-06-10 Thread Jeff Pang
Foo JH 写道: You'd see that Apache2::Request exposes more stuff, which you can (lazily) use. Unless you are looking for some backward compatibility to tradditional CGI programming, why not embrace the entire modperl library? I second it.Using Apache2::Request is not harder than CGI,but much

Re: BerkeleyDB cache for webservice

2007-04-06 Thread Jeff Pang
There's no issue with the way perl runs on linux -- the issue is the support the distros have for it. If you're running linux, you're building mod_perl from source. Otherwise, ModPerl on linux is just a shame. The distros are just not supporting it. Got it,thanks. It's not the problem

Re: BerkeleyDB cache for webservice

2007-04-05 Thread Jeff Pang
-Original Message- From: Nils Kaiser [EMAIL PROTECTED] After investigating, we decided to go for a mod_perl / berkeleydb solution. The berkeleydb caches the data for each user agent, so the webservice will be only queried once. Coding is not a problem as we have one perl developer

Re: BerkeleyDB cache for webservice

2007-04-05 Thread Jeff Pang
It's slower than BerkeleyDB and Cache::FastMmap. I've used both (DB_File and memcached),but I found memcached was faster than DB_File since memcached used memory as the cache device but DB_File used local filesystem.Am I not right?:) -- mailto: [EMAIL PROTECTED]

re: BerkeleyDB cache for webservice

2007-04-05 Thread Jeff Pang
i think the mod_perl support on the 'enterprise linux' platforms are pretty bad -- they're often way out of date. public distros, like ubuntu, are usually up-to date. freebsd support is the best, much thanks to philip porting to freebsd within minutes of the source code release (btw,

Re: UTF-8 encoding problems under Apache 2 with mod_perl 2.

2007-04-04 Thread Jeff Pang
We also do everything (not source code, which is in ISO-8859-1, only content) in UTF-8 where I work, and we support many different languages. Jeff,how did you do it by using utf-8 for everything?can you give a rough description?Thanks. -- mailto: [EMAIL PROTECTED]

Re: installing perl modules(.pm)

2007-03-04 Thread Jeff Pang
I am trying to install the Devel::Size perl module in Unix.I have installed it but when I try to include it in my program using use lib '/pathname' I get the error as follows:- Can't locate Devel/Size.pm in @INC (@INC contains: Sounds like you installed the module uncorrectly. Please see:

Re: mod_perl logo usage ?

2007-03-04 Thread Jeff Pang
I couldn't find anything online. It would be nice to have an official policy, usage -- i know that there's been a ton of logo issues with other groups. A popular approach seems to be having an official project/release logo, and then another official 'powered by' or 'derivative of'

about memcached under mod_perl

2007-02-26 Thread Jeff Pang
childs and keep it open all the time like Apache::DBI? -- Jeff Pang EMAIL: pangjatearthlink.net AIM: jeffpang

Re: does begin block effect any performance in modperl

2007-01-14 Thread Jeff Pang
I mean anything relative to the performance.is the begin block called everytime orjust the first time and is it safe to define a function in a file and call it with this method rather than a package , The begin blocks are only run at compile time, so won't affect the performance of future

Re: mod_perl problems - require file

2006-12-13 Thread Jeff Pang
Sorry, one other thing I didn't mention from the start is that the errors are happening inconsistently. We can rarely duplicate the error, but see it showing up in log files, and a QA can periodically replicate it. So do you think it be related to a bad Apache process, rather than software

Re: Undefined subroutine in the included templates

2006-11-21 Thread Jeff Pang
You're running into this problem: http://perl.apache.org/docs/1.0/guide/porting.html#Name_collisions_with_Modules_and_libs The best solution is to put your subs into a namespace with a package declaration. Sorry I don't think so since both the template name and the subroutine name are

Undefined subroutine in the included templates

2006-11-18 Thread Jeff Pang
Hello,lists, I have a strange problem for my modperl programs which are run under Apache::Registry (MP1). In my script I require some templates like: require templates/groupshow_head.tpl; Here groupshow_head.tpl is a template file which primarily print chunk of HTML codes in subroutine,like:

Re: unsubscribe

2006-10-24 Thread Jeff Pang
unsubscribe Hello, To unsubscribe from the modperl user lists,please send an empty email to [EMAIL PROTECTED] -- Books below translated by me to Chinese. Practical mod_perl: http://home.earthlink.net/~pangj/mod_perl/ Squid the Definitive Guide: http://home.earthlink.net/~pangj/squid/

Re: apache2 and ptkdb

2006-10-13 Thread Jeff Pang
Hello, Have you loaded the ModPerl::Registry?How can you know your modperl scripts can't be run? When you meet problems,you can look at the error_log where you could find most of the problems. And,here is my mp2 config,it can run well for me: PerlModule ModPerl::Registry Directory /pub

Re: DESTROY

2006-10-10 Thread Jeff Pang
I am not sure, but I think the problem you have is that Apache::DBI ignores any disconnect() calls on database handles, and doesn't actually disconnect. That's true.Apache::DBI ignores all the disconnect() calls. -- Jeff Pang NetEase AntiSpam Team http://corp.netease.com

How to get remote host address in Apache::Request

2006-09-26 Thread Jeff Pang
Hello,list, I want to get the remote client's IPs in Apache::Request like the method of '$q-remote_host()' in CGI.pm. Can you help me?Thank you. -- Jeff Pang NetEase AntiSpam Team http://corp.netease.com

Re: How to get remote host address in Apache::Request

2006-09-26 Thread Jeff Pang
Sorry for the trouble,I've got it.It's '$r-get_remote_host'. -Original Message- From: Jeff Pang [EMAIL PROTECTED] Sent: Sep 26, 2006 5:22 AM To: modperl@perl.apache.org Subject: How to get remote host address in Apache::Request Hello,list, I want to get the remote client's IPs in Apache

Re: install mp1 under linux 2.6 kernel

2006-09-20 Thread Jeff Pang
it and take a look at it.the url is: http://home.earthlink.net/~pangj/tmp/compile.apache.err.gz I'm really appreciated for the farther helps. -Original Message- From: Philip M. Gollucci [EMAIL PROTECTED] Sent: Sep 20, 2006 4:24 PM To: Jeff Pang [EMAIL PROTECTED] Cc: modperl@perl.apache.org

install mp1 under linux 2.6 kernel

2006-09-19 Thread Jeff Pang
)(.text+0x2bdd): In function `boot_Apache(...)(long double, void,...)(long double) static':: undefined reference to `Perl_Gthr_key_ptr' ... lots of these. Could you tell me how to resolve it?Thanks. -- Jeff Pang NetEase AntiSpam Team http://corp.netease.com

Re: modperl2 books?

2006-03-16 Thread Jeff Pang
this is the place to ask, but I am looking for a good mod_perl2 book, which is not on an introductory level, but delves a bit deeper. Are any of these in existance yet? -- Ole Kasper Olsen Information Systems Developer Opera Software ASA -- Jeff Pang NetEase AntiSpam Team http://corp.netease.com

Re: A question for the newbies

2006-02-17 Thread Jeff Pang
under CGI, where code compiling really hurts you. - Perrin -- Jeff Pang NetEase AntiSpam Team http://corp.netease.com

Re: Broken pipe

2006-02-17 Thread Jeff Pang
a warning? Why does it appear? I have followed the suggestions, searched the web, and I have also put in httpd.conf: EnableSendfile Off But these errors continue to appear. Teddy -- Jeff Pang NetEase AntiSpam Team http://corp.netease.com

Re: mod_perl 2.0.0 + Apache 2.0.55 on Cygwin Win2k3

2006-02-16 Thread Jeff Pang
,copying,printing,distributionoruseofthistransmissionisstrictlyprohibited.Ifyouhavereceivedthistransmissioninerror,pleaseimmediatelynotifythesenderbytelephoneorreturnemailanddeletetheoriginaltransmissionanditsattachmentswithoutreadingorsavinginanymanner. -- Jeff Pang NetEase AntiSpam Team http

Re: reload or restart httpd

2006-02-06 Thread Jeff Pang
period, httpd progress must be reload or restart so that to see the change. If is it possible to see the change without reload httpd? -- perl -e 'print unpack(u,62V5N\FME;G\!EFQ`9VUA:6PN8V]M\[EMAIL PROTECTED] )' -- Jeff Pang NetEase AntiSpam Team http://corp.netease.com

Re: debug modperl program

2006-02-04 Thread Jeff Pang
: debug modperl program hi, Debuging a perl program at command line is using -d option, but this can't be used in a modperl program, any doc or examples on this topic about how to debug a modperl program? -- perl -e 'print unpack(u,62V5N\FME;G\!EFQ`9VUA:6PN8V]M\[EMAIL PROTECTED] )' -- Jeff Pang

help with some errors in error_log

2005-11-25 Thread Jeff Pang
Hi,lists, I am new to mod_perl.I have a simple mod_perl script running under Apache::Register.When it run,I found many error messages appeared in logs/error_log. The program is shown below: use strict; use warnings; use CGI; use CGI::Cookie; use vars qw($q $sessionID); $q = new CGI; init();