I need to realize such an effect. if one user has login, the session
will keep until he logout.
but if i change the set of session.gc_maxl ifetime it will take too much
system resource.
i plan to create a session and insert session_id, session_data into
database
and create the cookie set the lifetime = 9999999999
then when the user visit the site again, i read the cookie first to
sure has he logined
and match the data with the database.
i don't know the plan will affective or not.
ps. i don't know if i change the value of session.cookie_ lifetime,
which will change the default cookie lifetime in the cookies. 2 1545
Gucci wrote:
I need to realize such an effect. if one user has login, the session
will keep until he logout.
but if i change the set of session.gc_maxl ifetime it will take too much
system resource.
Does it really?
'Inactive' sessions only take up a few bytes in a file in a tempdirectory,
unless you store huge amounts of data in your sessions.
Storing huge amounts of data in a session is bad, so don't. :P
Did you actually measure a system/performance degradation with higher
gc_maxlifetime?
>
i plan to create a session and insert session_id, session_data into
database
and create the cookie set the lifetime = 9999999999
then when the user visit the site again, i read the cookie first to
sure has he logined
and match the data with the database.
Yes, that is the way to go if your want to use 'user' sessionmanageme nt
instead of 'file' which is PHP default system to store sessions.
Check out www.php.net and look up sessions.
You will find links to user-defined sessionstorage.
You will also find a usefull link to the ZEND website that contains an
example of how to achieve this with a database.
Regards,
Erwin Moller
>
i don't know the plan will affective or not.
ps. i don't know if i change the value of session.cookie_ lifetime,
which will change the default cookie lifetime in the cookies.
thank you Erwin, and i'm glad to say i haven't actually set
gc_maxlifetime in a huge numer, but i really need to store a lot of
data in session. lucky, you gave me a clear guide and thank you again.
regards,
Gucci Koo This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: PJ |
last post by:
I posted a few days ago concerning requests being blocked from a main window
after a popup window had initiated a file download. Apparently this has to
do with the fact that asp.net or iis serialize all requests from the same
session. Further requests from the same session are being queued until the
download is complete. So, is there any way to override this? Is there
anyway to tell asp.net to not serialize same session requests? Is...
|
by: Simon |
last post by:
Hello,
Please sorry my poor English.
I have 3 aspx webforms. Each page has 2 hyperlinks objets to go
on the other pages. In all the webforms, there are textbox, ddlists,
button and a datagrid. I want the data in each webpage to be saved and
not losed while i'm surfing between those pages(like tab navigation).
Presently, I use session variable and query post to keep the data.
Example :
|
by: Vishal |
last post by:
Hello,
can anybody tell me how I can extend the session
expiry time? Is it done via code or via IIS? Sorry I am
new and dont know about this.
|
by: ari |
last post by:
hey all,
i'm trying to make my app as stateless as possible. is it ok to create a
dataset and store in viewstate and whenever the user decides to select a from
that dataset, to move from viewstate, to session, and on the details page
back to viewstate. Or does that sound like too much work?
thanks,
ari
|
by: Jonathan Duke |
last post by:
I have written a custom session state provider that stores session data in
XML in a SQL database , and I was running the SQL profiler to
verify that all of my stored procedures were called in the correct
situations. Each time I visited certain pages, I noticed that the SP called
by the ResetItemTimeout method was called multiple times in a row.
I have tracked this problem down to the point of the WebResource.axd module.
It appears that...
| |
by: Abi |
last post by:
We able to generate this error in our test environment and were able to
research this enough to understand that the issue is NOT with an abject that
needs to be serialized but rather as the stack trace suggests that the
server (in the web farm) ran out of memory while attempting to stream data
to an ASP Session State database (SQL Server 2000) .
Our test environment consists of:
- 3 web servers Load Balanced
- SQL Server 2000 Database...
|
by: J055 |
last post by:
Hi
I have the following code. I upload an XML file using the FileUpload object,
store the stream in a session so the user gets the chance to confirm some
options then pass the stream from the Session to an XmlReader.
if (performImport == false)
{
Session = fileUpload1.FileContent;
//... some other code
|
by: eric |
last post by:
I have a 2.0 asp.net project. In a class contained within a seperate
project, I am trying to reference HttpContext.Current.Session but Session is
always null. I've tried implementing IRequiresSessionState but it does not
seem to matter.
For a test I created a small solution consisting of a web project and a
seperate project to hold a test class. In the test class I reference
HttpContext.Current.Session and it works fine with or without...
|
by: itsmesrini85 |
last post by:
Hi,
I'm trying to get session in the web service implementation class. But I'm webservicecontext is coming as null.. The class and the configuration is as below. How can i get the session or session cookie? It will be great if anyone can provide some help or some example.
*******class*********
@Path("/userservice/")
@ProduceMime("application/xml")
public class CartServiceImpl
implements CartService
{
...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
| |
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |