Welcome Guest, Not a member yet? Register   Sign In
Create a new session whenever internet connection breaks at client end
#1

[eluser]Unknown[/eluser]
Hello Experts,

We have developed a small application for conducting online exams. We are using CodeIgniters session handling capabilities to manage examinee's session and it works perfectly fine if the internet connection doesn't break during the examination. However in India in certain cities the internet connectivity is not that reliable and the internet connection breaks during the exams. At this time although the application stores the exam's state, we would like to have the user session to expire as soon as there is any loss in internet connectivity.

With codeigniters session handling it compares the session information in client cookie with the one in database and if they match it allows the user to continue in the same session.

Is there a way by which we can create a new session as soon as there is break in internet connection, similar to what we have for banking applications? I'm a novice as far as php & codeigniter is considered, so please pardon if I ask some very basic questions.

Thanks!

Regards,
Rahul Bhalerao
#2

[eluser]Tpojka[/eluser]
In application/config/config.php near line 249 try to set:
Code:
$config['sess_expire_on_close'] = TRUE;
#3

[eluser]Unknown[/eluser]
Hello Tpojka,

Thanks for the prompt response. I tried your suggestion but its not working.

I suppose its a problem with my CI version, it's 1.7.1. The CI documentation also mentions this config setting, but its for the later version 2.1.2. I will go check if changing the version helps, but do you think it could be a CI version issue?

Regards,
Rahul Bhalerao
#4

[eluser]Tpojka[/eluser]
If you have
Code:
$config['sess_expire_on_close']
config rule, it is meant to do thing you need.
I am with CI since version 2.1.0. so I don't have experience with previous version.
Maybe you could check what is needed for version upgrading.
It is my suggestion at all.
#5

[eluser]InsiteFX[/eluser]
Read this may help you:

Connection Handling




Theme © iAndrew 2016 - Forum software by © MyBB