Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Codeigniter session expire problem

Posted on 2012-03-27
7
Medium Priority
?
1,318 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 111

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 111

Expert Comment

by:Ray Paseur
ID: 37776541
Is 43% a consistent failure?  What is the elapsed time to get to 43%?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

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

Accepted Solution

by:
Ray Paseur earned 2000 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 111

Expert Comment

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

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to count occurrences of each item in an array.
Suggested Courses

916 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