[mp2] query_string

2005-02-18 Thread William Ross
hello list. very dumb question for you: with mod_perl2 and apreq2, what is the proper way to get the raw query string? (I want to pass it through the login process.) or is this Bad Thinking? thanks will

AW: [mp2] query_string

2005-02-18 Thread Denis Banovic
Hi Will, The simplest way is to get it out of the %ENV Denis -Ursprüngliche Nachricht- Von: William Ross [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 18. Februar 2005 13:02 An: modperl@perl.apache.org Betreff: [mp2] query_string hello list. very dumb question for you: with mod_perl2

Re: [mp2] query_string

2005-02-18 Thread Geoffrey Young
William Ross wrote: > hello list. > > very dumb question for you: with mod_perl2 and apreq2, what is the > proper way to get the raw query string? using just the mp2 api its $r->args, just like mp1 http://perl.apache.org/docs/2.0/api/Apache/RequestRec.html#C_args_ using apreq2 it looks like y

Re: AW: [mp2] query_string

2005-02-18 Thread Geoffrey Young
Denis Banovic wrote: > Hi Will, > > The simplest way is to get it out of the %ENV that's not really true - that %ENV is popualted with standard CGI variables is not a given in mod_perl 2: http://perl.apache.org/docs/2.0/user/config/config.html#C_SetupEnv_ basically, mod_perl configured as a

Re: [mp2] make test errors

2005-02-18 Thread Joe Orton
On Thu, Feb 17, 2005 at 03:05:31PM -0500, William McKee wrote: > On Thu, Feb 17, 2005 at 04:53:45PM +, Joe Orton wrote: > > Check for the result of the: > > > > "checking if O_NONBLOCK setting is inherited from listening sockets" > > > > test when you run the configure script. > > I wasn't s

setting user and logging

2005-02-18 Thread Sean Davis
I am using mod_perl 1.29 and apache 1.33 on macos. I have a content handler that does its own authen and authz. I would like to log the username. When I set the user using $r->user($username) in the content handler, I don't see the username in my log. I thought log handlers came after conte

Re: Apache::Request for apache2, mod_perl2, mason1.28

2005-02-18 Thread Bart Lenoir
On Wed, 16 Feb 2005 09:05:20 -0500, Kurt Hansen wrote > Bart Lenoir wrote: > > >I've been building perl-5.8.6, httpd-2.0.53, mod_perl-2.0.0-RC4(static) and > >HTML-Mason-1.28 in /usr/local on Linux 2.4 (Debian). Everything went fine > >until one of the last of Mason's requirements was Apache::Requ

Has anyone successfully used Devel::Profiler::Apache under modperl?

2005-02-18 Thread Richard Chen
Hi,     I have used Apache::DProf but find that it leads to bus errors on many requests. I found this Devel::Profiler::Apache which is supposed to be a drop-in replacement for Apache::DProf in such bus error cases. However, it does not seem to work right.      First of all, specifyi

Re: setting user and logging

2005-02-18 Thread Geoffrey Young
Sean Davis wrote: > I am using mod_perl 1.29 and apache 1.33 on macos. I have a content > handler that does its own authen and authz. I would like to log the > username. When I set the user using $r->user($username) in the content > handler, I don't see the username in my log. I thought log h

Re: setting user and logging

2005-02-18 Thread Sean Davis
On Feb 18, 2005, at 9:16 AM, Geoffrey Young wrote: Sean Davis wrote: I am using mod_perl 1.29 and apache 1.33 on macos. I have a content handler that does its own authen and authz. I would like to log the username. When I set the user using $r->user($username) in the content handler, I don't s

Re: Has anyone successfully used Devel::Profiler::Apache under modperl?

2005-02-18 Thread Geoffrey Young
Richard Chen wrote: > Hi, > I have used Apache::DProf but find that it leads to bus errors on > many requests. > I found this Devel::Profiler::Apache which is supposed to be a drop-in > replacement > for Apache::DProf in such bus error cases. However, it does not seem to work > rig

Re: setting user and logging

2005-02-18 Thread Geoffrey Young
> It turns > out I was not setting it correctly--when I do > $r->connection->user($user), it works as expected well, $r->user($user) and $r->connection->user($user) should be equivalent calls for the version you're using, but if you have something to work that's even better :) --Geoff

Re: [Mason] Re: Apache::Request for apache2, mod_perl2, mason1.28

2005-02-18 Thread Randy Kobes
On Fri, 18 Feb 2005, Bart Lenoir wrote: [ ... ] > I started all over but with mod_perl2 as DSO this time. > The static installation of mod_perl-2.0.0-RC4 at the time > went ok, but now it failed for the test t/api/module. So, > I took mod_perl-1.99_17 which compiled very well. > libapreq2-2.04_03-d

Re: [mp2] make test errors

2005-02-18 Thread William McKee
On Fri, Feb 18, 2005 at 01:40:44PM +, Joe Orton wrote: > That confirms that the problem: you got a connect() failure when the > configure test program attempted to a listener bound to 0.0.0.0 OK. > You can try the standalone test program here to reproduce the failure: Yes, that seems to be

Re: [mp2] query_string

2005-02-18 Thread William Ross
On 18 Feb 2005, at 13:11, Geoffrey Young wrote: William Ross wrote: hello list. very dumb question for you: with mod_perl2 and apreq2, what is the proper way to get the raw query string? using just the mp2 api its $r->args, just like mp1 http://perl.apache.org/docs/2.0/api/Apache/RequestRec.html#C

Re: Has anyone successfully used Devel::Profiler::Apache under modperl?

2005-02-18 Thread Sam Tregar
On Fri, 18 Feb 2005, Richard Chen wrote: >Most importantly, after the server process is shutdown and dprofpp > is applied to the tmon.out file, it always complains about garbled profile. > The -F option for dprofpp does not help. So basically I cannot use any data > inside the tmon.ou

Re: [mp2] [PATCH] DESTDIR does not apply to mod_perl.so and includes

2005-02-18 Thread Stas Bekman
Cory Omand wrote: On Wed, 2005-02-09 at 15:31, Stas Bekman wrote: That's why the only sensible thing I can suggest is a second DESTDIR argument, which is apache-specific and of course it needs to be called differently. I've earlier suggested MP_AP_DESTDIR. Attached is a patch which will add a ne

Re: [mp2] make test errors

2005-02-18 Thread William McKee
On Thu, Feb 17, 2005 at 06:27:15PM -0500, Stas Bekman wrote: > As for 'Can't open t/conf/perlsection.conf', do > > t/TEST -clean To make a long story short, I had run the make test on the source as root which caused the t/ directory to have its ownership changed to nobody. So when I went to run m

Looking for easy sessions using mod_perl

2005-02-18 Thread Boysenberry Payne
I'm moving from PHP to mod_perl. What a jump... Normally in php it's as simple as: session_start(); Then depending on your settings the session is kept in a cookie or in the url. I've looked into Apache::Session a bit, also Session (which is a wrapper for Apache:Session.) I set it up locally usin

Re: Looking for easy sessions using mod_perl

2005-02-18 Thread Jonathan Vanasco
the squares are because your cookie is serialized -- thats just the data structure Below is a bunch of stuff that i routinely use in a class that is essentially a WebPageVisitor (its not the complete stuff, so it might seem spotty) maybe that will help you --- our $CookieDefaults = { d

Re: Looking for easy sessions using mod_perl

2005-02-18 Thread Perrin Harkins
On Fri, 2005-02-18 at 12:43 -0600, Boysenberry Payne wrote: > Normally in php it's as simple as: > session_start(); It's that easy with mod_perl too if you use Apache::SessionManager. Save yourself some trouble and just use that. http://search.cpan.org/search?query=Apache-SessionManager&mode=dist

Fwd: A question about mod_ssl with mod_rewrite and .htaccess files

2005-02-18 Thread Boysenberry Payne
I sent this to the mod_ssl list first, but got no responce..oddly. Any help would be much appreciated... Begin forwarded message: From: Boysenberry Payne <[EMAIL PROTECTED]> Date: February 17, 2005 1:11:45 PM CST To: modssl-users@modssl.org Cc: [EMAIL PROTECTED] Subject: A question about mod_ss

Re: Looking for easy sessions using mod_perl

2005-02-18 Thread Jonathan Vanasco
Thats a whole lot easier than my approach. On Feb 18, 2005, at 2:18 PM, Perrin Harkins wrote: It's that easy with mod_perl too if you use Apache::SessionManager. Save yourself some trouble and just use that. http://search.cpan.org/search?query=Apache-SessionManager&mode=dist

Re: [mp2] make test errors

2005-02-18 Thread William McKee
On Fri, Feb 18, 2005 at 10:15:19AM -0500, William McKee wrote: > Actually, I suppose that I could try running the nonblock script first > to see if that works. I was able to get my hosting provider to run the nonblock program outside of a jailed process and it works. We've been trying to figure ou

Re: Has anyone successfully used Devel::Profiler::Apache under modperl?

2005-02-18 Thread Richard Chen
Hi Geoff, I downloaded the csv dir for Devel-Profiler and installed it. Without doing anything else and used it just like the old one. The result is much worse. The page just hangs and after 2 minutes, I checked the tmon.out file and found it to be 75Mb in size and is still increasing at crazy sp

Re: Has anyone successfully used Devel::Profiler::Apache under modperl?

2005-02-18 Thread Geoffrey Young
Richard Chen wrote: > Hi Geoff, > > I downloaded the csv dir for Devel-Profiler and > installed it. Without doing anything else and used it > just like the old one. The result is much worse. > The page just hangs and after 2 minutes, I checked > the tmon.out file and found it to be 75Mb in size

Re: Has anyone successfully used Devel::Profiler::Apache under modperl?

2005-02-18 Thread Sam Tregar
On Fri, 18 Feb 2005, Geoffrey Young wrote: > sam is the real expert here, so I would follow his advice more than mine :) That said, most of the new code in CVS is Geoff's. So don't blame me if it roasts your cat. ;) -sam

mod_perl, mod_gzip and connection->fileno

2005-02-18 Thread Marcel Greter
I'm using a "check_connection" subroutine to check if a user has hit the stop button in his browser to abort the mod_perl handler. I actually found the solution for the problem while writing this email, but wanted to inform the list anyway, as the examples on the net all contain an error under

Re: Has anyone successfully used Devel::Profiler::Apache under modperl?

2005-02-18 Thread Geoffrey Young
Sam Tregar wrote: > On Fri, 18 Feb 2005, Geoffrey Young wrote: > > >>sam is the real expert here, so I would follow his advice more than mine :) > > > That said, most of the new code in CVS is Geoff's. So don't blame me > if it roasts your cat. ;) d'oh! :) I guess the real difference the

Re: [mp2] make test errors

2005-02-18 Thread Stas Bekman
William McKee wrote: [...] To recap, these are the results of the mp2 test (RC4) with the following environment setting: export ac_cv_o_nonblock_inherited=yes [...] # Failed test 2 in t/api/access2.t at line 15 # testing : no credentials passed # expected: 401 # received: 403 not ok 2 I

Re: [mp2] make test errors

2005-02-18 Thread Stas Bekman
Joe, shouldn't the APR API emit some kind of errors in the situation like William has with jail env+ac_cv_o_nonblock_inherited thingy, rather than silently fail? -- __ Stas BekmanJAm_pH --> Just Another mod_perl Hack

Re: [mp2] make test errors

2005-02-18 Thread Jie Gao
Hi Stas, The documentation at http://perl.apache.org/docs/2.0/api/APR/OS.html has an inconsistency. In the example, it seems the method "thread_current" should actually be "current_thread_id". Regard, Jie

Re: [mp2] make test errors

2005-02-18 Thread Stas Bekman
Jie Gao wrote: Hi Stas, The documentation at http://perl.apache.org/docs/2.0/api/APR/OS.html has an inconsistency. In the example, it seems the method "thread_current" should actually be "current_thread_id". Thanks Jie, committed. -- _

exec and detach a subprocess

2005-02-18 Thread Igor Shevchenko
Hi all, How can I launch a subprocess and have it completely detached from the mod_perl2/apache2 environment ? All file descriptors closed, not in a process group, etc. I was trying to do it like this: sub safe_exec { return if fork() > 0; # close all descriptors foreach my $f

Re: mod_perl, mod_gzip and connection->fileno

2005-02-18 Thread Stas Bekman
Marcel Greter wrote: I'm using a "check_connection" subroutine to check if a user has hit the stop button in his browser to abort the mod_perl handler. I actually found the solution for the problem while writing this email, but wanted to inform the list anyway, as the examples on the net all con

Re: exec and detach a subprocess

2005-02-18 Thread Stas Bekman
Igor Shevchenko wrote: Hi all, How can I launch a subprocess and have it completely detached from the mod_perl2/apache2 environment ? All file descriptors closed, not in a process group, etc. I was trying to do it like this: sub safe_exec { return if fork() > 0; # close all descript

Re: Strange problem with Mail::Send

2005-02-18 Thread Stas Bekman
Ken Miller wrote: My web app sends notification emails when a task transitions from one part of the work flow to another. I use Mail::Send to send mail, using a smtp server to transfer the mail. The code looks something like this: my $mail = Mail::Send->new( Subject => 'a subject', To => '

Re: $r->document_root

2005-02-18 Thread Stas Bekman
Cahill, Earl wrote: [...] Second, I couldn't get this $r->document_root(hostname2docroot($r->hostname)); To set the docroot. However, each of the following worked my $new_docroot = hostname2docroot($r->hostname); $r->document_root($new_docroot); And $r->document_root("" . hostname2docroot($r->ho

Re: $r->document_root

2005-02-18 Thread Stas Bekman
Stas Bekman wrote: Cahill, Earl wrote: [...] Second, I couldn't get this $r->document_root(hostname2docroot($r->hostname)); [...] It's a bug. This patch which will go in shortly fixes it: [...] +conf->ap_document_root = apr_pstrdup(r->pool, SvPV_nolen(new_root)); [...] before it just happe

Re: setting up static and dynamic Apache 2.0 instructions for MP2 newbie

2005-02-18 Thread Stas Bekman
Barry Hoggard wrote: I am pretty comfortable with setting up a static front end that proxies to a mod_perl server listening on 127.0.0.1 with Apache 1.x and mod_perl 1.x, and mod_rpaf. Are there any caveats I should know about before getting this working on 2.0 before I start setting it up? I

Re: [mp2] utf8 data garbled on second + subsequent loads

2005-02-18 Thread Stas Bekman
Roman Vašíček wrote: On Fri, Feb 11, 2005 at 01:56:55PM +0100, Roman Vašíček wrote: It is strange. CGI works ok, but i was unable to get correct output even from module even first time. It seems to be ok for me after switching from perl-script to modperl handler. apache 2.0.48 mod_perl

Re: [mp2] threaded applications inside of mod_perl

2005-02-18 Thread Stas Bekman
Stas Bekman wrote: Stas Bekman wrote: Thanks for the details. I can now reproduce the segfault. I'll post again when this is fixed. I've traced it down to a perl-core issue. I'm submitting a report to p5p and I've CC'ed you, so you can stay in the loop. doesn't look like anybody is going to try

Re: mod_perl, mod_gzip and connection->fileno

2005-02-18 Thread Stas Bekman
Marcel Greter wrote: Stas Bekman schrieb: ... my $fileno = $connection->fileno(0); vec(my $rin = '', $fileno, 1) = 1; select(my $rout = $rin, undef, undef, 0); Is this better that IO::Select in [2]? It should do the same thing. IMHO IO::Select is just a frontend for the core select funct

Re: mod_perl, mod_gzip and connection->fileno

2005-02-18 Thread Marcel Greter
Stas Bekman schrieb: ... my $fileno = $connection->fileno(0); vec(my $rin = '', $fileno, 1) = 1; select(my $rout = $rin, undef, undef, 0); Is this better that IO::Select in [2]? It should do the same thing. IMHO IO::Select is just a frontend for the core select function, so you don't nee

Re: mod_perl, mod_gzip and connection->fileno

2005-02-18 Thread Marcel Greter
Stas Bekman schrieb: Marcel Greter wrote: Stas Bekman schrieb: ... my $fileno = $connection->fileno(0); vec(my $rin = '', $fileno, 1) = 1; select(my $rout = $rin, undef, undef, 0); Is this better that IO::Select in [2]? It should do the same thing. IMHO IO::Select is just a frontend for

Re: mod_perl, mod_gzip and connection->fileno

2005-02-18 Thread Stas Bekman
Marcel Greter wrote: [...] How about we keep the original code using IO::Select and provide an example how to do it more efficiently? The IO::Select example is much more userfriendly :) Maybe something like this? Don't know how much you want to annotate ?? I meant to explain what it does. Not ev

[mp2 docs update] forget PerlRequire, welcome PerlPostConfigRequire and PerlConfigRequire

2005-02-18 Thread Stas Bekman
For those using mod_perl2-RC3 or higher two new configuration options are available: PerlPostConfigRequire and PerlConfigRequire Apache 2 is not the same as Apache 1.3, so things are a bit different under mp2 as well. I've updated the docs, so you can read about those differences here: http://

RE: setting up static and dynamic Apache 2.0 instructions for MP2 newbie

2005-02-18 Thread Adam Prime x443
Would it make sense to use Worker for the front end, and prefork for the back end (assuming you want/need prefork for the backend) in this scenario? Also, now that mod_deflate is part of the package, would it make sense to recommend running that as well. I ask all this because i set up a box fo