Solved

Codeigniter session expire problem

Posted on 2012-03-27
7
1,074 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
PHP/Magento not logging 2 35
Select from sql by results from textbox 8 26
How to use md5 hashing 3 26
Intermittent Error on Page Loading 4 13
Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

912 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

19 Experts available now in Live!

Get 1:1 Help Now