Re: Where is Perl compilation output when using modperl ?

2007-06-29 Thread Lionel MARTIN
Hello, Just to confrm that I have the same symptom as yours when I was developing on Win32: when a module couldn't load, the only thing I could get was a bare "Can't load module", without any explanation. Then, th eonly thing I could do was trying to isolate the problem, progressively strippin

Re: Howto develop with modperl 2 ? (Restart Apache all the time ?)

2007-06-21 Thread Lionel MARTIN
Yes, easily. In any of your handler, you make a reference to one test module. For example, in your response handler: use myModule(); use Apache2::Const -compile => qw(OK); sub handler { myModule::printHello(); return Apache2::Const::OK; } 1; And then: myModule.pm: sub printHello { print

Re: Howto develop with modperl 2 ? (Restart Apache all the time ?)

2007-06-19 Thread Lionel MARTIN
Hi, You can put that in your Apache conf file: PerlModule Apache2::Reload PerlInitHandler Apache2::Reload This way, every time you alter one of your Apache modules, it gets reloaded. This incurs a small performance hit (the server has to fstat the related files every time a request is run, to

Re: which module for this purpose?

2007-06-14 Thread Lionel MARTIN
All you need to do (assuming mod_perl2) is: - set the content-type (to whatever file type you are sending) - use $r->sendfile('filename') See http://perl.apache.org/docs/2.0/api/Apache2/RequestIO.html#C_sendfile_ Clint Unless Im mistaken, why not use instead the Apache default handler for th

Re: Loading Win32::OLE in a modperl package

2007-06-08 Thread Lionel MARTIN
Hi again, Did you try finally try out with Apache 2.0? If this works with Apache 2.0, but not with Apache 2.2, then, it would perhaps be useful to point this out. Lionel. - Original Message - From: "Foo JH" <[EMAIL PROTECTED]> To: "Lionel MARTIN" <[E

Re: Loading Win32::OLE in a modperl package

2007-06-08 Thread Lionel MARTIN
ionel. - Original Message - From: "Foo JH" <[EMAIL PROTECTED]> To: "Lionel MARTIN" <[EMAIL PROTECTED]> Cc: "mod_perl" Sent: Friday, June 08, 2007 10:43 AM Subject: Re: Loading Win32::OLE in a modperl package Thanks Lionel, I'm running Ap

Re: Loading Win32::OLE in a modperl package

2007-06-08 Thread Lionel MARTIN
Basically, Doing, in test.pl, run by ModPel::Registry, something like: use Win32::OLE; print 'Hello'; Works prefectly... Which versions (Apache, MP and Perl) are you running? - Original Message - From: "Foo JH" <[EMAIL PROTECTED]> To: "mod_perl" Sent: Friday, June 08, 2007 10:29 A

Re: Is it advisable NOT to limit MaxRequestsPerChild in Win32 modperl?

2007-05-25 Thread Lionel MARTIN
nd as well signal this bug to Apache Win32 porters. (are you subscribed to any Apache mailing list?) Lionel. - Original Message - From: "Foo JH" <[EMAIL PROTECTED]> To: "Lionel MARTIN" <[EMAIL PROTECTED]> Cc: "Perrin Harkins" <[EMAIL PROT

Re: Is it advisable NOT to limit MaxRequestsPerChild in Win32 modperl?

2007-05-25 Thread Lionel MARTIN
- From: "Foo JH" <[EMAIL PROTECTED]> To: "Lionel MARTIN" <[EMAIL PROTECTED]> Cc: "Perrin Harkins" <[EMAIL PROTECTED]>; Sent: Friday, May 25, 2007 10:29 AM Subject: Re: Is it advisable NOT to limit MaxRequestsPerChild in Win32 modperl? Hello Perri

Re: Is it advisable NOT to limit MaxRequestsPerChild in Win32 modperl?

2007-05-24 Thread Lionel MARTIN
Unless I'm mistaken, and even if there is only one (child) Apache process and several thread under Windows (winnt MPM), the only directive that can be used is MaxRequestsPerChild and not MaxRequestsPerThread. It is not possible to restart individual threads (and associated Perl Interpreteers)

Re: After retrieving data from DB, the memory doesn't seem to be freed up

2007-05-12 Thread Lionel MARTIN
On 5/12/07, Lionel MARTIN <[EMAIL PROTECTED]> wrote: Of course, I understand why $tmp value is reset during each call (the lexical variable goes out of scope) but, as we can see, the address used by the variable is changing as well during each request, and this fact doesn't seem

Re: After retrieving data from DB, the memory doesn't seem to befreed up

2007-05-12 Thread Lionel MARTIN
messes up the results... All that is surprising, isn't it? Does anyone has any explanation? Anyway, if noone can explain that, I think I'll stop trying to understand everything and just assume that lexical are keeping their memory block, even if this doesn't seem to always be the

Re: After retrieving data from DB, the memory doesn't seem to be freed up

2007-05-11 Thread Lionel MARTIN
Hi all (and Perrin), I understand the concepts being discussed here. However, no on replied one of my questions: Let's conside this script: #** use strict; package mypack; my $tmp; $tmp .= 'a'; print '$tmp value: ' . $tmp . ' - address: ' . \$tmp . "\n"

Re: After retrieving data from DB, the memory doesn't seem to be freed up

2007-05-11 Thread Lionel MARTIN
-another example hat comes to my mind is a project (implemented in PHP) where I had to work. Part of the process was retrieving cached HTML template pages from the server and do BB tags parsing before serving the client. Of course, you would tell me that I could retrieve the data chunk by c

Re: After retrieving data from DB, the memory doesn't seem to be freed up

2007-05-11 Thread Lionel MARTIN
(sorry, I posted the message below from another email address hours ago, and it didn't get publish - see below if anyone could reply) On May 10, 2007, at 6:52 PM, Andy Armstrong wrote: On 10 May 2007, at 23:48, Jonathan Vanasco wrote: that also means that variables are sticky -- if you chang

Re: After retrieving data from DB, the memory doesn't seem to befreed up

2007-05-11 Thread Lionel MARTIN
Hi, I think you got me wrong. My initial question was basically something like "how could I preserve/give back memory if needed" (i.e. in rare situations) and the reply turned up into a "don't use large scalars". (which is relevant, I agree, but was not directly replying my initial question)

Re: After retrieving data from DB, the memory doesn't seem to be freed up

2007-05-11 Thread Lionel MARTIN
Lionel MARTIN wrote: - Don't load large amounts of data into scalars. Fine. Now I know why. But sometimes, you don't have the choice. I'd like to know what situations you encounter where you are forced to load large amounts of data into scalars. I can't think of any

Re: After retrieving data from DB, the memory doesn't seem to be freed up

2007-05-11 Thread Lionel MARTIN
Hi again, If you have a lot of scripts that, for example, load large data files, make a module with a sub that you call to load the files and use it from all your scripts. Pass the data by reference to the calling scripts. Then you will isolate the large lexical in that one module. Better ye

Re: After retrieving data from DB, the memory doesn't seem to be freed up

2007-05-11 Thread Lionel MARTIN
Hi Perrin, No, if the message you're getting is to use globals instead of lexicals then you've got it all wrong. - Use lexicals for everything, unless you actually want the value to persist across requests. I was thinking, for large amounts of data, about using globals. Indeed, imagine you hav

Re: After retrieving data from DB, the memory doesn't seem to be freed up

2007-05-10 Thread Lionel MARTIN
I would even say PER THREAD or PER PERL INTERPRETER. Indeed, I'm running Per/mod perl under Windows, and there's one unique Apache process (except the parent one) hosting all perl interpreters. Something to ask about modperl and memory in Windows. I know modperl uses threads in Windows. But do

Re: After retrieving data from DB, the memory doesn't seem to be freed up

2007-05-10 Thread Lionel MARTIN
Thanks for this. well, to complicate things, this behavior is PER CHILD... meaning: if you run test1.pl 2x and they are both served by the same apache child, then the memory will be reused. if you run test1.pl 2x and they are both served by the different apache children, then the memory wi

Re: After retrieving data from DB, the memory doesn't seem to be freed up

2007-05-10 Thread Lionel MARTIN
- Original Message - From: "Andy Armstrong" <[EMAIL PROTECTED]> To: "Lionel MARTIN" <[EMAIL PROTECTED]> Cc: Sent: Friday, May 11, 2007 12:34 AM Subject: Re: After retrieving data from DB, the memory doesn't seem to be freed up On 10 May 2007

Re: After retrieving data from DB, the memory doesn't seem to be freed up

2007-05-10 Thread Lionel MARTIN
ame memory locations are used across different scripts. (which is not the case with lexical variables) Thanks for all your help, I now have a clearer picture. Lionel. - Original Message - From: "Perrin Harkins" <[EMAIL PROTECTED]> To: "Lionel MARTIN" <[E

Re: After retrieving data from DB, the memory doesn't seem to be freed up

2007-05-10 Thread Lionel MARTIN
unning the script twice in a mod perl environment)? Lionel. - Original Message - From: "Perrin Harkins" <[EMAIL PROTECTED]> To: "Lionel MARTIN" <[EMAIL PROTECTED]> Cc: Sent: Friday, May 11, 2007 12:17 AM Subject: Re: After retrieving data from DB, the memor

Re: After retrieving data from DB, the memory doesn't seem to be freed up

2007-05-10 Thread Lionel MARTIN
-I'll try to use, in my Perl scripts, lexical variables instead of global variables, so that I'm sure the used memory can be resued for later requests (global variables, on the other hand, stick in memory, due to mod perl way of operating) Not really. In terms of memory, there's no differenc

Re: After retrieving data from DB, the memory doesn't seem to be freed up

2007-05-10 Thread Lionel MARTIN
When the array goes out of scope its reference count is decremented. If the reference count goes to zero (implying there are no more references) the memory is released. I would have believed the same, and that's why I believed that $tmp = [0..10]; followed by $tmp = 1; would free memor

Re: After retrieving data from DB, the memory doesn't seem to be freed up

2007-05-10 Thread Lionel MARTIN
in memory, due to mod perl way of operating) I found an interesting topic here: http://www.nntp.perl.org/group/perl.perl5.porters/2006/03/msg111095.html Lionel. - Original Message - From: "Perrin Harkins" <[EMAIL PROTECTED]> To: "Lionel MARTIN" <[EMAIL PROTECTE

Re: After retrieving data from DB, the memory doesn't seem to be freed up

2007-05-10 Thread Lionel MARTIN
ng large amounts of data, I should undef if possible the variables before allocating others, so that processes don't grow too big? Thanks, Lionel. ----- Original Message - From: "Perrin Harkins" <[EMAIL PROTECTED]> To: "Lionel MARTIN" <[EMAIL PROTECTE

After retrieving data from DB, the memory doesn't seem to be freed up

2007-05-10 Thread Lionel MARTIN
Hi, I am running an Apache 2.059 server, on a Win32 platform (Perl 5.8 & mod_perl 2.03). During the lifetime of the server, I cn see that the memory footprint of the Apache process is getting bigger and bigger, so I would like to understand why. I can't say this is really a problem, but I woul

Re: Apache::DBI - Can two different connection handles have the same reference/address at different times?

2007-05-08 Thread Lionel MARTIN
Yes absolutely. What you are trying to do is re-invent some of the existing functionality of both Apache::DBI and DBI. DBI can cache prepared statements so you don't have to prepare them everytime and Apache::DBI can pool those statements' connections so you don't have to re-create them everytime.

Re: Apache::DBI - Can two different connection handles have the same reference/address at different times?

2007-05-08 Thread Lionel MARTIN
OK Fine. But will this be compatible with Apache::DBI? Moreover, I would be happy to have a reply to my original question, at least for the sake of knowledge. Thanks. - Original Message - From: "Michael Peters" <[EMAIL PROTECTED]> To: "Lionel MARTIN" <

Apache::DBI - Can two different connection handles have the same reference/address at different times?

2007-05-07 Thread Lionel MARTIN
Hello, As you know, use Apache::DBI; DBI->connect() returns a db/connection handle. I am wondering if it is possible, at different times during the server life, that Apache::DBI returns twice the same memory reference, while the connection is in fact physically not the same. The reason f

Re: Weird behaviour with strings and accents

2006-12-29 Thread Lionel MARTIN
Hi, Having $VAR1 = ["\x{e0} pr\x{e9}sent prot\x{e9}g\x{e9}"] or $VAR1 = ["\x{e0} pr\x{e9}sent prot\x{e9}g\x{e9}login774"]; is really what you were expecting, i.e. true latin1 one byte characters. (it appears that your dump shows the hexa code of non ASCII chars, i.e. with hex code above \x{a0

Re: Getting post data

2006-09-28 Thread Lionel MARTIN
Hi, You should use libapreq2, which is a library that globally allows to deal with data submitted by the client. You can find documentation about it here: http://search.cpan.org/~joesuf/libapreq2-2.08/glue/perl/lib/Apache2/Request.pm Concerning CGI.pm, except if you are already using it for o

Re: mod_perl make test failed tests

2006-06-05 Thread Lionel MARTIN
istake when targetting to use Win32 on a production server?" Let me have your conclusuions if you can, Thanks, Lionel. - Original Message - From: "Philip M. Gollucci" <[EMAIL PROTECTED]> To: "Lionel MARTIN" <[EMAIL PROTECTED]> Cc: "Mauric

Re: mod_perl make test failed tests

2006-06-05 Thread Lionel MARTIN
Hi all, This post is not related to the main topic, but Philip, you said: I think DBI seems to be making progress on CLONE() ing $dbh handles, at least from the test results I got/saw over on dbi-dev (at) perl (dot) org for the 1.51-RC1 just posted. Its docs still say not to use DBI with ith

Re: Where do the "warn" message go? (Ap2 & MP2 on Win32)

2006-05-19 Thread Lionel MARTIN
Hi, Thanks for trying to help me. Replying each of your questions... - Original Message - From: "Malcolm J Harwood" <[EMAIL PROTECTED]> To: Cc: "Lionel MARTIN" <[EMAIL PROTECTED]> Sent: Thursday, May 18, 2006 3:41 PM Subject: Re: Where do the "

Re: Cannot load mod_perl.so

2006-05-15 Thread Lionel MARTIN
e perl_module modules/mod_perl.so I have ActivePerl 5.8.8. The mod_perl.so I have is the the most recent binary available from the mod_perl site. Tracy "Lionel MARTIN" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > I don

Re: Cannot load mod_perl.so

2006-05-15 Thread Lionel MARTIN
Hi, I don't think that's a question of path, as you are telling us that you checked that, and that the file was there. Actually, I think this is a compilation problem, between mod_perl and perl itself (Apache has nothing to do with that right now). I'm running under Windows as well, and I mad

Re: Where do the "warn" message go? (Ap2 & MP2 on Win32)

2006-05-10 Thread Lionel MARTIN
warning"; # There's really nothing more. Lionel. - Original Message - From: "Malcolm J Harwood" <[EMAIL PROTECTED]> To: Cc: "Lionel MARTIN" <[EMAIL PROTECTED]> Sent: Thursday, May 11, 2006 7:52 AM Subject: Re: Where do the "warn" messag

Re: Where do the "warn" message go? (Ap2 & MP2 on Win32)

2006-05-10 Thread Lionel MARTIN
quot;; die "dying\n"; Then, "waning" doesn't get logged while "dying" does... - Original Message - From: "Malcolm J Harwood" <[EMAIL PROTECTED]> To: Cc: "Lionel MARTIN" <[EMAIL PROTECTED]> Sent: Tuesday, May 09, 2006 3:53 PM

Re: Using Apache::DBI

2006-05-08 Thread Lionel MARTIN
rkins" <[EMAIL PROTECTED]> To: "Lionel MARTIN" <[EMAIL PROTECTED]> Cc: "Octavian Rasnita" <[EMAIL PROTECTED]>; Sent: Monday, May 08, 2006 5:00 PM Subject: Re: Using Apache::DBI On Mon, 2006-05-08 at 16:56 +0200, Lionel MARTIN wrote: And what a

Re: Using Apache::DBI

2006-05-08 Thread Lionel MARTIN
And what about the best usage when using threaded MPMs, like Win32 MPMs, concerning connections? - Original Message - From: "Perrin Harkins" <[EMAIL PROTECTED]> To: "Octavian Rasnita" <[EMAIL PROTECTED]> Cc: Sent: Monday, May 08, 2006 3:26 PM Subject: Re: Using Apache::DBI Octavian

Re: Where do the "warn" message go? (Ap2 & MP2 on Win32)

2006-05-04 Thread Lionel MARTIN
the content of the warn message is going. (please have a look at the details below for the original question) - Original Message - From: "William A. Rowe, Jr." <[EMAIL PROTECTED]> To: "Lionel MARTIN" <[EMAIL PROTECTED]> Cc: Sent: Thursday, May 04, 2006 1

Where do the "warn" message go? (Ap2 & MP2 on Win32)

2006-05-04 Thread Lionel MARTIN
Hi,   I'm currently running Apache 2.0.54 with MP 2.0.2, on Win32.   When I'm doing a   print STDERR "Hello\n";warn "Hello\n";   at server startup, i.e.in a >Perl> block in httpd.cong, both messages go to the console, and to error.log as well.   But when I'm doing the same thing within a sc

Re: How many people use the Windows combo of Apache2 + mod_perl2 ?

2006-04-26 Thread Lionel MARTIN
Hi, I'm replying below. On Wed, 2006-04-26 at 17:20 +0200, Lionel MARTIN wrote: I'm preloading this module, using "PerlModule MyLoadingModule" in httpd.conf. Does that change if you load them via "use MyLoadingModule" in a startup.pl? I can't und

Re: How many people use the Windows combo of Apache2 + mod_perl2 ?

2006-04-26 Thread Lionel MARTIN
Hi, modules, that are loaded 4 times in all. You might we watching each Interpreter thread start, IIRC they start in sequence and not simultaneously. At any rate, thats a feature of the winnt mpm. Unless I'm missing a point, I'm not convinced by that. Indeed, I made further tests, and no ma

Re: How many people use the Windows combo of Apache2 + mod_perl2 ?

2006-04-26 Thread Lionel MARTIN
Hi, I'm having the same kind of interrogation. Concerning me, I'm working on a project that's still in development, and I'm developing under Windows (MP2, ActivePerl 5.8.8 Build 816 , Apache 2.055) I'll have to make a choice for the production environment, and I'm not sure what to choose. I'll h

[MP2] Is there anything shared between threads in threaded MPMs like the Winnt one?

2006-04-15 Thread Lionel MARTIN
  Hi,   I'm using MP v2.02, along with ActivePerl v5.8.8 and Apache v2.054, all that under Windows XP.   Under Win32, the Apache memory model is a threaded model, i.e. we have one master Apache process,and, then, one unique child process, containing several threads, that can, if needed,