فصل 25. Zend_Session
السابق |  | التالي

## فصل 25. Zend_Session

## 25.1. Introduction

See the most recent published version of this document . Also, the Zend Framework Auth team greatly appreciates your feedback and contributions on our email list: fw-auth@lists.zend.com

With web applications written using PHP, a session represents a logical, one-to-one connection between server-side, persistent state data and a particular user agent client (e.g. web browser). 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 is not stored on the client side, and it is only shared with the client when server-side source code makes the data available via a response to a request from the client. For the purposes of this component and documentation, session data refers to the server-side data managed by Zend_Session.

The Zend_Session component wraps the existing PHP ext/session to provide a standardized, object-oriented interface for working with sessions, including both anonymous and login sessions. Zend_Auth, the authentication component of the ZF uses Zend_Session to store some information associated with login sessions. Since Zend_Session uses the normal PHP session functions internally, all the usual configuration options and settings apply (see http://www.php.net/session ). Thus, a session id, stored either in a cookie or URLs, maintains the association between a client and session state data.

The default ext/session save handler does not solve the problem of maintaining this association, when a client may connect to any sever in a cluster of servers, since session state data is saved to the local server only. A list of additional, appropriate save handlers will be provided, when available.

السابق |  | التالي
24.5. Zend_Service_Yahoo | البداية | 25.2. Basic Usage