I am facing a bizarre problem. When i open my website in iphone safari browser and then minimize it and leave it for sometime and then again open safari and try to navigate to some other page in the site it shows error. The error comes because i try to access values from session. The first time the user opens my site i start the session and save the site specific color values in it. Each time the next page is requested i fetch the values from session and replace in the inline css. The issue seems to be with the session. Once i get the error i cannot use the site. Even after refreshing the page the first page works but the error on navigating to other pages still exists. To get rid of this i need to clear the cache and refresh the page. Clearing the cache is a temporary workaround and the end users don't expect this behavior. Help me please i got stuck in this issue for a month. I want to add that i have set session.gc_maxlifetime
to 12 hours , session.cookie_lifetime
to 0.
Asked
Active
Viewed 206 times
-1

Azharuddin Laskar
- 12
- 2
1 Answers
0
It seems your problem is caused by referencing $_SESSION variables when there is no active session. Please read this post, as it proposes a solution to session timeouts while still considering server load.
-
I have configured the server to maintain the session for 12hrs and clear the session only if the user closes his browser. If suppose by some other reason the session got cleared then why do i need to clear the browser cache even after creating a new session? For more information i have nginx server as a reverse proxy. – Azharuddin Laskar Mar 25 '15 at 09:14
-
It's difficult to say without knowing more about your site. Are you using a CMS, any plugins, scripts of any kind? A link to the site and some code examples would be very helpful. – Longblog Mar 25 '15 at 14:48
-
I am using zend framework 1.11 and i cannot share the site as its in testing phase and not released for public usage. – Azharuddin Laskar Mar 25 '15 at 16:10