Re: [mp2] API questions.

2004-11-05 Thread Ruslan U. Zakirov
THanks. All suggestions works well. Stas Bekman wrote: Ruslan U. Zakirov wrote: Hello. 1) I can't find how to get string that represent initial request location. I mean 'http://www.example.com/foo...'. Is it possible? Now, I use next code as workaround: my $location = $r->dir_config

How to get a core dump

2004-11-05 Thread Marc Gracia
Hi everybody. I have a problem on a production cluster with a somewhat big mod_perl app, and I just cannot get any clue of what is happening. The problem is that the servers just exit with Segmentation fault randomly. The problem is rare, hapens 10/20 times each day in each of the 6 frontends, w

Re: Global Variables - What is in Memory?

2004-11-05 Thread Malcolm J Harwood
On Thursday 4 November 2004 09:53 pm, Justin Luster wrote: > Problem #1: > I forgot to initialize a global variable! Bummer. In my code I declare > global variables like this: > use strict; > package mylib; > # Globals: Set them below > $mylib::strGlobalStudyName = ""; > I then initialize them

[mp2] Apache::DBI and Apache::Status

2004-11-05 Thread Scott Scecina
I haven't been able to find an answer to this, so I thought I'd throw it out here: Apache::DBI used to "plugin" to Apache::Status in order to display the DBI connections. Is this not supported in mp2? I have this in my httpd.conf: PerlModule Apache::Status PerlRequire conf/mpstartup.pl

Re: How to get a core dump

2004-11-05 Thread Stas Bekman
Marc Gracia wrote: [...] So, my question is... There is any way to force apache to dump a coredump file? I suppose I'm forgotting something but I really desperate... Please read: http://perl.apache.org/docs/2.0/devel/debug/c.html#Getting_the_core_File_Dumped A secondary question is, some of the ser

Re: How to get a core dump

2004-11-05 Thread Glenn Strauss
On Fri, Nov 05, 2004 at 01:38:44PM +0100, Marc Gracia wrote: > So, my question is... There is any way to force apache to dump a > coredump file? I suppose I'm forgotting something but I really > desperate... On Linux, create a directory that is writable by the httpd user mkdir /var/tmp/apache-co

Re: How to get a core dump

2004-11-05 Thread Marc Gracia
Many Thanks Stass and Glenn, I'll try all this anf will get back.. On dv, 2004-11-05 at 13:38, Marc Gracia wrote: > Hi everybody. > I have a problem on a production cluster with a somewhat big mod_perl > app, and I just cannot get any clue of what is happening. > > The problem is that the servers

RE: Global Variables - What is in Memory?

2004-11-05 Thread Justin Luster
Thank you for the great response to my questions. > Why initialise your data in a seperate function? Is there a reason for not > doing: > use strict; > package mylib; > $strGlobalStudyName = "value"? My $mylib::strGlobalStudyName is not a constant. Every process might need to change it. So I

Re: Global Variables - What is in Memory?

2004-11-05 Thread Perrin Harkins
Hi Justin, > use strict; > package mylib; > # Globals: Set them below > > $mylib::strGlobalStudyName = ""; You could also just say "our $strGlobalStudyName;" here. > I call this initialize function every time the script runs. Anyway I > forgot and so one of my global variables was not initiali

RE: Global Variables - What is in Memory?

2004-11-05 Thread Justin Luster
Thanks. So what you are saying is that http://www.mysite.com/one/MyAdmin.pl and http://www.mysite.com/two/MyAdmin.pl get different package names (because they are in different directories) and so stay separate, but because I have declared a package inside of them with a common name that package

Re: Global Variables - What is in Memory?

2004-11-05 Thread Malcolm J Harwood
On Friday 5 November 2004 11:50 am, Justin Luster wrote: > > Apache::Registry should mangle scripts to seperate names so that they > > don't conflict. However if you are using the same package name in each > > case, the last definition to be loaded will be used. Ie. if both > > one/MyAdmin.pl and

RE: Global Variables - What is in Memory?

2004-11-05 Thread Perrin Harkins
On Fri, 2004-11-05 at 12:18, Justin Luster wrote: > So what you are saying is that > > http://www.mysite.com/one/MyAdmin.pl > and > http://www.mysite.com/two/MyAdmin.pl > > get different package names (because they are in different directories) > and so stay separate, but because I have declared

RE: Global Variables - What is in Memory?

2004-11-05 Thread Justin Luster
This clears things up. Thanks for your help. Justin -Original Message- From: Malcolm J Harwood [mailto:[EMAIL PROTECTED] Sent: Friday, November 05, 2004 9:22 AM To: [EMAIL PROTECTED] Subject: Re: Global Variables - What is in Memory? On Friday 5 November 2004 11:50 am, Justin Luster wr

Re: [mp2] Apache::DBI and Apache::Status

2004-11-05 Thread Stas Bekman
Scott Scecina wrote: I haven't been able to find an answer to this, so I thought I'd throw it out here: Apache::DBI used to "plugin" to Apache::Status in order to display the DBI connections. Is this not supported in mp2? Looks like it wasn't ported to mp2. The following patch should do the trick.

pure fileless requests

2004-11-05 Thread Andrew Maltsev
Hello, I use PerlTransHandler to decide if I want to intercept and serve a request or not. When the request is served by my content handler there is no file that corresponds to it, directly or indirectly. I used to just not call $r->filename(...) at all. But under Gentoo's overtightened default