CodeIgniter lost my session |
[eluser]Lokut Da[/eluser]
Hey! I have a problem with CI. CI sometimes lose my session and do not know why. I think, CI supports a maximum bytes of sessions. I guess... What do u think? Thanks in advance.
[eluser]InsiteFX[/eluser]
Use database sessions! Cookies 4kb, but some browsers have raised the limit. InsiteFX
[eluser]Lokut Da[/eluser]
Hey! thanks for ur answers ![]() Let me check the database sessions and will coment about that. Regards.
[eluser]WanWizard[/eluser]
[quote author="minhbu" date="1282826298"]pls try native session http://codeigniter.com/wiki/Native_session/[/quote] Why? What does this solve?
[eluser]Lokut Da[/eluser]
Hi again... I checked the database session and I continue with the same problem ![]() I writed the next code in my controller: Code: public function index() When I do update on my browser on index page, I can see the result: Code: Array But if I change to the page "procesar.php": Code: public function procesar() I can't see my session array ![]() What do u think? Regards.
[eluser]bretticus[/eluser]
Is "processar.php" a controller file? Or do you browse directly to that file?
[eluser]Lokut Da[/eluser]
Hi bretticus... My controller is "probando". Sorry, let me to post the complete code of my controller: Code: class Probando extends Controller
[eluser]tkyy[/eluser]
as the first response said you should use database sessions. the only reason not to use database sessions is the very, very slight overhead from the extra queries. being able to store virtually unlimited amounts of data into the secure database is surely a win over storing the encrypted values into a cookie with a set length. the first social networking site i coded did just that, stored a massive amount of data into the cookie. my users table got so large that i eventually had to pick and choose which values i needed to store in the database because it wasn't creating the sessions properly since it made the cookie explode. eeeeek, avoid the mistakes i made please. |
Welcome Guest, Not a member yet? Register Sign In |