Solved

Codeigniter session expire problem

Posted on 2012-03-27
7
1,085 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 109

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 109

Expert Comment

by:Ray Paseur
ID: 37776541
Is 43% a consistent failure?  What is the elapsed time to get to 43%?
0
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 

Author Comment

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

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 109

Expert Comment

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

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

810 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