Re: Moving ExecCGI to mod_perl - performance and custom 'modules'

2021-03-19 Thread Gazzali Jaleel
Porting code from CGI to mod_perl is a fun project. This is a late reply to your original post but wanted to point out an excellent resource - the Practical mod_perl book. The link for the book on the mod_perl site (perl.apache.org) is broken but you can find it at https://modperl2book.org/mp1

Re: Solution for $r->connection->client_addr->port

2019-02-25 Thread Gazzali Jaleel
On 2/25/2019 2:57 PM, Randolf Richardson wrote: On 2/25/2019 2:28 PM, Randolf Richardson wrote: [sNip] As long as one isn't relying on the client's dynamic TCP port number from $r->connection->remote_addr->port for anything (as I've discovered no longer works in the current release of

Re: Compile mod_perl 1.0 on ubuntu 12.04 or later

2019-02-25 Thread Gazzali Jaleel
On 2/25/2019 2:28 PM, Randolf Richardson wrote: [sNip] As long as one isn't relying on the client's dynamic TCP port number from $r->connection->remote_addr->port for anything (as I've discovered no longer works in the current release of mod_perl2), updating to the newest mod_perl2 sho

Re: Compile mod_perl 1.0 on ubuntu 12.04 or later

2019-02-25 Thread Gazzali Jaleel
On 2/24/2019 4:44 PM, Randolf Richardson wrote: On 2/22/19 10:54 AM, Matthias Schmitt wrote: I doubt that you will be able to compile mod_perl 1.x with newer compilers and operating systems. Hold my beer :). [sNip] I have a Makefile that does all of this. I suppose I could publish it on

Re: mod_perl interpreter pool

2019-02-24 Thread Gazzali Jaleel
On 2/24/2019 1:32 PM, André Warnier (tomcat) wrote: On 24.02.2019 01:50, Gazzali Jaleel wrote: On 2/22/2019 2:15 PM, John Dunlap wrote: The Prefork MPM has the following settings: StartServers 5 MinSpareServers   5 MaxSpareServers

Re: mod_perl interpreter pool

2019-02-23 Thread Gazzali Jaleel
On 2/22/2019 2:15 PM, John Dunlap wrote: The Prefork MPM has the following settings:     StartServers 5     MinSpareServers   5     MaxSpareServers  10     MaxRequestWorkers 150     MaxConnectionsPerChild   0 I see these Ap

Re: question on sub-requests

2012-11-13 Thread gAzZaLi
sponse. But that is not valid html. Oh well.. On the other hand, this customer pays for bandwidth used. ;-) gAzZaLi wrote: Hi, you're welcome, glad to be of any help. Sounds like you're close to getting it done or done with it already. If you're interested, here's the r

Re: question on sub-requests

2012-11-12 Thread gAzZaLi
Q1: At first glance, using a mod_perl handler to serve an existing static html file seems like overkill. Couldn't Apache respond (RedirectMatch?) with a common frameset html file with some Javascript, which then fills the first frame with the response to mangle.pl and the second frame with t

Re: ModPerl::Util::exit: (120000) exit was called

2012-02-11 Thread gAzZaLi
*** Disclosure: Haven't encountered this issue but was lacking a Sunday morning puzzle so take this for what it's worth. You're right about the exit() documentation. I tried to recreate your problem and could only come up with a similar situation if I used exit() inside an eval block like s

Re: Tool to create multiple requests

2012-02-07 Thread gAzZaLi
It's rudimentary but you can try Apache ab, the Apache benchmarking tool. You probably have it installed already. Try 'man ab' at the prompt. If you want to emulate 50 concurrent requests, sent twice, you'd do something like: ab -c 50 -n 100 http://example.com/etc?etc If you don't have it

Re: [mp2] [BUG] Segfault with Test::More - duping STDOUT?

2011-12-07 Thread gAzZaLi
Hello, I'm unclear about your sample code, but if you did want to send the output of say open TEST, "|/bin/cat" to the browser, your Perl version should be configured with sfio. The information you've pasted shows that d_sfio=undef. If you did want to do something like "/bin/cat notpasswd" to

Re: Running multiple copies of same site in ModPerl

2011-11-30 Thread gAzZaLi
pm and COPY::MODS::base.pm but calling up http://127.0.0.1/ORIG/ still calls http://127.0.0.1/COPY/. Here is what each base.pm has: /var/www/perl/COPY/MODS/base.pm: package COPY::MODS::base; /var/www/perl/ORIG/MODS/base.pm: package ORIG::MODS::base; And, as gAzZaLi suggested, I also tried switchi

Re: Running multiple copies of same site in ModPerl

2011-11-30 Thread gAzZaLi
Hello, What you're doing is not recommended as you run into namespace issues. Perl caches files and modules that were loaded in %INC, so if you have files and modules with the same name, only one of them gets loaded. Possibly, as an exercise, if you switch the order of the ORIG and COPY lines

Re: Installing mod_perl on Windows 7

2011-11-29 Thread gAzZaLi
Looks like you're all set and running mod_perl 2. In mod_perl 2, $ENV{GATEWAY_INTERFACE} is not special. It was only special in mod_perl 1, in that it said CGI-Perl/1.1 under mod_perl 1 rather than CGI/1.1. To see if you're running under mod_perl 2, check $ENV{MOD_PERL}. You see that it's se

Re: How do you use mod_perl for your web application?

2011-07-04 Thread gAzZaLi
On 6/15/2011 9:01 PM, Fred Moyer wrote: I'm interested in hearing about what application frameworks (Catalyst, CGI::App, Mojolicious) are used here with mod_perl. Given the number of emerging Perl based webservers on CPAN (in addition to Nginx, lighty, etc), it seems like there are many more Pe