Post by vpaul » Mon Mar 30, 2015 12:26 am

Hello,

Installed fresh version of opencart 2.1 version. changed my design etc and time from time was getting this error.
At the time it was annoying but did not bother me a lot.
Now the time to upload my products. From admin panel I am inserting all information needed, adding the picture, however once clicking SAVE it logs me out automatically, redirects to admin log in page and gives an error: Invalid token session. Please login again.
Now it is annoying, as I literally cannot add any products as it ALWAYS logs me out. Tried clearing cookies etc, changing user login details, adding new user and so on.
Any suggestions on how to sort this out?
Thanks.

Newbie

Posts

Joined
Mon Mar 30, 2015 12:22 am

Post by turnerautosport » Tue May 12, 2015 12:29 am

I have this same problem!

It's infuriating!!

My problem started when I tried to switch my e-commerce site to a new host (iPage). I installed Opencart 1.5.6 onto the new server and copied over the database and the backed-up store. Nothing I did could get it to work, not even the online help advisors could assist. It should have been straight forward with FTP - none of the files or the file structure changed...

I finally threw in the towel and installed Opencart 2.0 on the server and have had to completely re-do my store, from scratch. I could live with this frustration because I wanted to change the look of the store anyway.

However, whilst I'm trying to update categories, products, in fact anything, I keep getting an 'invalid token session' error! It seems to appear randomly, but frequently, meaning it's taking 10 times longer to create the store than with the 1.5.6 version of the software.

Can anyone help?


Posts

Joined
Wed Jan 15, 2014 6:56 am

Post by roylepython » Tue Sep 08, 2015 7:11 pm

I have this exact issue. As the developer working on this site its infuriating every time hitting save icon or refresh icon getting bounced back to the login screen. I have googled high and low for a fix for the issue.

Making it worse I am the server host, We have this running on a dedi in a mainstream DC in the UK running cpanel 11 so I know full well its not the server causing the issue.

I would be greatfull if any one knows a fix for this!

New member

Posts

Joined
Wed Sep 18, 2013 5:18 am

Post by dolrichfortich » Tue Sep 08, 2015 7:45 pm

Try the fix on this link.
http://stackoverflow.com/questions/8311 ... out-in-php

This part.

Code: Select all

// server should keep session data for AT LEAST 1 hour
ini_set('session.gc_maxlifetime', 3600);

// each client should remember their session id for EXACTLY 1 hour
session_set_cookie_params(3600);
You can add it on system/library/session.php
Add it after this code
ini_set('session.cookie_httponly', 'On');

Opencart Options Pro, Reward Points For Review, DISQUS Comment Form,
Dolrich Fortich - Freelance web developer

Image


User avatar
New member

Posts

Joined
Thu Aug 05, 2010 8:09 pm
Location - Philippines

Post by roylepython » Thu Sep 10, 2015 8:11 pm

Tried this fix still getting logged out on every save. this can be product, settings worse still the error log shows nothing, Server logs only showing no default file in the image directory so this is completly unrelated
[Thu Sep 10 13:02:46.991233 2015] [autoindex:error] [pid 169891] [client **.**.**.**] AH01276: Cannot serve directory public_html/image/: No matching DirectoryIndex (index.html.var,index.htm,index.html,index.shtml,index.xhtml,index.wml,index.perl,index.pl,index.plx,index.ppl,index.cgi,index.jsp,index.js,index.jp,index.php4,index.php3,index.php,index.phtml,default.htm,default.html,home.htm,index.php5,Default.html,Default.htm,home.html) found, and server-generated directory index forbidden by Options directive
Session.php now reads

Code: Select all

	public function __construct() {
		if (!session_id()) {
			ini_set('session.use_only_cookies', 'On');
			ini_set('session.use_trans_sid', 'Off');
			ini_set('session.cookie_httponly', 'On');
			// server should keep session data for AT LEAST 1 hour
			ini_set('session.gc_maxlifetime', 3600);
			
			// each client should remember their session id for EXACTLY 1 hour
			session_set_cookie_params(3600);

			session_set_cookie_params(0, '/');
			session_start();
		}
Completly at a loss for how to stop getting logged out every time i save any thing, any help would be much appreciated! using Journal2 front end theme how ever i wouldn't assume that would cause admin session bugs

New member

Posts

Joined
Wed Sep 18, 2013 5:18 am

Post by roylepython » Sat Sep 12, 2015 9:55 pm

BUMP please help with this. with 21k of sales its not like i can re install this site

New member

Posts

Joined
Wed Sep 18, 2013 5:18 am

Post by roylepython » Thu Sep 17, 2015 6:21 am

boink still needing help!

New member

Posts

Joined
Wed Sep 18, 2013 5:18 am

Post by roylepython » Fri Sep 25, 2015 3:52 am

still needing help

New member

Posts

Joined
Wed Sep 18, 2013 5:18 am

Post by motion2082 » Fri Sep 25, 2015 11:02 am


Active Member

Posts

Joined
Tue May 12, 2015 8:48 pm
Who is online

Users browsing this forum: No registered users and 142 guests