Questions tagged [session]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
54 views

How to make a curl request with a session to an action url?

I am building a onepagecheckout for craft commerce 3. I created a custom controller to submit cart and payment info in one form submit. I'll call the default updateCart action with a curl request and ...
user avatar
0 votes
1 answer
25 views

500 Internal erroron admin - session related

I am working on trying to get a local copy of a site working, but ran into an issue where the front end is working, but the admin page is not responding when I try to login. This site is Craft 3.7.44 ...
user avatar
1 vote
1 answer
27 views

Session Component - Redis

When you configure the session component, I see as session used, pointing to the SessionBehaviour class but what does this do or what does it mean? 'session' => [ 'class' => yii\redis\...
user avatar
1 vote
1 answer
57 views

Set Session variable inside php controller

I'm from custom php world but It looks like I can't just set a session variable in plain php. I'm playing around use craft\web\Session; ... $session = new Session(); $session->open(); $session->...
user avatar
0 votes
0 answers
46 views

Multiple (dev) sites running locally; session seemingly randomly times out

I've got multiple sites running on XAMPP (I'm on Windows 10). Each has its own domain (eg. dev.example.local, dev.otherexample.local, etc). When I try to have more than one site CP page open in the ...
user avatar
  • 616
1 vote
0 answers
255 views

Craft 3 memcached session storage in load balanced environment

I'm getting the good old session expired popup every minute in the admin panel which is odd given that memcached should be properly configured: php.ini session.auto_start = 0 session.save_handler=...
user avatar
1 vote
1 answer
211 views

Can I manage/change the default flash message text?

I am looking to customise the default flash message text for certain behaviours but cannot seem to find any reference to them in the code or control panel - does this exist anywhere? And could it be ...
user avatar
  • 438
3 votes
1 answer
423 views

How can I debug `craft\web\User::_validateUserAgentAndIp()` warnings

On a production site, we're seeing a ton of the following warning in our web.log files for (seemingly) every request, creating a ton of noise in the logs and making it hard to spot "real" issues: &...
user avatar
1 vote
1 answer
152 views

Craft 2 Commerce 1 cart session expiry

Is it possible to change the cookie timeout just for the cart? E.g. I'd like to clear abandoned carts after X hours and keep all the other sessions untouched (e.g. user sessions etc). Please advise ...
user avatar
  • 631
0 votes
0 answers
64 views

Craft 3 Session Ended modal popping up on local machine

Using MAMP Pro 5.1 Apache, self-signed SSL cert PHP 7.2.8 module mode OPcache enabcled Extensions: Xdebug, Imagick/ImageMagick Craft 3.1.22 Basically I'm having the same problem as tons of other ...
user avatar
2 votes
3 answers
1k views

How can I store Craft sessions in the database?

Is it possible to configure Craft 3 to store session data in the database? On some other CMS's this can be enabled. The reason I'm exploring this is because we're having an issue whereby PHP sessions ...
user avatar
1 vote
1 answer
69 views

Craft 2.6 Session Issues

We are having issues staying logged in to Craft (2.6). There was a plugin error which is what we thought was causing the issues, so we removed the sprout SEO plugin. However the error still persists. ...
user avatar
  • 11
1 vote
1 answer
79 views

Craft redirects to domain.tld/domain.tld/ on logout

I have a logout button on my site that points to the logoutUrl. While the logout works and ends the user session, the user is brought to a page with the URL similar to domain.tld/domain.tld/ where ...
user avatar
  • 163
3 votes
0 answers
107 views

Can you make Craft 2 Stateless?

So we are moving to Google App Engine Flexible which means we cannot store sessions on files. So I wanted to know if anyone has been able to make Craft 2 Stateless and how was it accomplished? Thanks....
user avatar
3 votes
1 answer
54 views

Generating thumbnails when using a memcache server for session storage frequently signs users out

I can't figure out why, but when I'm connected to a memcache server the thumbnail generation process in Assets hangs for long periods of time, the getElements process throws 403 errors, the generating ...
user avatar
2 votes
1 answer
485 views

Is it possible to change the amount of time a user stays logged in for?

Our users are getting logged out after 1 day. Is there a setting that changes how long users’ sessions will last?
user avatar
2 votes
1 answer
1k views

Craft CMS 3 - Redis Sessions cause error

I've configured Redis to handle cache and sessions for Craft 3, and while cache configuration is working as expected, I had to disable session configuration due to the below error. It fails on the ...
user avatar
1 vote
1 answer
115 views

Craft 2 CP session expires unexpectedly, requires repeated login

Environment Craft: 2.6.3013 (Personal) MAMP Pro: 4.4.1 PHP: 7.0.12 (CGI Mode) Behavior After logging into the CP, and following a relatively short period of time, the session expires unexpectedly and ...
user avatar
  • 137
1 vote
1 answer
1k views

Is it safe to remove the craft/storage/runtime/sessions folder?

I'm unable to transfer a site over to my development server because I keep getting problems with disk space. Space is actually fine, it's the number of inodes being used up. Using cPanel I get an ...
user avatar
1 vote
4 answers
441 views

Migrated site - now dashboard keeps logging out

I've migrated my client's Craft site to a new host. On the front end the site is fine and working as it should. The problem is with the Craft admin area. I can login, but once logged I can’t access ...
user avatar
  • 21
1 vote
2 answers
182 views

Craft login problem with memcache and ubuntu?

session_regenerate_id(): Session object destruction failed is the error i'm receiving after attempting to log in. I just updated to Ubuntu 16.04LTS using PHP7 and php-memcached. Is there a fix for ...
user avatar
  • 293
1 vote
2 answers
526 views

Control Panel Session 60 second Timeout

I’m on Craft v. 2.6.2983 and am encountering the well flagged issue of the control panel logging me out after 60 seconds. I've tried most of the solutions posted here and have had no success in ...
user avatar
  • 21
1 vote
1 answer
208 views

Craft cacheMethod setting is being overridden

I am trying to setup Craft to use a memcached (yes it is memcached, not memcache) cluster in AWS ElastiCache to handle sessions. I originally went the route of updating my php.ini file in Apache2 to ...
user avatar
  • 25
1 vote
2 answers
353 views

Session destroy due to inactivity?

It seems that after x amount of time (somewhere between 30-60 mins?) of inactivity on a page the session is being destroyed/cleared/etc. I will sit on a page with an active session for an hour and ...
user avatar
  • 293
1 vote
0 answers
118 views

Problems while setting up a cross region Craft website in AWS

In order to create a cross region setup for my craft website, I've created a read-only replica of my RDS DB from North Virginia region to Canada Central region. I'm facing the internal server error ...
user avatar
1 vote
1 answer
165 views

With two EC2 Craft instances, the Control Panel session keeps expiring

Things were fine (no session logout for admin from CP) when there was only one EC2 instance for our website. I created a replica of the existing EC2 instance and now when I go to Control Panel, ...
user avatar
2 votes
2 answers
907 views

"Your session has ended" modal popping up constantly

I know many other folks have posted this question over the years, but unfortunately none of the answers given so far are fixing this for me. The problem: after logging-in on my staging server (this ...
user avatar
1 vote
1 answer
952 views

Redirect issue with login and paths

I'm gonna probably find another way around this, but I'm still very new to Craft and want to ask if I'm missing something obvious. This is a commerce site that needs a front-end login. I have an ...
user avatar
  • 305
4 votes
1 answer
465 views

How can I disable sessions for most of my Craft site?

We're running a craftcms-backed site that uses sessions only for the admin pages. For a few reasons, we'd like to disable session logic for all other urls: the Set-Cookie header that craft uses to ...
user avatar
2 votes
1 answer
716 views

Craft with Redis session handling

We've recently set up a Redis cluster to handle our PHP sessions since we use a load balancer to direct traffic into different craft instances. We're seeing issues with redis when making back to back ...
user avatar
  • 293
1 vote
1 answer
778 views

Session cookies

I'm in the process of adding a second site to a Craft installation using custom locales. The two sites will be accessed on different sub-domains, e.g. site1.domain.com and site2.domain.com. I need to ...
user avatar
3 votes
1 answer
300 views

Keep on getting logged out when deploying using Capistano

I keep on getting logged out whenever I deploy using Capistrano, despite the sessions being stored persistently (in the craft/storage folder).
user avatar
1 vote
1 answer
588 views

Getting error "Your session has ended. Enter your password to log back in." every 30 seconds or so

This is happening for all users and only on production environment. "Your session has ended. Enter your password to log back in." Entering your password does not allow you to actually see the admin ...
user avatar
1 vote
1 answer
184 views

conditional does not run first in a file that is included using the extends feature for twig

I have this conditional included in a layout file I use within others, using the extends feature in twig. This is at the very top of _layouts/application.twig {% if not currentUser %} {% ...
user avatar
  • 487
1 vote
1 answer
395 views

Implementing SimpleSAML PHP in Craft plugin

We have been trying to implement SimpleSAML PHP in a Craft plugin to facilitate a SAML login for one of our sites. The problem we are running into is that we always get the NOSTATE error. The ...
user avatar
1 vote
1 answer
281 views

How do I preserve user sessions across subdomains?

I have defaultCookieDomain set to .site.com I am logged into www.site.com I expected to also be logged into sub.site.com (which is pointing to the same web root), but I'm not. What am I missing?
user avatar
  • 3,061
3 votes
1 answer
1k views

Using PHP Redis as Session Store

I'm trying to use php-redis as the session store to my craftcms site. What I've tried: apt-get install php5-redis Edited php.ini with the following: session.save_handler = redis session.save_path = "...
user avatar
1 vote
2 answers
8k views

Session related question - opening browser with multiple tabs

We are having a situation wherein the users are trying to open URLs in the same browser with multiple tabs, while doing that the session variables which store unique identifiers are overwritten. Is ...
user avatar
1 vote
0 answers
193 views

Plugin event listener not firing

In my plugin I have an init() method: public function init () { parent::init(); require CRAFT_PLUGINS_PATH.'/myplugin/vendor/autoload.php'; $this->callTemplateHooks(); craft()-&...
user avatar
  • 1,503
1 vote
1 answer
180 views

Craft/Yii not garbage collecting session?

I want to store a session value and have that cleared after a set timeout. I’ve got PHP's session.gc_maxlifetime set at 60 seconds for development and am using Craft’s HttpSessionService to set a ...
user avatar
  • 1,503
1 vote
1 answer
435 views

Strange issue with logging out user on frontend

We have a strange issue with a site we are developing. We have a user login on the front-end of the site which takes users to their profile pages. The issue we have is that on a Mac the user is being ...
user avatar
  • 2,023
1 vote
2 answers
221 views

How can I disable/decrease the number of calls to getAuthTimeout?

The host of a client is claiming the call to getAuthTimeout is triggering their firewall, and in turn blocks my client from accessing their site for a longer duration. Is there a way to disable or ...
user avatar
  • 2,957
0 votes
0 answers
254 views

Property "Craft\SessionRecord.token" is not defined

I'm trying to log in to the admin area of an local install but all that happens is the page refreshes and nothing happens. Digging deeper I found this in the log: 2016/03/09 09:16:38 [error] [...
user avatar
  • 4,519
0 votes
1 answer
483 views

Forcing destruction of httpSession variables on logout

I would like to store some data in the user's session specifically for when they're logged in. When logged out, I would like the session to destruct. Trawling through the code, it seems that session ...
user avatar
  • 173
2 votes
2 answers
1k views

Using the CP login session expiration for the frontend

I love the session handling on the backend CP. The prompts that come up on session expiration after setting 'userSessionDuration' => 'PT5M', in config/general.php are exactly what I want to use on ...
user avatar
  • 173
1 vote
2 answers
503 views

Logging in Every Minute - Craft Admin Sessions (on Heroku)

I have Craft installed on Heroku using Memcached for sessions. Craft is kicking me out of the admin area every minute or two. It's deriving me crazy. I've also set the user session duration in general....
user avatar
0 votes
0 answers
2k views

Craft keeps displaying session timeout prompt

For some reason the admin keeps popping up the session timeout box, it seems after about a minute, even thought I can clearly see in my sessions that they have ages until expiry. See -> https://www....
user avatar
0 votes
1 answer
409 views

Is it possible to extend the lifetime of the CraftSessionId cookie?

I would like to extend the lifetime of the CraftSessionId cookie. Is this possible and if so, where can I change the value? Thank you for your time.
user avatar
1 vote
1 answer
772 views

User not being logged out when visiting {{ logoutUrl }} link

I have a login area on a site which basically just shows a users profile fields. I'm using the {{ logoutUrl }} tag for my logout link and when the user goes to the logoutUrl they're redirected to the ...
user avatar
  • 325
2 votes
2 answers
1k views

CP Session expires after short time

Our Craft installation is now working on the Production Cloud-Server, except that if I'm logged in the CP, after maybe 30 sec the login-modal pops up and says that the session has expired. If I just ...
user avatar
  • 685