• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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
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


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2017 MyBB Group.