p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

beginning_php thread: storing of session and global variables


Message #1 by "carl" <Carl929380262@a...> on Wed, 4 Jul 2001 14:08:21
Can anyone tell me the following:



where on the server are the session variables kept?



where on the server are global and local variables kept?



I would like to know this because I'm wondering that: if session variables 

reside in the server's RAM, then for a page that accesses a session 

variable more than once within its code, would it make more sense to 

reduce the strain of repeated access to a server's RAM by use of a global 

variable assigned to the value of the session variable once only, in which 

use of the global variable is employed instead of where there would have 

been instances of the session variable within the body of the code?

Message #2 by "7stud" <7stud@e...> on Wed, 4 Jul 2001 18:56:59
Hi,



Session information is stored in a flat file on the server.  If you have 

your pc set up with apache/mysql, then you had to create a file somewhere 

on your computer for sessions to store data before sessions could work.  

Here is the relevant section in php.ini:



[Session]

; Handler used to store/retrieve data.

session.save_handler = files



; Argument passed to save_handler.  In the case of files, this is the path

; where data files are stored.

session.save_path = "d:\phpSessions"



I don't know how PWS/Access works (and I don't care because it's a 

worthless product).

Message #3 by "carl" <Carl929380262@a...> on Thu, 5 Jul 2001 00:47:33
> Hi,

> 

> Session information is stored in a flat file on the server.  If you have 

> your pc set up with apache/mysql, then you had to create a file 

somewhere 

> on your computer for sessions to store data before sessions could work.  

> Here is the relevant section in php.ini:

> 

> [Session]

> ; Handler used to store/retrieve data.

> session.save_handler = files

> 

> ; Argument passed to save_handler.  In the case of files, this is the 

path

> ; where data files are stored.

> session.save_path = "d:\phpSessions"

> 

> I don't know how PWS/Access works (and I don't care because it's a 

> worthless product).





Yes I agree that session information is stored on disk at the server, but 

my question is about what happens during the time the script is under 

execution. I'm very sure that RAM is involved with session and/or global 

variables during execution; the question is: which or do both types of 

variables get stored in RAM during script execution?

  Return to Index