Welcome Guest, Not a member yet? Register   Sign In
Problem with Sessions
#1

[eluser]Unknown[/eluser]
i have experimenting random errors using session helper in CI

i have no damn idea what it's happening
Code:
ERROR - 2013-04-25 09:43:08 --> Severity: Warning  --> odbc_exec(): SQL error: [Microsoft][SQL Server Native Client 10.0][SQL Server]Cannot insert duplicate key row in object 'dbo.Sesion' with unique index 'last_activity_idx'., SQL state 23000 in SQLExecDirect C:\...\system\database\drivers\odbc\odbc_driver.php 153
ERROR - 2013-04-25 09:43:08 --> Query error: [Microsoft][SQL Server Native Client 10.0][SQL Server]Cannot insert duplicate key row in object 'dbo.Sesion' with unique index 'last_activity_idx'.

this makes users to get errors randomly and needing to login again to application.
i don't have a use case to reproducing this behavior because i didn't identify a pattern in this errors.


#2

[eluser]TheFuzzy0ne[/eluser]
Welcome to the CodeIgniter forums!

First of all, Session appears to be spelt incorrectly. Other than that, the error is because you have a unique key constraint on your 'last_activity' column. That shouldn't need an index on their at all, so if you remove it, I think your problem will be solved.

Hope this helps.




Theme © iAndrew 2016 - Forum software by © MyBB