Post by gmoussa73 » Fri Oct 01, 2010 2:52 am

i need some help, i installed the latest opencart version v1.4.9.1 problem is ..admin timeout is so rediculously short! my host is ipage they said:
On our platform, the maximum session time out limit is set to 60 sec. Unfortunately, it is not possible to increase this limit.
that is so not practical...i have been working on some parts for 10 and 15 minutes..then boom! logged out and all the work is lost....there should be some solution around this...i have zero knowledge of programming and php things....i just search the forum for answers of my questions and follow what the ppl instruct to do......can anyone help plz? at least if there is any solution to re-log into the same page i was working on to continue working and NOT loose all the efforts spent on it?
opencart is a very good shopping cart...i had scored some progression towards publishing my shop and start operating...we sell books...we need to spend time filling info and reviews....not fare to be kicked out and loose the work!!
Last edited by i2Paq on Wed Oct 13, 2010 11:28 pm, edited 2 times in total.
Reason: Title adjusted

New member

Posts

Joined
Fri Oct 01, 2010 2:39 am

Post by JAY6390 » Fri Oct 01, 2010 8:18 am

It's possible to set a timeout in javascript that would run an AJAX call to your admin area say every 30 seconds. This would mean every 30 seconds you would keep the session alive. The best advice however that I can give you is move hosts if they have such a ridiculous time limit. Also, you have to remember that you will need to also do this on the front end, otherwise your customer orders will disappear after 60 seconds of inactivity!

ImageImageImage

SEO MEGA KIT PLUS - Get your site ranking higher in the search engines
Better Product SEO URL's - Perfectly structured product links
SEO URL's Route Editor PRO - Make ANY url on your site have clean keywords - even third party extensions (remove index.php)


Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by gmoussa73 » Sat Oct 02, 2010 6:27 am

maaaaan thats so stupid...very annoying ,i cannot complete work on the shop this way???? there should be a way around it....can you explain your suggested way please? how can i do it??

New member

Posts

Joined
Fri Oct 01, 2010 2:39 am

Post by gmoussa73 » Sun Oct 03, 2010 6:39 am

dear jay...how to do this javascript thing? i want to try......

New member

Posts

Joined
Fri Oct 01, 2010 2:39 am

Post by i2Paq » Wed Oct 13, 2010 11:29 pm

Ask you host, it is their system that causes this.

If they cannot solve it for you: CHANGE HOST.

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

UPGRADE to 2.x: Contemplate before thou begins!

Our FREE search: Find your answer FAST!.

BUGs?: Known BUGS for All OC Versions.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by justinv » Sat Jul 30, 2011 11:59 am

I used this with success:

Code: Select all

<script type="text/javascript">
function pingServer() {
    $.ajax({ url: location.href });
}
$(document).ready(function() {
    setInterval('pingServer()', 20000);
});
</script>
Put it in admin/view/template/common/header.tpl, right before the closing head tag:

Code: Select all

</head>
It calls the page you're on and discards the result every 20000 milliseconds. Change the 20000 to whatever you need - every 60000 should be enough for even the worst web host (once a minute).

Documentation: OpenCart User Guide
Mods: Total Import PRO | CSV Import PRO | Ecom Tracking | Any Feed | Autosuggest | OpenCart CDN
Image


Active Member

Posts

Joined
Tue Oct 12, 2010 1:24 pm

Post by shiokguy » Tue Aug 30, 2011 7:52 pm

I am using V1.5.1.1 with default Template

I would like my Admin to auto logout after said 30 min of inactivity. How can I do that?
My admin is logon forever, and I like it to logout automatically

Regards
ShiokGuy

New member

Posts

Joined
Wed Jul 13, 2011 3:28 pm

Post by obd1965 » Tue Sep 20, 2011 11:12 pm

I'm looking for the same in 1.4.8

Newbie

Posts

Joined
Tue Sep 20, 2011 11:11 pm

Post by DrunkMunki » Tue Oct 11, 2011 4:30 pm

where exactly on the server side do we change this?
is it in the php.ini file ? whats the variable?

Newbie

Posts

Joined
Sun Jul 17, 2011 6:02 pm

Post by ruslyrossi » Tue Dec 06, 2011 11:59 am

thanks @justinv..its work for me...simple

User avatar
New member

Posts

Joined
Mon Feb 28, 2011 12:28 pm

Post by nzplayer » Mon May 14, 2012 2:13 pm

justinv wrote:I used this with success:

Code: Select all

<script type="text/javascript">
function pingServer() {
    $.ajax({ url: location.href });
}
$(document).ready(function() {
    setInterval('pingServer()', 20000);
});
</script>
Put it in admin/view/template/common/header.tpl, right before the closing head tag:

Code: Select all

</head>
It calls the page you're on and discards the result every 20000 milliseconds. Change the 20000 to whatever you need - every 60000 should be enough for even the worst web host (once a minute).
I have written a VQmod with your code above in it (Thanks I needed it as well).

http://www.web.nzplayer.com/index.php?r ... uct_id=100

Newbie

Posts

Joined
Fri May 11, 2012 5:33 am

Post by mrspeakers » Thu May 17, 2012 3:00 pm

I can't actually get into the header (or footer) to edit using ipage as a host. They say it's an opencart problem, but it is obviously an issue with their ftp filemanager. Anyone know any solutions?

Newbie

Posts

Joined
Thu May 17, 2012 2:25 pm

Active Member

Posts

Joined
Tue Oct 12, 2010 1:24 pm

Post by Ampeter » Thu Feb 06, 2014 2:48 am

justinv wrote:I made a vqmod for this: http://www.opencart.com/index.php?route ... on_id=7741.
I just checked your vqmod. Why did you use location.url instead of location.href? (I think location.url does not exist, at least in javascript). ???

User avatar
New member

Posts

Joined
Thu Jan 13, 2011 5:01 pm

Post by BionicBill » Sun Jun 18, 2017 1:43 am

I too was having this admin timeout issue and spent 2hours with my hosting provider that was looking around the web and found this tidbit
Just add this to you admin php.ini file: This set the cookie timeout to as long as the browser is open! and looks to have fixed my timeout issue,
You might also add it to your main php.ini file.

session.cookie_lifetime = 0;

New member

Posts

Joined
Tue Dec 04, 2012 4:08 am
Who is online

Users browsing this forum: No registered users and 16 guests