Questions tagged [zend-session]

Zend Session is a component made by Zend which helps in managing and preserving sessions in any application which uses Zend Libraries.

Session is a one-to-one relation between user agent (a browser) and the server-sided persistent data.

Zend_Session helps manage and preserve session data, a logical complement of cookie data, across multiple page requests by the same client. Unlike cookie data, session data are not stored on the client side and are only shared with the client when server-side source code voluntarily makes the data available in response to a client request. For the purposes of this component and documentation, the term "session data" refers to the server-side data stored in » $_SESSION, managed by Zend_Session, and individually manipulated by Zend_Session_Namespace accessor objects.

Zend_Session_Namespace instances are accessor objects for namespaced slices of $_SESSION as per Zend Documentation

140 questions
1
vote
3 answers

Define variables outside the PHP class

I m using zend. I want to define the below code outside the controller class & access in different Actions. $user = new Zend_Session_Namespace('user'); $logInArray = array(); $logInArray['userId'] = $user->userid; $logInArray['orgId'] =…
PHP Ferrari
  • 15,754
  • 27
  • 83
  • 149
1
vote
0 answers

ZF2 + How to change session timeout with Zend\Authentication

I was able to define my own authentication service with Zend\Authentication. Now I want to be able to change the session timeout limit. I don't want to change the general session config but only for this Authentication manager. As I want to reuse…
Parktrip
  • 61
  • 4
1
vote
1 answer

Zend_Session_SaveHandler_DbTable not generating valid session ID?

I'm currently tearing my hair out trying to persist authentication via a database bases session. I've set Zend_Session to use a database, and on inspection, Zend is writing values to the database. However, the ID for those sessions doesn't appear…
sunwukung
  • 2,815
  • 3
  • 41
  • 56
1
vote
1 answer

ZF2 and ZF1 parallel session compatibility

For migration purposes, I use ZF1 and ZF2 modules in one project. Of course ZF1 modules should stick with Bit_Session_Namespace whereas ZF2 modules should use Zend\Session\Container. However, I have difficulties working with the same session data…
nick
  • 92
  • 1
  • 8
1
vote
1 answer

Zend_Session_SaveHandler_Db - don't delete old sessions

I use db table to store session information but the old session isn't delete from table automatically. In bootstrap class I have method to configurate session store handle: protected function _initSessionHandle(){ //setup your DB connection…
1
vote
1 answer

Session locking issue in zend server

I have a functionality to show alert to logged in user before 10 minutes prior to session expiry.A confirmation will be shown to the user before 10 minutes to the session expiry if he is idle for a specified time.f he wish to continue with the…
웃웃웃웃웃
  • 11,829
  • 15
  • 59
  • 91
1
vote
2 answers

Zend Session and Namespace Expiries

I have 2 areas that need session management, with 2 different expirations: Administrative Area - 20 minutes Reservation Area - 3 minutes Using Zend_Session, how can I manage both for the same user? It is important to note that the Reservation…
Travis
  • 599
  • 2
  • 6
  • 16
1
vote
0 answers

Zend Session timeout redirect to a specific URl

My application has 3 classes of users, each of whom login from different login channels. Don't ask me why this is implemented like this, but that's unfortunately not my decision. Anyways, it would be ideal if the Zend Session timeout would redirect…
Parijat Kalia
  • 4,929
  • 10
  • 50
  • 77
1
vote
2 answers

Accessing Zend Session data between actions

Here's my problem - I'm trying to access a session namespace across actions. The ZF examples appear to work by generating NEW namespaces, but they only demonstrate this within one action - but how do I access an existing namespace from a separate…
sunwukung
  • 2,815
  • 3
  • 41
  • 56
1
vote
0 answers

Understanding the Session Manager and Zend\Authenticate in ZF2

In the login action I'm having the following code: public function login($sEmail, $sEncryptedPassword, $bIsClear = true) { $manager = $this->getServiceLocator()->get('session_manager'); $manager->start(); …
sica07
  • 4,896
  • 8
  • 35
  • 54
1
vote
1 answer

PHP Zend Session code reverse-engineering explanation

I was looking through the code for Zend_Session to try and get a better understanding of how to implement session starting. Within the code, they do something that I don't quite understand. $hashBitsPerChar =…
somejkuser
  • 8,856
  • 20
  • 64
  • 130
1
vote
1 answer

Unit testing Zend_Session

i have problem with testing zend_session, my test look like that: Bootstrap.php public function _initSession() { try { Zend_Session::setSaveHandler(new APP_Session_SaveHandler_Memcached()); …
Vail
  • 608
  • 5
  • 14
1
vote
2 answers

Is there any method to get all the offsets of a session container in zend framework 2.?

when I go through the documentation of zend framework 2, i just found methods like getOffset($key) and offsetExists($key). But for both we have to specify the keys. My question is, Is there any method or any other way for retrieving all the…
1
vote
1 answer

How translate PHP code to Zend Framework 2

Possible Duplicate: How to use Zend\Session in zf2? I begin with ZF2 but I can't continue because I don't understand the official ZF2 documentation. I run version 2.0.4. How can I simply translate this PHP code into…
Patou
  • 21
  • 6
1
vote
0 answers

Random pictures in Zend

So, I'm quiet new to Zend Framework and stackoverflow (although I read a lot here), so please be gentle! What I'm trying to do is a digital version of an IAPS test (rate pictures for their arrousal and feeling). I have three sets of pictures and…
Andy Powers
  • 75
  • 10