cvs: /phpdoc/functions session.sgml

From: Date: Fri, 22 Oct 1999 08:30:16 +0000
Subject: cvs: /phpdoc/functions session.sgml
Groups: php.dev 
Request: Send a blank email to php-dev+get-11831@lists.php.net to get a copy of this message
eschmid Fri Oct 22 04:30:16 1999 EDT Modified files: /phpdoc/functions session.sgml Log: Typo and made it more readable. Lars have you used tidy? Index: phpdoc/functions/session.sgml diff -u phpdoc/functions/session.sgml:1.10 phpdoc/functions/session.sgml:1.11 --- phpdoc/functions/session.sgml:1.10 Fri Oct 22 04:05:24 1999 +++ phpdoc/functions/session.sgml Fri Oct 22 04:30:14 1999 @@ -3,29 +3,34 @@ <titleabbrev>Sessions</titleabbrev> <partintro> <para> - Session support in PHP consists of a way to preserve certain data across - subsequent accesses. This enables you to build more customized - applications and increase the appeal of your web site.</para> + Session support in PHP consists of a way to preserve certain data + across subsequent accesses. This enables you to build more + customized applications and increase the appeal of your web site. + </para> <para> - A visitor accessing your web site is assigned an unique id, the so-called - session id. This is either stored in a cookie on the user side or is - propagated in the URL.</para> + A visitor accessing your web site is assigned an unique id, the + so-called session id. This is either stored in a cookie on the + user side or is propagated in the URL. + </para> <para> - The session support allows you to register arbitrary numbers of variables to - be preserved across requests. When a visitor accesses your site, PHP will - check automatically (if session.auto_start is set to 1) or on your request - (explicitly through <function>session_start</function> or implicitly - through <function>session_register</function>) whether a specific - session id has been sent with the request. If this is the case, the prior - saved environment is recreated.</para> + The session support allows you to register arbitrary numbers of + variables to be preserved across requests. When a visitor accesses + your site, PHP will check automatically (if session.auto_start is + set to 1) or on your request (explicitly through + <function>session_start</function> or implicitly through + <function>session_register</function>) whether a specific session + id has been sent with the request. If this is the case, the prior + saved environment is recreated. + </para> <para> - All registered variables are serialized after the request finishes. - Registered variables which are undefined are marked as being not defined. - On subsequent accesses, these are not defined by the session module unless - the user defines them later.</para> + All registered variables are serialized after the request + finishes. Registered variables which are undefined are marked as + being not defined. On subsequent accesses, these are not defined + by the session module unless the user defines them later. + </para> <para> There are two methods to propagate a session id: @@ -38,25 +43,29 @@ </itemizedlist></para> <para> - The session module supports both methods. Cookies are optimal, but since - they are not reliable (clients are not bound to accept them), we cannot - rely on them. The second method embeds the session id directly into URLs.</para> + The session module supports both methods. Cookies are optimal, but + since they are not reliable (clients are not bound to accept + them), we cannot rely on them. The second method embeds the + session id directly into URLs. + </para> <para> PHP is capable of doing this transparently when compiled with - <literal>--enable-trans-sid</literal>. If you enable this option, relative - URIs will be changed to contain the session id automatically. - Alternatively, you can use the constant <literal>SID</literal> which is - defined, if the client did not send the appropiate cookie. - <literal>SID</literal> is either of the form - <literal>session_name=session_id</literal> or is an empty string.</para> + <literal>--enable-trans-sid</literal>. If you enable this option, + relative URIs will be changed to contain the session id + automatically. Alternatively, you can use the constant + <literal>SID</literal> which is defined, if the client did not + send the appropiate cookie. <literal>SID</literal> is either of + the form <literal>session_name=session_id</literal> or is an empty + string. + </para> <para> - The following example demonstrates how to register a variable, and how to - link correctly to another page using SID. + The following example demonstrates how to register a variable, and + how to link correctly to another page using SID. <example> - <title>counting the number of hits of a single user</title> + <title>Counting the number of hits of a single user</title> <programlisting> &lt;?php @@ -102,7 +111,7 @@ function read ($key) { echo "write ($key, $val)\n"; - return "foo|i:1;";; + return "foo|i:1;"; } function write ($key, $val) { @@ -148,79 +157,94 @@ <para> The <literal>&lt;?=SID?&gt;</literal> is not necessary, if - <literal>--enable-trans-sid</literal> was used to compile PHP.</para> + <literal>--enable-trans-sid</literal> was used to compile PHP. + </para> <para> - The session management system supports a number of configuration options - which you can place in your php.ini file. We will give a short overview. + The session management system supports a number of configuration + options which you can place in your php.ini file. We will give a + short overview. <itemizedlist> <listitem><simpara> - <literal>session.save_handler</literal> defines the name of the handler - which is used for storing and retrieving data associated with a session. - Defaults to <literal>files</literal>.</simpara></listitem> + <literal>session.save_handler</literal> defines the name of the + handler which is used for storing and retrieving data associated + with a session. Defaults to + <literal>files</literal>.</simpara></listitem> <listitem><simpara> - <literal>session.save_path</literal> defines the argument which is - passed to the save handler. If you choose the default files handler, - this is the path where the files are created. Defaults to - <literal>/tmp</literal>.</simpara></listitem> + <literal>session.save_path</literal> defines the argument which + is passed to the save handler. If you choose the default files + handler, this is the path where the files are created. Defaults + to <literal>/tmp</literal>.</simpara></listitem> <listitem><simpara> - <literal>session.name</literal> specifies the name of the session which - is used as cookie name. It should only contain alphanumeric characters. - Defaults to <literal>PHPSESSID</literal>.</simpara></listitem> + <literal>session.name</literal> specifies the name of the + session which is used as cookie name. It should only contain + alphanumeric characters. Defaults to + <literal>PHPSESSID</literal>.</simpara></listitem> <listitem><simpara> - <literal>session.auto_start</literal> specifies whether the session - module start a session automatically on request startup. Defaults to - <literal>0</literal> (disabled).</simpara></listitem> + <literal>session.auto_start</literal> specifies whether the + session module start a session automatically on request + startup. Defaults to <literal>0</literal> + (disabled).</simpara></listitem> <listitem><simpara> - <literal>session.lifetime</literal> specifies the lifetime of the cookie - in seconds which is sent to the browser. The value 0 means "until the - browser is closed." Defaults to <literal>0</literal>.</simpara></listitem> + <literal>session.lifetime</literal> specifies the lifetime of + the cookie in seconds which is sent to the browser. The value 0 + means "until the browser is closed." Defaults to + <literal>0</literal>.</simpara></listitem> <listitem><simpara> - <literal>session.serialize_handler</literal> defines the name of the - handler which is used to serialize/deserialize data. Currently, a PHP - internal format (name <literal>php</literal>) and WDDX is supported - (name <literal>wddx</literal>). WDDX is only available, if PHP is - compiled with <link linkend="ref.wddx">WDDX support</link>. Defaults to + <literal>session.serialize_handler</literal> defines the name of + the handler which is used to serialize/deserialize + data. Currently, a PHP internal format (name + <literal>php</literal>) and WDDX is supported (name + <literal>wddx</literal>). WDDX is only available, if PHP is + compiled with <link linkend="ref.wddx">WDDX + support</link>. Defaults to <literal>php</literal>.</simpara></listitem> <listitem><simpara> - <literal>session.gc_probability</literal> specifies the probability that - the gc (garbage collection) routine is started on each request in - percent. Defaults to <literal>1</literal>.</simpara></listitem> + <literal>session.gc_probability</literal> specifies the + probability that the gc (garbage collection) routine is started + on each request in percent. Defaults to + <literal>1</literal>.</simpara></listitem> <listitem><simpara> - <literal>session.gc_maxlifetime</literal> specifies the number of - seconds after which data will be seen as 'garbage' and cleaned up.</simpara></listitem> + <literal>session.gc_maxlifetime</literal> specifies the number + of seconds after which data will be seen as 'garbage' and + cleaned up.</simpara></listitem> <listitem><simpara> - <literal>session.extern_referer_check</literal> determines whether - session ids referred to by external sites will be eliminated. If session - ids are propagated using the URL method, users not knowing about the - impact might publish session ids. This can lead to security problems - which this check tries to defeat. Defaults to <literal>0</literal>.</simpara></listitem> + <literal>session.extern_referer_check</literal> determines + whether session ids referred to by external sites will be + eliminated. If session ids are propagated using the URL method, + users not knowing about the impact might publish session + ids. This can lead to security problems which this check tries + to defeat. Defaults to + <literal>0</literal>.</simpara></listitem> <listitem><simpara> - <literal>session.entropy_file</literal> gives a path to an external - resource (file) which will be used as an additional entropy source in the - session id creation process. Examples are <literal>/dev/random</literal> - or <literal>/dev/urandom</literal> which are available on many Unix - systems.</simpara></listitem> + <literal>session.entropy_file</literal> gives a path to an + external resource (file) which will be used as an additional + entropy source in the session id creation process. Examples are + <literal>/dev/random</literal> or + <literal>/dev/urandom</literal> which are available on many Unix + systems.</simpara></listitem> <listitem><simpara> - <literal>session.entropy_length</literal> specifies the number of bytes - which will be read from the file specified above. Defaults to - <literal>0</literal> (disabled).</simpara></listitem> + <literal>session.entropy_length</literal> specifies the number + of bytes which will be read from the file specified + above. Defaults to <literal>0</literal> + (disabled).</simpara></listitem> <listitem><simpara> - <literal>session.use_cookies</literal> specifies whether the module will - use cookies to store the session id on the client side. Defaults to - <literal>1</literal> (enabled).</simpara></listitem> + <literal>session.use_cookies</literal> specifies whether the + module will use cookies to store the session id on the client + side. Defaults to <literal>1</literal> + (enabled).</simpara></listitem> </itemizedlist>

« previous php.dev (#11831) next »