|
Posted by Tim Roberts on 10/02/05 04:33
"Joseph S." <js_dev@rediffmail.com> wrote:
>
>Let me rephrase my question,
>
>If i have a page dosomething.php which three users situated at
>geographically diverse locations are simultaneously viewing, and if I
>use
>$_SESSION['x']=$_GET['x'];
>or some such code,
>then,
>are there, in the server machine's RAM, totally three different
>$_SESSION['x'] variables with their respective values or is there just
>one?
There will, of course, be three separate session data structures, and three
separate instances of $_SESSION['x']. That is the entire point of using
sessions -- to distinguish between different users.
>I looked up and found (send win enabler white paper) that the CGI
>installation of PHP under Apache,Windows works like that - there is "a
>separate process initiated" for each request of the dosomething.php
>page and apparently (not clearly stated) not the apache module version
>of PHP.
Well, sort of; *every* CGI request, regardless of the language, starts up a
new process. When the request has been handled, the process ends
(usually). The session stuff has to be put in a store somewhere so that it
does not evaporate.
>Will that setup be <one request one $_SESSION['x'] variable> ?
Always.
>Also, does the code have to be written in a different way for LAMP than
>for WAMP(apachemodule, not CGI) or does it automatically understand so
>and behave thread safe?
>In other words, do I have to do anything else to my $_SESSION['x'] =
>$_GET['x'] for the code to work on LAMP after seeing it run properly on
>my single user WAMP development setup?
No.
--
- Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.
Navigation:
[Reply to this message]
|