Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9138433
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:15:21+00:00 2026-06-17T09:15:21+00:00

I have Session::$default=’database’; $session=Session::instance(); and $session->id() displays session’s value now. The value is stored

  • 0

I have

Session::$default='database';
$session=Session::instance(); 

and
$session->id() displays session’s value now.
The value is stored in the sessions table as well.
Everything seems to work fine.

My question is: how to check if session exists in another action.
The $_SESSION array is undefined.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T09:15:22+00:00Added an answer on June 17, 2026 at 9:15 am

    To access the session from any controller action or view template, simply use:

    Session::instance()
    

    For example:

    $session = Session::instance();
    
    $session->set('my_key', 'my_value');
    
    // returns false if my_key does not exist
    $my_key = $session->get('my_key', false);
    

    To overload $_SESSION with the Kohana session, run the following inside each action method:

    $_SESSION =& $session->as_array();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a non CMS page in which a session value is stored using
Anyone have any best practices tips for Rails and sessions? The default session type
A quick questions about sessions, I have a session with the following code <?php
I have a session variable and it is set default time of 20 minutes...
Have such user_session model: class UserSession < Authlogic::Session::Base logout_on_timeout true # default if false
I have a recursive one-to-many relationship that has the default lazy value of true.
I have a table called user_badges and a field called badge1 with the default
I have a database that accepts no null values and has a default for
After plenty of debugging it seems the problem was (embarrassingly) in my database session
Have next problem: i setup the custom session state server (store sessions in Mysql).

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.