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
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
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
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
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
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
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
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
-
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
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)
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
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
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"
-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
(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
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)
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
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
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
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
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
- 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
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
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
-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
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
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
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
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
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.
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" <
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
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
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
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
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
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 "
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
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
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
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
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
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
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
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
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
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
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
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,
49 matches
Mail list logo