Re: Using $_SESSION array for large number of variables. Any recommendations?
| From: | Jimmy Brock | Date: | Sun, 25 Apr 2004 23:48:06 +0000 |
| Subject: | Re: Using $_SESSION array for large number of variables. Any recommendations? | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-34083@lists.php.net to get a copy of this message | ||
I would recommend cookies, not session.
Cookies are stored on the users machine, whereas session data is stored on
the server. If you have a power failure or have to reboot the server session
data will be lost -- since session data is stored in memory.
"Ross Honniball" <ross@bookshop.jcu.edu.au> wrote in message
news:6.0.0.22.1.20040425182335.01c17e40@bookshop2.jcu.edu.au...
> Hi all,
>
> System : Windows XP / Apache / MySql / PHP
>
> I'm considering using session variables to store a large amount of data.
> How much is 'large'? To be honest, I have no idea at this point - very
> early days.
>
> For arguments sake, lets say the system consisted of 100 users who will
all
> store between them say 1000 different variables and objects for a period
of
> 1 or 2 days.
>
> In a nutshell, reason for storing this info is to save the state of php
> programs.
>
> Is this approach advisable, or are there limits / other considerations
when
> using session variables?
>
> I would greatly appreciate peoples comments on potential problems pursuing
> this approach from anyone with extensive experience using session vars.
>
> Thanks ... Ross
>
> . Ross Honniball JCU Bookshop Cairns Supervisor
> . James Cook Uni, McGreggor Rd, Smithfield, Qld. 4878, Australia
> . Ph:07.4042.1157 Fx:07.4042.1158 Em:ross@bookshop.jcu.edu.au
> . There are no problems. Only solutions.