Welcome Guest, Not a member yet? Register   Sign In
Session: Creates new session on every page refresh
#1
Question 

When i refresh the page, it creates new session into the folder (or even in database it creates a new row with new id. i tried using sessions with database also. nothing's changed.). What should i do?

I am using PHP 7.1.2 and IIS 7 on Windows Server 2008 R2. Also, for CodeIgniter my version is 3.1.
Reply
#2

Hi

You wrote any insert function in on page load, Then only a single row was inserted into table and a new session possible to create.
Smile
Gowtham Karna,
Software Developer,
MobĀ  : +91 -8056606341.
Reply
#3

Sorry, maybe my question was wrong. My actual problem is when a user tries to log in, setted userdata disappears.
Reply
#4

(This post was last modified: 03-16-2017, 03:43 AM by arma7x.)

You can do simple counter. For testing, store the increment/decrement integer value in session and retrieve it back in next page reload. If the value does not change, maybe the browser reject cookies from your web app. I'm pretty sure the problems is new session being created on every page reload. Try disable session regenerate to false or using different web browser...
KeepĀ calm.
Reply
#5

First of all, thanks for your helps. I solved the problem.

As i said before; I am using PHP 7.1.2 and IIS 7 on Windows Server 2008 R2. Also, for CodeIgniter my version is 3.1.

I updated the CI with latest version and problem has solved. If someone gets same problem, it might be about PHP and CI version conflict. I realized that there are some changes in new PHP version in that subject.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB