Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Admin Session timeout


csijp

Recommended Posts

I seem to have a problem with admin section when sitting idle session time out and i have to log bag in.. Is there a update to this where I can control this with the admin area and change the admin session time on the fly. Not through going to the code and putting it in manually.

Link to comment
Share on other sites

Would you mind sharing how you figured it out & (or) what you did to fix it? Someone else may post the same problem, and the answer will be posted already.

 

 

Kevin

"What I didn't know yesterday, I know today & will remember tomorrow"

(By Kwalker)

 

What do you see when you open up the tep_database-pr2.2-CVS.pdf file that came with your osCommerce download?

Link to comment
Share on other sites

Fix for session timeout in the Admin Area for osCommerce.

 

Session Lifetime is a SQL addin witch will allow the store

owner under the admin side only to control the length of

your session without loss of work due to interruptions

during data entry. This requires MYSQL access.

Complete instructions on how to install included screenshot image included.

 

 

 

 

You can go here to download first verion of

Admin Session Lifetime v1.1

 

I have tested this using version oscommerce-2.2ms2-051113

Link to comment
Share on other sites

The session time-out period is controlled by the php.ini file, when sessions are stored in the database. You can also control it via other methods, including .htaccess and direct intervention in the admin file set.

 

Alternatively, and much more easily, you can store sessions for Admin in a 'tmp' folder. It's only sessions which are stored in the database (mysql) which time-out (via the setting in php.ini), but sessions stored in files are not subject to the same expiry and have to be manually cleared.

 

Vger

Link to comment
Share on other sites

  • 3 months later...
  • 9 months later...

I had a problem with this not working.. figured out it was my servers default php settings themselves.

A lot of servers are set up with php in a way that you can override the settings defined in php.ini on the server. Some are not. If your server will allow you to do it. I found this helped my admin session time out problem.

And I Was able to still use the store config to set the timing on it.

 

I'm not a php guru so I put the ini_set command (the thing that changes php.ini settings) in both places that I thought would affect my store. these would be step 3A in this contributions instructions.

 

3A. Goto catalog/admin/includes/application top

 

find around line 104

 

//set the session cookie parameters

if (function_exists('session_set_cookie_params')) {

 

and insert just after that line

ini_set('session.gc_maxlifetime',SESSION_TIMEOUT_ADMIN + 900);

 

find a few lines later

}elseif (function_exists('ini_set')) {

and insert just after that line

ini_set('session.gc_maxlifetime',SESSION_TIMEOUT_ADMIN + 900);

Link to comment
Share on other sites

Vger posted a short time ago about the admin session timeout being controlled by php.ini.

It was also mentioned that if the admin sessions were stored in /tmp that it could be gotten around.

 

Can you explain how to have the admin sessions stored in files, but keep the shoppers session in mysql?

 

On one of my servers changing the admin/includes/functions/sessions.php value from 1440 to 14400 worked (my posting above this one).

 

But on the other two boxes that i have it didn't work at all.

 

I'm guessing the php config is diff. I tried to set the phpvalue gc__maxlifetime in the admin htaccess. but it appears that the regular store sessions clearing is also clearing or resetting that to the php.ini default. Thus with no traffic.. then the admin timeout is lengthened. But with traffic.. the admin is gettin the same tmieout as the regular shoppers. So, perhaps if I store the session files in different locations then when php does it's clean up... it won't clean up the admin sessions with the shopper sessions.

 

any ideas on how to have the store and admin work differently on how they store sessions?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...