473,402 Members | 2,072 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

Session Variables How Many?

I'm wanting to store about 6 fields one of which could have about 1600
characters in a session variables for submitting data to the database.
I'm trying to elimate partial records being inserted into the database
when a user quits in the middle of an entry. Is there a limit to the
size of what you can put in sessions and number of session you want to
limit on a server. Didn't know if you had a high volume site that if
you stored new records in sessions, how that would affect performance.
I thought about using cookies but not everyone has them enabled, I
guess I could check first. Any suggestions on this? Thanks

Mar 30 '06 #1
6 1939
On Thu, 30 Mar 2006 07:49:46 -0800, Barkster wrote:
I'm wanting to store about 6 fields one of which could have about 1600
characters in a session variables for submitting data to the database. I'm
trying to elimate partial records being inserted into the database when a
user quits in the middle of an entry. Is there a limit to the size of
what you can put in sessions and number of session you want to limit on a
server. Didn't know if you had a high volume site that if you stored new
records in sessions, how that would affect performance. I thought about
using cookies but not everyone has them enabled, I guess I could check
first. Any suggestions on this? Thanks


AFAIK there's no limit to either (by default) size of session or number of
sessions. They're stored in files, so I guess it could be limited by a
number of files in a folder or disk space, but that's it.

If you wanted you could register your own session handler that worked any
way you want.

Cheers,
Andy

--
Andy Jeffries MBCS CITP ZCE | gPHPEdit Lead Developer
http://www.gphpedit.org | PHP editor for Gnome 2
http://www.andyjeffries.co.uk | Personal site and photos

Mar 30 '06 #2
Good to know, I thought they were in the memory of the server. Could
you give me an example of building my own handler? Thanks

Mar 30 '06 #3
On Thu, 30 Mar 2006 08:45:35 -0800, Barkster wrote:
Good to know, I thought they were in the memory of the server. Could you
give me an example of building my own handler? Thanks


PHP MySQL Session Handler example:
http://www.daniweb.com/code/snippet43.html

http://uk2.php.net/session_set_save_handler

It's not too bad if you use auto_prepend to prepend a global file that
defines stuff like that (or you always include the same include at the top
of every file).

Cheers,
Andy
--
Andy Jeffries MBCS CITP ZCE | gPHPEdit Lead Developer
http://www.gphpedit.org | PHP editor for Gnome 2
http://www.andyjeffries.co.uk | Personal site and photos

Mar 30 '06 #4
Appreciate the info on that

Mar 30 '06 #5
FYI: Unless you pass around the session ID using GET, sessions store
the value in a cookie.

Mar 31 '06 #6
On Thu, 30 Mar 2006 19:16:58 -0800, Richard Levasseur wrote:
FYI: Unless you pass around the session ID using GET, sessions store the
value in a cookie.


That should read "sessions store the value (of the session ID) in a
cookie". They don't store the session values in a cookie.

Cheers,
Andy

--
Andy Jeffries MBCS CITP ZCE | gPHPEdit Lead Developer
http://www.gphpedit.org | PHP editor for Gnome 2
http://www.andyjeffries.co.uk | Personal site and photos

Mar 31 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Brad | last post by:
Hi everyone, I've been using ASP on a few different projects over the past year, either using Javascript or VBScript. During that time, I've made use of session variables, but even then, I've...
6
by: Perdit | last post by:
My 1st page calls a 2nd that uses same data from a database. What is the best way to get the data in the second: a new call to the database or passing array through session variable?? I seems...
6
by: Lina Manjarres | last post by:
Hello, I have a session variable in a login page. Then I go to a form page where I uses the ProfileID and the UserID. Then I go to a result page where I would like to use the UserID as a filter,...
4
by: Timothy V | last post by:
Hi, I was wondering how long the created session variables last for? To be more clear, when are they destroyed? Do I have to set the variables to null in Session_End()? Is the Session_End()...
31
by: Harry Simpson | last post by:
I've come from the old ASP camp where session variables were not used. When i started using ASP.NET in 2001, I started using them again because it was ok from what I'd read. I've been merrily...
13
by: Alexander Widera | last post by:
hi, who has seen the follow problem or could help please? i visit a page .... i read a sesssion-var . ... everythink works...... i visit the page again..... error ... the sessionvar is null .... i...
1
by: Larry Neylon | last post by:
Hi, I'm working on a VBScript application on IIS6 and I'm looking for some advice about the best way of replacing or improving session variable usage. The application is in a secure extranet...
2
by: Michaelk | last post by:
Can somebody tell me how many Session variables would be considered exessive, and when they start really affect the server speed. For example on 20-30 asp pages I need to use about 200-300 session...
18
by: BillE | last post by:
When a user opens a new IE browser window using File-New-Window the integrity of an application which relies on session state is COMPLETELY undermined. Anyone who overlooks the fact that...
26
by: BillE | last post by:
Some ASP.NET applications use Session Variables extensively to maintain state. These should be re-written to use viewstate, hidden fields, querystring, etc. instead. This is because if a user...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.