william wrote:
On 5/20/08, william <[EMAIL PROTECTED]> wrote:
Hello, I just know that I can't have a startup script, but how can I
create an object in the startup script and then used that variable
object in child modperl script ? Thanks.
Sorry I mean I CAN have a startup script.
Hi.
Take this as a not really qualified answer, but until one of the gurus
here jumps in, it may be a start.
The simple question you are asking above is in fact very complicated.
If the idea of your question is to create some variable once at the
server start, and then be able to share that variable through multiple
invocations of a script or module, then you will probably not be able to
do that, or at least not in a simple way.
The first thing that happens, is that there are multiple Apache children
processes started and running at the same time, and that you never know
which one is going to execute your script. And each one of these
children processes, will have its own independent copy (or instance) of
your "common" variable (or object). So the variable will not really be
common.
There are some ways around that, involving shared memory. But it is
probably anyway more complicated that what your simple question above
seems to indicate of what you expect.
Let me make a prediction : I can see a quite long and interesting thread
starting here..
André