Solved

Codeigniter session expire problem

Posted on 2012-03-27
7
1,137 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 110

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 110

Expert Comment

by:Ray Paseur
ID: 37776541
Is 43% a consistent failure?  What is the elapsed time to get to 43%?
0
MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

 

Author Comment

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

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 110

Expert Comment

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

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
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…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

734 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