| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!-- Reviewed: no -->
- <sect1 id="zend.session.introduction">
- <title>Introduction</title>
- <para>
- The Zend Framework Auth team greatly appreciates your feedback and contributions on our email list:
- <ulink url="mailto:fw-auth@lists.zend.com">fw-auth@lists.zend.com</ulink>
- </para>
- <para>
- With web applications written using PHP, a <emphasis>session</emphasis> represents a logical,
- one-to-one connection between server-side, persistent state data and a particular user agent client (e.g., web
- browser). <classname>Zend_Session</classname> 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
- <ulink url="http://www.php.net/manual/en/reserved.variables.php#reserved.variables.session"><code>$_SESSION</code></ulink>,
- managed by <classname>Zend_Session</classname>, and individually manipulated by <classname>Zend_Session_Namespace</classname>
- accessor objects. <emphasis>Session namespaces</emphasis> provide access to session data using
- classic <ulink url="http://en.wikipedia.org/wiki/Namespace_%28computer_science%29">namespaces</ulink>
- implemented logically as named groups of associative arrays, keyed by strings (similar to normal PHP arrays).
- </para>
- <para>
- <classname>Zend_Session_Namespace</classname> instances are accessor objects for namespaced slices of
- <code>$_SESSION</code>. The <classname>Zend_Session</classname> component wraps the existing PHP ext/session with an
- administration and management interface, as well as providing an API for <classname>Zend_Session_Namespace</classname> to
- persist session namespaces. <classname>Zend_Session_Namespace</classname> provides a standardized, object-oriented
- interface for working with namespaces persisted inside PHP's standard session mechanism. Support exists for
- both anonymous and authenticated (e.g., "login") session namespaces. <classname>Zend_Auth</classname>, the authentication
- component of Zend Framework, uses <classname>Zend_Session_Namespace</classname> to store some information associated
- with authenticated users. Since <classname>Zend_Session</classname> uses the normal PHP ext/session functions internally,
- all the familiar configuration options and settings apply (see
- <ulink url="http://www.php.net/session">http://www.php.net/session</ulink>), with such bonuses as the
- convenience of an object-oriented interface and default behavior that provides both best practices and smooth
- integration with Zend Framework. Thus, a standard PHP session identifier, whether conveyed by cookie or
- within URLs, maintains the association between a client and session state data.
- </para>
- <para>
- The default
- <ulink url="http://www.php.net/manual/en/function.session-set-save-handler.php">ext/session save
- handler</ulink> does not maintain this association for server clusters under certain conditions because session
- data are stored to the filesystem of the server that responded to the request. If a request may be processed by
- a different server than the one where the session data are located, then the responding server has no access to
- the session data (if they are not available from a networked filesystem). A list of additional, appropriate
- save handlers will be provided, when available. Community members are encouraged to suggest and submit save
- handlers to the <ulink url="mailto:fw-auth@lists.zend.com">fw-auth@lists.zend.com</ulink> list. A Zend_Db
- compatible save handler has been posted to the list.
- </para>
- </sect1>
|