Solved

Codeigniter session expire problem

Posted on 2012-03-27
7
1,068 Views
Last Modified: 2012-03-30
I am developing an upload module to upload large files around 20 to 25 MB
I am using uploadprogress.so for showing progressbar.
Everything goes fine till 43% and then jumps to the login page.
It seems session expires. I am using CI session library.

I tried all written in many forums like
$sess_expiration_time=0

but nothing works.

Pls help.
0
Comment
Question by:codeoxygen
  • 4
  • 3
7 Comments
 
LVL 108

Expert Comment

by:Ray Paseur
ID: 37776408
Does this only happen when you do not use a progress bar?  I am wondering if maybe there is a way to repeatedly extend the session expiration time as blocks of data are uploaded?

Does it always fail at 43%?  What is the elapsed time to get to 43%?

Does it happen if you do the uploads outside of CodeIgniter?
0
 

Author Comment

by:codeoxygen
ID: 37776528
I am not sure about these questions, I need it working on the current system.
It is failing at 43% in my machine.
0
 
LVL 108

Expert Comment

by:Ray Paseur
ID: 37776541
Is 43% a consistent failure?  What is the elapsed time to get to 43%?
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 

Author Comment

by:codeoxygen
ID: 37776666
43% happens in around 10 min. that may depend on internet speed also i guess
0
 
LVL 108

Accepted Solution

by:
Ray Paseur earned 500 total points
ID: 37776706
Actually I think the internet speed is not relevant.  I was looking for the time to failure.  Ten minutes is 600 seconds, so you may be able to find the string "600" somewhere in an INI file or in one of the scripts.  That's what I would be looking for.

The default session timeout in PHP is 1440 seconds (24 minutes).  This means that any session data still lying around after 24 minutes of inactivity is eligible for garbage collection.  The garbage collector is not started until a script on the server (any script) executes session_start().  Apparently CodeIgniter has its own ideas about garbage collection!
0
 

Author Comment

by:codeoxygen
ID: 37781456
Gr8 Ray. Thanks,
I had changed all settingsin php.ini but left the max_execution_time and it was 600 :)
Its working now.
0
 
LVL 108

Expert Comment

by:Ray Paseur
ID: 37781484
Love it when a plan comes together!
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This article will explain how to display the first page of your Microsoft Word documents (e.g. .doc, .docx, etc...) as images in a web page programatically. I have scoured the web on a way to do this unsuccessfully. The goal is to produce something …
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to dynamically set the form action using jQuery.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now