cvs: phpdoc /en/reference/session/functions session-cache-expire.xml session-cache-limiter.xml session-decode.xml session-destroy.xml
session-encode.xml session-get-cookie-params.xml session-is-registered.xml session-module-name.xml session-name.xml session-register.xml
session-save-path.xml session-set-cookie-params.xml session-set-save-handler.xml session-start.xml session-unregister.xml session-unset.xml
session-write-close.xml
| From: | Mehdi Achour | Date: | Fri, 15 Jun 2007 00:15:33 +0000 |
| Subject: | cvs: phpdoc /en/reference/session/functions session-cache-expire.xml session-cache-limiter.xml session-decode.xml session-destroy.xml session-encode.xml session-get-cookie-params.xml session-is-registered.xml session-module-name.xml session-name.xml session-register.xml session-save-path.xml session-set-cookie-params.xml session-set-save-handler.xml session-start.xml session-unregister.xml session-unset.xml session-write-close.xml |
||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969376684@lists.php.net to get a copy of this message | ||
didou Fri Jun 15 00:15:33 2007 UTC
Modified files:
/phpdoc/en/reference/session/functions session-cache-expire.xml
session-cache-limiter.xml
session-decode.xml
session-destroy.xml
session-encode.xml
session-get-cookie-params.xml
session-is-registered.xml
session-module-name.xml
session-name.xml
session-register.xml
session-save-path.xml
session-set-cookie-params.xml
session-set-save-handler.xml
session-start.xml
session-unregister.xml
session-unset.xml
session-write-close.xml
Log:
WS, prepare for new doc style
http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/session/functions/session-cache-expire.xml?r1=1.7&r2=1.8&diff_format=u Index: phpdoc/en/reference/session/functions/session-cache-expire.xml diff -u phpdoc/en/reference/session/functions/session-cache-expire.xml:1.7 phpdoc/en/reference/session/functions/session-cache-expire.xml:1.8 --- phpdoc/en/reference/session/functions/session-cache-expire.xml:1.7 Wed May 19 08:24:55 2004 +++ phpdoc/en/reference/session/functions/session-cache-expire.xml Fri Jun 15 00:15:33 2007 @@ -1,33 +1,33 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.7 $ --> +<!-- $Revision: 1.8 $ --> <!-- splitted from ./en/functions/session.xml, last change in rev 1.38 --> - <refentry id='function.session-cache-expire'> - <refnamediv> - <refname>session_cache_expire</refname> - <refpurpose>Return current cache expire</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <methodsynopsis> - <type>int</type><methodname>session_cache_expire</methodname> - <methodparam choice="opt"><type>int</type><parameter>new_cache_expire</parameter></methodparam> - </methodsynopsis> - <para> - <function>session_cache_expire</function> returns the current setting of - <literal>session.cache_expire</literal>. The value returned should be read - in minutes, defaults to 180. If <parameter>new_cache_expire</parameter> - is given, the current cache expire is replaced with - <parameter>new_cache_expire</parameter>. - </para> - <para> - The cache expire is reset to the default value of 180 stored in - <literal>session.cache_limiter</literal> at request startup time. Thus, - you need to call <function>session_cache_expire</function> for every - request (and before <function>session_start</function> is called). - </para> - <example> - <title><function>session_cache_expire</function> example</title> - <programlisting role="php"> +<refentry id='function.session-cache-expire'> + <refnamediv> + <refname>session_cache_expire</refname> + <refpurpose>Return current cache expire</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>int</type><methodname>session_cache_expire</methodname> + <methodparam choice="opt"><type>int</type><parameter>new_cache_expire</parameter></methodparam> + </methodsynopsis> + <para> + <function>session_cache_expire</function> returns the current setting of + <literal>session.cache_expire</literal>. The value returned should be read + in minutes, defaults to 180. If <parameter>new_cache_expire</parameter> + is given, the current cache expire is replaced with + <parameter>new_cache_expire</parameter>. + </para> + <para> + The cache expire is reset to the default value of 180 stored in + <literal>session.cache_limiter</literal> at request startup time. Thus, + you need to call <function>session_cache_expire</function> for every + request (and before <function>session_start</function> is called). + </para> + <example> + <title><function>session_cache_expire</function> example</title> + <programlisting role="php"> <![CDATA[ <?php @@ -48,22 +48,22 @@ echo "The cached session pages expire after $cache_expire minutes"; ?> ]]> - </programlisting> - </example> - <note> - <simpara> - Setting <parameter>new_cache_expire</parameter> is of value only, if - <literal>session.cache_limiter</literal> is set to a value - <emphasis>different</emphasis> from <literal>nocache</literal>. - </simpara> - </note> - <para> - See also the configuration settings <link linkend="ini.session.cache-expire"> - session.cache_expire</link>, <link linkend="ini.session.cache-limiter"> - session.cache_limiter</link> and <function>session_cache_limiter</function>. - </para> - </refsect1> - </refentry> + </programlisting> + </example> + <note> + <simpara> + Setting <parameter>new_cache_expire</parameter> is of value only, if + <literal>session.cache_limiter</literal> is set to a value + <emphasis>different</emphasis> from <literal>nocache</literal>. + </simpara> + </note> + <para> + See also the configuration settings <link linkend="ini.session.cache-expire"> + session.cache_expire</link>, <link linkend="ini.session.cache-limiter"> + session.cache_limiter</link> and <function>session_cache_limiter</function>. + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/session/functions/session-cache-limiter.xml?r1=1.6&r2=1.7&diff_format=u Index: phpdoc/en/reference/session/functions/session-cache-limiter.xml diff -u phpdoc/en/reference/session/functions/session-cache-limiter.xml:1.6 phpdoc/en/reference/session/functions/session-cache-limiter.xml:1.7 --- phpdoc/en/reference/session/functions/session-cache-limiter.xml:1.6 Wed May 19 08:26:55 2004 +++ phpdoc/en/reference/session/functions/session-cache-limiter.xml Fri Jun 15 00:15:33 2007 @@ -1,54 +1,54 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.6 $ --> +<!-- $Revision: 1.7 $ --> <!-- splitted from ./en/functions/session.xml, last change in rev 1.62 --> - <refentry id="function.session-cache-limiter"> - <refnamediv> - <refname>session_cache_limiter</refname> - <refpurpose>Get and/or set the current cache limiter</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <methodsynopsis> - <type>string</type><methodname>session_cache_limiter</methodname> - <methodparam choice="opt"><type>string</type><parameter>cache_limiter</parameter></methodparam> - </methodsynopsis> - <para> - <function>session_cache_limiter</function> returns the name of the - current cache limiter. If <parameter>cache_limiter</parameter> - is specified, the name of the current cache limiter is changed to the - new value. - </para> - <para> - The cache limiter defines which cache control HTTP headers are sent to - the client. These headers determine the rules by which the page content - may be cached by the client and intermediate proxies. Setting the cache - limiter to <literal>nocache</literal> disallows any client/proxy caching. - A value of <literal>public</literal> permits caching by proxies and the - client, whereas <literal>private</literal> disallows caching by proxies - and permits the client to cache the contents. - </para> - <para> - In <literal>private</literal> mode, the Expire header sent to the - client may cause confusion for some browsers, including Mozilla. - You can avoid this problem by using - <literal>private_no_expire</literal> mode. The expire header is never - sent to the client in this mode. - </para> - <note> - <para> - <literal>private_no_expire</literal> was added in PHP 4.2.0. - </para> - </note> - <para> - The cache limiter is reset to the default value stored in - <link linkend="ini.session.cache-limiter">session.cache_limiter</link> - at request startup time. Thus, you need to call - <function>session_cache_limiter</function> for every - request (and before <function>session_start</function> is called). - </para> - <example> - <title><function>session_cache_limiter</function> example</title> - <programlisting role="php"> +<refentry id="function.session-cache-limiter"> + <refnamediv> + <refname>session_cache_limiter</refname> + <refpurpose>Get and/or set the current cache limiter</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>string</type><methodname>session_cache_limiter</methodname> + <methodparam choice="opt"><type>string</type><parameter>cache_limiter</parameter></methodparam> + </methodsynopsis> + <para> + <function>session_cache_limiter</function> returns the name of the + current cache limiter. If <parameter>cache_limiter</parameter> + is specified, the name of the current cache limiter is changed to the + new value. + </para> + <para> + The cache limiter defines which cache control HTTP headers are sent to + the client. These headers determine the rules by which the page content + may be cached by the client and intermediate proxies. Setting the cache + limiter to <literal>nocache</literal> disallows any client/proxy caching. + A value of <literal>public</literal> permits caching by proxies and the + client, whereas <literal>private</literal> disallows caching by proxies + and permits the client to cache the contents. + </para> + <para> + In <literal>private</literal> mode, the Expire header sent to the + client may cause confusion for some browsers, including Mozilla. + You can avoid this problem by using + <literal>private_no_expire</literal> mode. The expire header is never + sent to the client in this mode. + </para> + <note> + <para> + <literal>private_no_expire</literal> was added in PHP 4.2.0. + </para> + </note> + <para> + The cache limiter is reset to the default value stored in + <link linkend="ini.session.cache-limiter">session.cache_limiter</link> + at request startup time. Thus, you need to call + <function>session_cache_limiter</function> for every + request (and before <function>session_start</function> is called). + </para> + <example> + <title><function>session_cache_limiter</function> example</title> + <programlisting role="php"> <![CDATA[ <?php @@ -60,14 +60,14 @@ echo "The cache limiter is now set to $cache_limiter<br />"; ?> ]]> - </programlisting> - </example> - <para> - Also see the <link linkend="ini.session.cache-limiter">session.cache_limiter</link> - configuration directive. - </para> - </refsect1> - </refentry> + </programlisting> + </example> + <para> + Also see the <link linkend="ini.session.cache-limiter">session.cache_limiter</link> + configuration directive. + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/session/functions/session-decode.xml?r1=1.4&r2=1.5&diff_format=u Index: phpdoc/en/reference/session/functions/session-decode.xml diff -u phpdoc/en/reference/session/functions/session-decode.xml:1.4 phpdoc/en/reference/session/functions/session-decode.xml:1.5 --- phpdoc/en/reference/session/functions/session-decode.xml:1.4 Tue Jan 28 04:06:26 2003 +++ phpdoc/en/reference/session/functions/session-decode.xml Fri Jun 15 00:15:33 2007 @@ -1,28 +1,28 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <!-- splitted from ./en/functions/session.xml, last change in rev 1.2 --> - <refentry id="function.session-decode"> - <refnamediv> - <refname>session_decode</refname> - <refpurpose>Decodes session data from a string</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <methodsynopsis> - <type>bool</type><methodname>session_decode</methodname> - <methodparam><type>string</type><parameter>data</parameter></methodparam> - </methodsynopsis> - <para> - <function>session_decode</function> decodes the session data in - <parameter>data</parameter>, setting variables stored in the - session. - </para> - <para> - See also - <function>session_encode</function>. - </para> - </refsect1> - </refentry> +<refentry id="function.session-decode"> + <refnamediv> + <refname>session_decode</refname> + <refpurpose>Decodes session data from a string</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>bool</type><methodname>session_decode</methodname> + <methodparam><type>string</type><parameter>data</parameter></methodparam> + </methodsynopsis> + <para> + <function>session_decode</function> decodes the session data in + <parameter>data</parameter>, setting variables stored in the + session. + </para> + <para> + See also + <function>session_encode</function>. + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/session/functions/session-destroy.xml?r1=1.4&r2=1.5&diff_format=u Index: phpdoc/en/reference/session/functions/session-destroy.xml diff -u phpdoc/en/reference/session/functions/session-destroy.xml:1.4 phpdoc/en/reference/session/functions/session-destroy.xml:1.5 --- phpdoc/en/reference/session/functions/session-destroy.xml:1.4 Sat Sep 4 14:14:25 2004 +++ phpdoc/en/reference/session/functions/session-destroy.xml Fri Jun 15 00:15:33 2007 @@ -1,36 +1,36 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <!-- splitted from ./en/functions/session.xml, last change in rev 1.2 --> - <refentry id="function.session-destroy"> - <refnamediv> - <refname>session_destroy</refname> - <refpurpose>Destroys all data registered to a session</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <methodsynopsis> - <type>bool</type><methodname>session_destroy</methodname> - <void/> - </methodsynopsis> - <simpara> - <function>session_destroy</function> destroys all of the data - associated with the current session. It does not unset any of - the global variables associated with the session, or unset the - session cookie. - </simpara> - <para> - In order to kill the session altogether, like to log the user out, the - session id must also be unset. If a cookie is used to propagate the - session id (default behavior), then the session cookie must be deleted. - <function>setcookie</function> may be used for that. - </para> - <simpara> - &return.success; - </simpara> - <para> - <example> - <title>Destroying a session with <varname>$_SESSION</varname></title> - <programlisting role="php"> +<refentry id="function.session-destroy"> + <refnamediv> + <refname>session_destroy</refname> + <refpurpose>Destroys all data registered to a session</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>bool</type><methodname>session_destroy</methodname> + <void/> + </methodsynopsis> + <simpara> + <function>session_destroy</function> destroys all of the data + associated with the current session. It does not unset any of + the global variables associated with the session, or unset the + session cookie. + </simpara> + <para> + In order to kill the session altogether, like to log the user out, the + session id must also be unset. If a cookie is used to propagate the + session id (default behavior), then the session cookie must be deleted. + <function>setcookie</function> may be used for that. + </para> + <simpara> + &return.success; + </simpara> + <para> + <example> + <title>Destroying a session with <varname>$_SESSION</varname></title> + <programlisting role="php"> <![CDATA[ <?php // Initialize the session. @@ -50,22 +50,22 @@ session_destroy(); ?> ]]> - </programlisting> - </example> - </para> - <note> - <para> - Only use <function>session_unset</function> for older deprecated code - that does not use <varname>$_SESSION</varname>. - </para> - </note> - <para> - See also - <function>unset</function> and - <function>setcookie</function>. - </para> - </refsect1> - </refentry> + </programlisting> + </example> + </para> + <note> + <para> + Only use <function>session_unset</function> for older deprecated code + that does not use <varname>$_SESSION</varname>. + </para> + </note> + <para> + See also + <function>unset</function> and + <function>setcookie</function>. + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/session/functions/session-encode.xml?r1=1.3&r2=1.4&diff_format=u Index: phpdoc/en/reference/session/functions/session-encode.xml diff -u phpdoc/en/reference/session/functions/session-encode.xml:1.3 phpdoc/en/reference/session/functions/session-encode.xml:1.4 --- phpdoc/en/reference/session/functions/session-encode.xml:1.3 Sun Jan 19 02:41:21 2003 +++ phpdoc/en/reference/session/functions/session-encode.xml Fri Jun 15 00:15:33 2007 @@ -1,29 +1,27 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <!-- splitted from ./en/functions/session.xml, last change in rev 1.2 --> - <refentry id="function.session-encode"> - <refnamediv> - <refname>session_encode</refname> - <refpurpose> - Encodes the current session data as a string - </refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <methodsynopsis> - <type>string</type><methodname>session_encode</methodname> - <void/> - </methodsynopsis> - <para> - <function>session_encode</function> returns a string with the - contents of the current session encoded within. - </para> - <para> - See also - <function>session_decode</function> - </para> - </refsect1> - </refentry> +<refentry id="function.session-encode"> + <refnamediv> + <refname>session_encode</refname> + <refpurpose>Encodes the current session data as a string</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>string</type><methodname>session_encode</methodname> + <void/> + </methodsynopsis> + <para> + <function>session_encode</function> returns a string with the + contents of the current session encoded within. + </para> + <para> + See also + <function>session_decode</function> + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/session/functions/session-get-cookie-params.xml?r1=1.5&r2=1.6&diff_format=u Index: phpdoc/en/reference/session/functions/session-get-cookie-params.xml diff -u phpdoc/en/reference/session/functions/session-get-cookie-params.xml:1.5 phpdoc/en/reference/session/functions/session-get-cookie-params.xml:1.6 --- phpdoc/en/reference/session/functions/session-get-cookie-params.xml:1.5 Fri Aug 11 16:21:54 2006 +++ phpdoc/en/reference/session/functions/session-get-cookie-params.xml Fri Jun 15 00:15:33 2007 @@ -1,64 +1,62 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> +<!-- $Revision: 1.6 $ --> <!-- splitted from ./en/functions/session.xml, last change in rev 1.8 --> - <refentry id="function.session-get-cookie-params"> - <refnamediv> - <refname>session_get_cookie_params</refname> - <refpurpose> - Get the session cookie parameters - </refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <methodsynopsis> - <type>array</type><methodname>session_get_cookie_params</methodname> - <void/> - </methodsynopsis> - <para> - The <function>session_get_cookie_params</function> function returns an - array with the current session cookie information, the array contains - the following items: - <itemizedlist> - <listitem> - <simpara> - "lifetime" - The lifetime of the cookie in seconds. - </simpara> - </listitem> - <listitem> - <simpara> - "path" - The path where information is stored. - </simpara> - </listitem> - <listitem> - <simpara> - "domain" - The domain of the cookie. - </simpara> - </listitem> - <listitem> - <simpara> - "secure" - The cookie should only be sent over secure connections. - (This item was added in PHP 4.0.4.) - </simpara> - </listitem> - <listitem> - <simpara> - "httponly" - The cookie can only be accessed through the HTTP protocol - (This item was added in PHP 5.2.0). - </simpara> - </listitem> - </itemizedlist> - </para> - <para> - See also the configuration directives - <link linkend="ini.session.cookie-lifetime">session.cookie_lifetime</link>, - <link linkend="ini.session.cookie-path">session.cookie_path</link>, - <link linkend="ini.session.cookie-domain">session.cookie_domain</link>, - <link linkend="ini.session.cookie-secure">session.cookie_secure</link>, - <link linkend="ini.session.cookie-httponly">session.cookie_httponly</link>, and - <function>session_set_cookie_params</function>. - </para> - </refsect1> - </refentry> +<refentry id="function.session-get-cookie-params"> + <refnamediv> + <refname>session_get_cookie_params</refname> + <refpurpose>Get the session cookie parameters</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>array</type><methodname>session_get_cookie_params</methodname> + <void/> + </methodsynopsis> + <para> + The <function>session_get_cookie_params</function> function returns an + array with the current session cookie information, the array contains + the following items: + <itemizedlist> + <listitem> + <simpara> + "lifetime" - The lifetime of the cookie in seconds. + </simpara> + </listitem> + <listitem> + <simpara> + "path" - The path where information is stored. + </simpara> + </listitem> + <listitem> + <simpara> + "domain" - The domain of the cookie. + </simpara> + </listitem> + <listitem> + <simpara> + "secure" - The cookie should only be sent over secure connections. + (This item was added in PHP 4.0.4.) + </simpara> + </listitem> + <listitem> + <simpara> + "httponly" - The cookie can only be accessed through the HTTP protocol + (This item was added in PHP 5.2.0). + </simpara> + </listitem> + </itemizedlist> + </para> + <para> + See also the configuration directives + <link linkend="ini.session.cookie-lifetime">session.cookie_lifetime</link>, + <link linkend="ini.session.cookie-path">session.cookie_path</link>, + <link linkend="ini.session.cookie-domain">session.cookie_domain</link>, + <link linkend="ini.session.cookie-secure">session.cookie_secure</link>, + <link linkend="ini.session.cookie-httponly">session.cookie_httponly</link>, and + <function>session_set_cookie_params</function>. + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/session/functions/session-is-registered.xml?r1=1.4&r2=1.5&diff_format=u Index: phpdoc/en/reference/session/functions/session-is-registered.xml diff -u phpdoc/en/reference/session/functions/session-is-registered.xml:1.4 phpdoc/en/reference/session/functions/session-is-registered.xml:1.5 --- phpdoc/en/reference/session/functions/session-is-registered.xml:1.4 Tue Dec 17 10:30:05 2002 +++ phpdoc/en/reference/session/functions/session-is-registered.xml Fri Jun 15 00:15:33 2007 @@ -1,43 +1,41 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <!-- splitted from ./en/functions/session.xml, last change in rev 1.8 --> - <refentry id="function.session-is-registered"> - <refnamediv> - <refname>session_is_registered</refname> - <refpurpose> - Find out whether a global variable is registered in a session - </refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <methodsynopsis> - <type>bool</type><methodname>session_is_registered</methodname> - <methodparam><type>string</type><parameter>name</parameter></methodparam> - </methodsynopsis> - <para> - <function>session_is_registered</function> returns &true; if there - is a global variable with the name <parameter>name</parameter> - registered in the current session. - </para> - <note> - <para> - If <varname>$_SESSION</varname> (or - <varname>$HTTP_SESSION_VARS</varname> for PHP 4.0.6 or less) is - used, use <function>isset</function> to check a variable is - registered in <varname>$_SESSION</varname>. - </para> - </note> - <caution> - <para> - If you are using - <varname>$_SESSION</varname> (or <varname>$HTTP_SESSION_VARS</varname>), - do not use <function>session_register</function>, - <function>session_is_registered</function> and - <function>session_unregister</function>. - </para> - </caution> - </refsect1> - </refentry> +<refentry id="function.session-is-registered"> + <refnamediv> + <refname>session_is_registered</refname> + <refpurpose>Find out whether a global variable is registered in a session</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>bool</type><methodname>session_is_registered</methodname> + <methodparam><type>string</type><parameter>name</parameter></methodparam> + </methodsynopsis> + <para> + <function>session_is_registered</function> returns &true; if there + is a global variable with the name <parameter>name</parameter> + registered in the current session. + </para> + <note> + <para> + If <varname>$_SESSION</varname> (or + <varname>$HTTP_SESSION_VARS</varname> for PHP 4.0.6 or less) is + used, use <function>isset</function> to check a variable is + registered in <varname>$_SESSION</varname>. + </para> + </note> + <caution> + <para> + If you are using + <varname>$_SESSION</varname> (or <varname>$HTTP_SESSION_VARS</varname>), + do not use <function>session_register</function>, + <function>session_is_registered</function> and + <function>session_unregister</function>. + </para> + </caution> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/session/functions/session-module-name.xml?r1=1.2&r2=1.3&diff_format=u Index: phpdoc/en/reference/session/functions/session-module-name.xml diff -u phpdoc/en/reference/session/functions/session-module-name.xml:1.2 phpdoc/en/reference/session/functions/session-module-name.xml:1.3 --- phpdoc/en/reference/session/functions/session-module-name.xml:1.2 Wed Apr 17 06:43:59 2002 +++ phpdoc/en/reference/session/functions/session-module-name.xml Fri Jun 15 00:15:33 2007 @@ -1,24 +1,24 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <!-- splitted from ./en/functions/session.xml, last change in rev 1.2 --> - <refentry id="function.session-module-name"> - <refnamediv> - <refname>session_module_name</refname> - <refpurpose>Get and/or set the current session module</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <methodsynopsis> - <type>string</type><methodname>session_module_name</methodname> - <methodparam choice="opt"><type>string</type><parameter>module</parameter></methodparam> - </methodsynopsis> - <para> - <function>session_module_name</function> returns the name of the - current session module. If <parameter>module</parameter> is - specified, that module will be used instead. - </para> - </refsect1> - </refentry> +<refentry id="function.session-module-name"> + <refnamediv> + <refname>session_module_name</refname> + <refpurpose>Get and/or set the current session module</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>string</type><methodname>session_module_name</methodname> + <methodparam choice="opt"><type>string</type><parameter>module</parameter></methodparam> + </methodsynopsis> + <para> + <function>session_module_name</function> returns the name of the + current session module. If <parameter>module</parameter> is + specified, that module will be used instead. + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/session/functions/session-name.xml?r1=1.6&r2=1.7&diff_format=u Index: phpdoc/en/reference/session/functions/session-name.xml diff -u phpdoc/en/reference/session/functions/session-name.xml:1.6 phpdoc/en/reference/session/functions/session-name.xml:1.7 --- phpdoc/en/reference/session/functions/session-name.xml:1.6 Sun Dec 18 16:29:30 2005 +++ phpdoc/en/reference/session/functions/session-name.xml Fri Jun 15 00:15:33 2007 @@ -1,41 +1,41 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.6 $ --> +<!-- $Revision: 1.7 $ --> <!-- splitted from ./en/functions/session.xml, last change in rev 1.2 --> - <refentry id="function.session-name"> - <refnamediv> - <refname>session_name</refname> - <refpurpose>Get and/or set the current session name</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <methodsynopsis> - <type>string</type><methodname>session_name</methodname> - <methodparam choice="opt"><type>string</type><parameter>name</parameter></methodparam> - </methodsynopsis> - <para> - <function>session_name</function> returns the name of the current - session. If <parameter>name</parameter> is specified, the name of - the current session is changed to its value. - </para> - <para> - The session name references the session id in cookies and - URLs. It should contain only alphanumeric characters; it should - be short and descriptive (i.e. for users with enabled cookie - warnings). The session name is reset to the default value - stored in <literal>session.name</literal> at request startup - time. Thus, you need to call <function>session_name</function> - for every request (and before <function>session_start</function> - or <function>session_register</function> are called). - </para> - <warning> - <para> - The session name can't consist of digits only, at least one letter must - be present. Otherwise a new session id is generated every time. - </para> - </warning> - <example> - <title><function>session_name</function> examples</title> - <programlisting role="php"> +<refentry id="function.session-name"> + <refnamediv> + <refname>session_name</refname> + <refpurpose>Get and/or set the current session name</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>string</type><methodname>session_name</methodname> + <methodparam choice="opt"><type>string</type><parameter>name</parameter></methodparam> + </methodsynopsis> + <para> + <function>session_name</function> returns the name of the current + session. If <parameter>name</parameter> is specified, the name of + the current session is changed to its value. + </para> + <para> + The session name references the session id in cookies and + URLs. It should contain only alphanumeric characters; it should + be short and descriptive (i.e. for users with enabled cookie + warnings). The session name is reset to the default value + stored in <literal>session.name</literal> at request startup + time. Thus, you need to call <function>session_name</function> + for every request (and before <function>session_start</function> + or <function>session_register</function> are called). + </para> + <warning> + <para> + The session name can't consist of digits only, at least one letter must + be present. Otherwise a new session id is generated every time. + </para> + </warning> + <example> + <title><function>session_name</function> examples</title> + <programlisting role="php"> <![CDATA[ <?php @@ -46,14 +46,14 @@ echo "The previous session name was $previous_name<br />"; ?> ]]> - </programlisting> - </example> - <para> - See also the <link linkend="ini.session.name">session.name</link> - configuration directive. - </para> - </refsect1> - </refentry> + </programlisting> + </example> + <para> + See also the <link linkend="ini.session.name">session.name</link> + configuration directive. + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/session/functions/session-register.xml?r1=1.9&r2=1.10&diff_format=u Index: phpdoc/en/reference/session/functions/session-register.xml diff -u phpdoc/en/reference/session/functions/session-register.xml:1.9 phpdoc/en/reference/session/functions/session-register.xml:1.10 --- phpdoc/en/reference/session/functions/session-register.xml:1.9 Wed Jun 11 04:38:52 2003 +++ phpdoc/en/reference/session/functions/session-register.xml Fri Jun 15 00:15:33 2007 @@ -1,79 +1,77 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.9 $ --> +<!-- $Revision: 1.10 $ --> <!-- splitted from ./en/functions/session.xml, last change in rev 1.2 --> - <refentry id="function.session-register"> - <refnamediv> - <refname>session_register</refname> - <refpurpose> - Register one or more global variables with the current session - </refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <methodsynopsis> - <type>bool</type><methodname>session_register</methodname> - <methodparam><type>mixed</type><parameter>name</parameter></methodparam> - <methodparam choice="opt"><type>mixed</type><parameter>...</parameter></methodparam> - </methodsynopsis> - <para> - <function>session_register</function> accepts a variable number of - arguments, any of which can be either a string holding the name of a - variable or an array consisting of variable names or other arrays. For - each name, <function>session_register</function> registers the global - variable with that name in the current session. - </para> - <caution> - <para> - If you want your script to work regardless of <link - linkend="ini.register-globals">register_globals</link>, - you need to instead use the - <link linkend="reserved.variables.session">$_SESSION</link> array - as <varname>$_SESSION</varname> entries are automatically - registered. If your script uses - <function>session_register</function>, it will not work in - environments where the PHP directive - <link linkend="ini.register-globals">register_globals</link> - is disabled. - </para> - </caution> - - ¬e.registerglobals; - - <caution> - <para> - This registers a <emphasis>global</emphasis> variable. If you - want to register a session variable from within a function, you - need to make sure to make it global using the <link - linkend="language.variables.scope"><command>global</command></link> - keyword or the <varname>$GLOBALS[]</varname> array, or use the - special session arrays as noted below. - </para> - </caution> - <caution> - <para> - If you are using <varname>$_SESSION</varname> - (or <varname>$HTTP_SESSION_VARS</varname>), do not use - <function>session_register</function>, - <function>session_is_registered</function>, and - <function>session_unregister</function>. - </para> - </caution> - <para> - This function returns &true; when all of the variables are successfully - registered with the session. - </para> - <para> - If <function>session_start</function> was not called before this function - is called, an implicit call to <function>session_start</function> with no - parameters will be made. <varname>$_SESSION</varname> does not mimic - this behavior and requires <function>session_start</function> before use. - </para> - <para> - You can also create a session variable by simply setting the - appropriate member of the <varname>$_SESSION</varname> - or <varname>$HTTP_SESSION_VARS</varname> (PHP < 4.1.0) array. - <informalexample> - <programlisting role="php"> +<refentry id="function.session-register"> + <refnamediv> + <refname>session_register</refname> + <refpurpose>Register one or more global variables with the current session</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>bool</type><methodname>session_register</methodname> + <methodparam><type>mixed</type><parameter>name</parameter></methodparam> + <methodparam choice="opt"><type>mixed</type><parameter>...</parameter></methodparam> + </methodsynopsis> + <para> + <function>session_register</function> accepts a variable number of + arguments, any of which can be either a string holding the name of a + variable or an array consisting of variable names or other arrays. For + each name, <function>session_register</function> registers the global + variable with that name in the current session. + </para> + <caution> + <para> + If you want your script to work regardless of <link + linkend="ini.register-globals">register_globals</link>, + you need to instead use the + <link linkend="reserved.variables.session">$_SESSION</link> array + as <varname>$_SESSION</varname> entries are automatically + registered. If your script uses + <function>session_register</function>, it will not work in + environments where the PHP directive + <link linkend="ini.register-globals">register_globals</link> + is disabled. + </para> + </caution> + + ¬e.registerglobals; + + <caution> + <para> + This registers a <emphasis>global</emphasis> variable. If you + want to register a session variable from within a function, you + need to make sure to make it global using the <link + linkend="language.variables.scope"><command>global</command></link> + keyword or the <varname>$GLOBALS[]</varname> array, or use the + special session arrays as noted below. + </para> + </caution> + <caution> + <para> + If you are using <varname>$_SESSION</varname> + (or <varname>$HTTP_SESSION_VARS</varname>), do not use + <function>session_register</function>, + <function>session_is_registered</function>, and + <function>session_unregister</function>. + </para> + </caution> + <para> + This function returns &true; when all of the variables are successfully + registered with the session. + </para> + <para> + If <function>session_start</function> was not called before this function + is called, an implicit call to <function>session_start</function> with no + parameters will be made. <varname>$_SESSION</varname> does not mimic + this behavior and requires <function>session_start</function> before use. + </para> + <para> + You can also create a session variable by simply setting the + appropriate member of the <varname>$_SESSION</varname> + or <varname>$HTTP_SESSION_VARS</varname> (PHP < 4.1.0) array. + <informalexample> + <programlisting role="php"> <![CDATA[ <?php // Use of session_register() is deprecated @@ -87,35 +85,35 @@ $HTTP_SESSION_VARS["spongebob"] = "He's got square pants."; ?> ]]> - </programlisting> - </informalexample> - </para> - <note> - <para> - It is currently impossible to register resource variables in a - session. For example, you cannot create a connection to a - database and store the connection id as a session variable and - expect the connection to still be valid the next time the - session is restored. PHP functions that return a resource are - identified by having a return type of - <literal>resource</literal> in their function definition. A - list of functions that return resources are available in the - <link linkend="resource">resource types</link> appendix. - </para> - <para> - If <varname>$_SESSION</varname> (or - <varname>$HTTP_SESSION_VARS</varname> for PHP 4.0.6 or less) is - used, assign values to - <varname>$_SESSION</varname>. For example: $_SESSION['var'] = 'ABC'; - </para> - </note> - <para> - See also <function>session_is_registered</function>, - <function>session_unregister</function>, and - <link linkend="reserved.variables.session">$_SESSION</link>. - </para> - </refsect1> - </refentry> + </programlisting> + </informalexample> + </para> + <note> + <para> + It is currently impossible to register resource variables in a + session. For example, you cannot create a connection to a + database and store the connection id as a session variable and + expect the connection to still be valid the next time the + session is restored. PHP functions that return a resource are + identified by having a return type of + <literal>resource</literal> in their function definition. A + list of functions that return resources are available in the + <link linkend="resource">resource types</link> appendix. + </para> + <para> + If <varname>$_SESSION</varname> (or + <varname>$HTTP_SESSION_VARS</varname> for PHP 4.0.6 or less) is + used, assign values to + <varname>$_SESSION</varname>. For example: $_SESSION['var'] = 'ABC'; + </para> + </note> + <para> + See also <function>session_is_registered</function>, + <function>session_unregister</function>, and + <link linkend="reserved.variables.session">$_SESSION</link>. + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/session/functions/session-save-path.xml?r1=1.3&r2=1.4&diff_format=u Index: phpdoc/en/reference/session/functions/session-save-path.xml diff -u phpdoc/en/reference/session/functions/session-save-path.xml:1.3 phpdoc/en/reference/session/functions/session-save-path.xml:1.4 --- phpdoc/en/reference/session/functions/session-save-path.xml:1.3 Sun Nov 17 13:52:05 2002 +++ phpdoc/en/reference/session/functions/session-save-path.xml Fri Jun 15 00:15:33 2007 @@ -1,38 +1,38 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <!-- splitted from ./en/functions/session.xml, last change in rev 1.2 --> - <refentry id="function.session-save-path"> - <refnamediv> - <refname>session_save_path</refname> - <refpurpose>Get and/or set the current session save path</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <methodsynopsis> - <type>string</type><methodname>session_save_path</methodname> - <methodparam choice="opt"><type>string</type><parameter>path</parameter></methodparam> - </methodsynopsis> +<refentry id="function.session-save-path"> + <refnamediv> + <refname>session_save_path</refname> + <refpurpose>Get and/or set the current session save path</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>string</type><methodname>session_save_path</methodname> + <methodparam choice="opt"><type>string</type><parameter>path</parameter></methodparam> + </methodsynopsis> + <para> + <function>session_save_path</function> returns the path of the current + directory used to save session data. If <parameter>path</parameter> + is specified, the path to which data is saved will be changed. + <function>session_save_path</function> needs to be called before + <function>session_start</function> for that purpose. + <note> <para> - <function>session_save_path</function> returns the path of the current - directory used to save session data. If <parameter>path</parameter> - is specified, the path to which data is saved will be changed. - <function>session_save_path</function> needs to be called before - <function>session_start</function> for that purpose. - <note> - <para> - On some operating systems, you may want to specify a path on a - filesystem that handles lots of small files efficiently. For - example, on Linux, reiserfs may provide better performance than - ext2fs. - </para> - </note> + On some operating systems, you may want to specify a path on a + filesystem that handles lots of small files efficiently. For + example, on Linux, reiserfs may provide better performance than + ext2fs. </para> - <para> - See also the <link linkend="ini.session.save-path">session.save_path</link> - configuration directive. - </para> - </refsect1> - </refentry> + </note> + </para> + <para> + See also the <link linkend="ini.session.save-path">session.save_path</link> + configuration directive. + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/session/functions/session-set-cookie-params.xml?r1=1.5&r2=1.6&diff_format=u Index: phpdoc/en/reference/session/functions/session-set-cookie-params.xml diff -u phpdoc/en/reference/session/functions/session-set-cookie-params.xml:1.5 phpdoc/en/reference/session/functions/session-set-cookie-params.xml:1.6 --- phpdoc/en/reference/session/functions/session-set-cookie-params.xml:1.5 Fri Aug 11 16:21:54 2006 +++ phpdoc/en/reference/session/functions/session-set-cookie-params.xml Fri Jun 15 00:15:33 2007 @@ -1,47 +1,45 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> +<!-- $Revision: 1.6 $ --> <!-- splitted from ./en/functions/session.xml, last change in rev 1.2 --> - <refentry id="function.session-set-cookie-params"> - <refnamediv> - <refname>session_set_cookie_params</refname> - <refpurpose> - Set the session cookie parameters - </refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <methodsynopsis> - <type>void</type><methodname>session_set_cookie_params</methodname> - <methodparam><type>int</type><parameter>lifetime</parameter></methodparam> - <methodparam choice="opt"><type>string</type><parameter>path</parameter></methodparam> - <methodparam choice="opt"><type>string</type><parameter>domain</parameter></methodparam> - <methodparam choice="opt"><type>bool</type><parameter>secure</parameter></methodparam> - <methodparam choice="opt"><type>bool</type><parameter>httponly</parameter></methodparam> - </methodsynopsis> - <para> - Set cookie parameters defined in the &php.ini; file. The effect of this - function only lasts for the duration of the script. Thus, you need to - call <function>session_set_cookie_params</function> for every request and - before <function>session_start</function> is called. - </para> - <note> - <para> - The <parameter>secure</parameter> parameter was added in PHP - 4.0.4, while the <parameter>httponly</parameter> parameter was added in - PHP 5.2.0. - </para> - </note> - <para> - See also the configuration directives - <link linkend="ini.session.cookie-lifetime">session.cookie_lifetime</link>, - <link linkend="ini.session.cookie-path">session.cookie_path</link>, - <link linkend="ini.session.cookie-domain">session.cookie_domain</link>, - <link linkend="ini.session.cookie-secure">session.cookie_secure</link>, - <link linkend="ini.session.cookie-httponly">session.cookie_httponly</link>, and - <function>session_get_cookie_params</function>. - </para> - </refsect1> - </refentry> +<refentry id="function.session-set-cookie-params"> + <refnamediv> + <refname>session_set_cookie_params</refname> + <refpurpose>Set the session cookie parameters</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>void</type><methodname>session_set_cookie_params</methodname> + <methodparam><type>int</type><parameter>lifetime</parameter></methodparam> + <methodparam choice="opt"><type>string</type><parameter>path</parameter></methodparam> + <methodparam choice="opt"><type>string</type><parameter>domain</parameter></methodparam> + <methodparam choice="opt"><type>bool</type><parameter>secure</parameter></methodparam> + <methodparam choice="opt"><type>bool</type><parameter>httponly</parameter></methodparam> + </methodsynopsis> + <para> + Set cookie parameters defined in the &php.ini; file. The effect of this + function only lasts for the duration of the script. Thus, you need to + call <function>session_set_cookie_params</function> for every request and + before <function>session_start</function> is called. + </para> + <note> + <para> + The <parameter>secure</parameter> parameter was added in PHP + 4.0.4, while the <parameter>httponly</parameter> parameter was added in + PHP 5.2.0. + </para> + </note> + <para> + See also the configuration directives + <link linkend="ini.session.cookie-lifetime">session.cookie_lifetime</link>, + <link linkend="ini.session.cookie-path">session.cookie_path</link>, + <link linkend="ini.session.cookie-domain">session.cookie_domain</link>, + <link linkend="ini.session.cookie-secure">session.cookie_secure</link>, + <link linkend="ini.session.cookie-httponly">session.cookie_httponly</link>, and + <function>session_get_cookie_params</function>. + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/session/functions/session-set-save-handler.xml?r1=1.14&r2=1.15&diff_format=u Index: phpdoc/en/reference/session/functions/session-set-save-handler.xml diff -u phpdoc/en/reference/session/functions/session-set-save-handler.xml:1.14 phpdoc/en/reference/session/functions/session-set-save-handler.xml:1.15 --- phpdoc/en/reference/session/functions/session-set-save-handler.xml:1.14 Wed Sep 6 11:50:00 2006 +++ phpdoc/en/reference/session/functions/session-set-save-handler.xml Fri Jun 15 00:15:33 2007 @@ -1,96 +1,94 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.14 $ --> +<!-- $Revision: 1.15 $ --> <!-- splitted from ./en/functions/session.xml, last change in rev 1.23 --> - <refentry id="function.session-set-save-handler"> - <refnamediv> - <refname>session_set_save_handler</refname> - <refpurpose> - Sets user-level session storage functions - </refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <methodsynopsis> - <type>bool</type><methodname>session_set_save_handler</methodname> - <methodparam><type>callback</type><parameter>open</parameter></methodparam> - <methodparam><type>callback</type><parameter>close</parameter></methodparam> - <methodparam><type>callback</type><parameter>read</parameter></methodparam> - <methodparam><type>callback</type><parameter>write</parameter></methodparam> - <methodparam><type>callback</type><parameter>destroy</parameter></methodparam> - <methodparam><type>callback</type><parameter>gc</parameter></methodparam> - </methodsynopsis> - <para> - <function>session_set_save_handler</function> sets the user-level - session storage functions which are used for storing and - retrieving data associated with a session. This is most useful - when a storage method other than those supplied by PHP sessions - is preferred. i.e. Storing the session data in a local database. - &return.success; - </para> - <note> - <para> - The "write" handler is not executed until after the output - stream is closed. Thus, output from debugging statements in the - "write" handler will never be seen in the browser. If debugging - output is necessary, it is suggested that the debug output be - written to a file instead. - </para> - </note> - <para> - The following example provides file based session - storage similar to the PHP sessions default save handler - <parameter>files</parameter>. This example could easily be - extended to cover database storage using your favorite PHP - supported database engine. - </para> - <para> - Read function must return string value always to make save - handler work as expected. Return empty string if there is no data - to read. Return values from other handlers are converted to - boolean expression. &true; for success, &false; for failure. - </para> - <warning> - <para> - Write and Close handlers are called after destructing objects since PHP - 5.0.5. Thus destructors can use sessions but session handler can't use - objects. In prior versions, they were called in the opposite order. It - is possible to call <function>session_write_close</function> from the - destructor to solve this chicken and egg problem. - </para> - </warning> - <para> - <example> - <title> - <function>session_set_save_handler</function> example - </title> - <programlisting role="php"> +<refentry id="function.session-set-save-handler"> + <refnamediv> + <refname>session_set_save_handler</refname> + <refpurpose>Sets user-level session storage functions</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>bool</type><methodname>session_set_save_handler</methodname> + <methodparam><type>callback</type><parameter>open</parameter></methodparam> + <methodparam><type>callback</type><parameter>close</parameter></methodparam> + <methodparam><type>callback</type><parameter>read</parameter></methodparam> + <methodparam><type>callback</type><parameter>write</parameter></methodparam> + <methodparam><type>callback</type><parameter>destroy</parameter></methodparam> + <methodparam><type>callback</type><parameter>gc</parameter></methodparam> + </methodsynopsis> + <para> + <function>session_set_save_handler</function> sets the user-level + session storage functions which are used for storing and + retrieving data associated with a session. This is most useful + when a storage method other than those supplied by PHP sessions + is preferred. i.e. Storing the session data in a local database. + &return.success; + </para> + <note> + <para> + The "write" handler is not executed until after the output + stream is closed. Thus, output from debugging statements in the + "write" handler will never be seen in the browser. If debugging + output is necessary, it is suggested that the debug output be + written to a file instead. + </para> + </note> + <para> + The following example provides file based session + storage similar to the PHP sessions default save handler + <parameter>files</parameter>. This example could easily be + extended to cover database storage using your favorite PHP + supported database engine. + </para> + <para> + Read function must return string value always to make save + handler work as expected. Return empty string if there is no data + to read. Return values from other handlers are converted to + boolean expression. &true; for success, &false; for failure. + </para> + <warning> + <para> + Write and Close handlers are called after destructing objects since PHP + 5.0.5. Thus destructors can use sessions but session handler can't use + objects. In prior versions, they were called in the opposite order. It + is possible to call <function>session_write_close</function> from the + destructor to solve this chicken and egg problem. + </para> + </warning> + <para> + <example> + <title> + <function>session_set_save_handler</function> example + </title> + <programlisting role="php"> <![CDATA[ <?php -function open($save_path, $session_name) +function open($save_path, $session_name) { global $sess_save_path; - + $sess_save_path = $save_path; return(true); } -function close() +function close() { return(true); } -function read($id) +function read($id) { global $sess_save_path; - + $sess_file = "$sess_save_path/sess_$id"; return (string) @file_get_contents($sess_file); } -function write($id, $sess_data) +function write($id, $sess_data) { global $sess_save_path; - + $sess_file = "$sess_save_path/sess_$id"; if ($fp = @fopen($sess_file, "w")) { $return = fwrite($fp, $sess_data); @@ -102,18 +100,18 @@ } -function destroy($id) +function destroy($id) { global $sess_save_path; - + $sess_file = "$sess_save_path/sess_$id"; return(@unlink($sess_file)); } -function gc($maxlifetime) +function gc($maxlifetime) { global $sess_save_path; - + foreach (glob("$sess_save_path/sess_*") as $filename) { if (filemtime($filename) + $maxlifetime < time()) { @unlink($filename); @@ -130,15 +128,15 @@ ?> ]]> - </programlisting> - </example> - </para> - <para> - See also the <link linkend="ini.session.save-handler">session.save_handler</link> - configuration directive. - </para> - </refsect1> - </refentry> + </programlisting> + </example> + </para> + <para> + See also the <link linkend="ini.session.save-handler">session.save_handler</link> + configuration directive. + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/session/functions/session-start.xml?r1=1.5&r2=1.6&diff_format=u Index: phpdoc/en/reference/session/functions/session-start.xml diff -u phpdoc/en/reference/session/functions/session-start.xml:1.5 phpdoc/en/reference/session/functions/session-start.xml:1.6 --- phpdoc/en/reference/session/functions/session-start.xml:1.5 Wed Jun 11 04:03:58 2003 +++ phpdoc/en/reference/session/functions/session-start.xml Fri Jun 15 00:15:33 2007 @@ -1,36 +1,36 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> +<!-- $Revision: 1.6 $ --> <!-- splitted from ./en/functions/session.xml, last change in rev 1.2 --> - <refentry id="function.session-start"> - <refnamediv> - <refname>session_start</refname> - <refpurpose>Initialize session data</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <methodsynopsis> - <type>bool</type><methodname>session_start</methodname> - <void/> - </methodsynopsis> - <simpara> - <function>session_start</function> creates a session or resumes - the current one based on the current session id that's being - passed via a request, such as GET, POST, or a cookie. - </simpara> - <simpara> - This function always returns &true;. - </simpara> - <note> - <para> - If you are using cookie-based sessions, you must call - <function>session_start</function> before anything is outputted to the - browser. - </para> - </note> - <para> - <example> - <title>A session example: <filename>page1.php</filename></title> - <programlisting role="php"> +<refentry id="function.session-start"> + <refnamediv> + <refname>session_start</refname> + <refpurpose>Initialize session data</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>bool</type><methodname>session_start</methodname> + <void/> + </methodsynopsis> + <simpara> + <function>session_start</function> creates a session or resumes + the current one based on the current session id that's being + passed via a request, such as GET, POST, or a cookie. + </simpara> + <simpara> + This function always returns &true;. + </simpara> + <note> + <para> + If you are using cookie-based sessions, you must call + <function>session_start</function> before anything is outputted to the + browser. + </para> + </note> + <para> + <example> + <title>A session example: <filename>page1.php</filename></title> + <programlisting role="php"> <![CDATA[ <?php // page1.php @@ -50,21 +50,21 @@ echo '<br /><a href="page2.php?' . SID . '">page 2</a>'; ?> ]]> - </programlisting> - </example> - </para> - <para> - After viewing <filename>page1.php</filename>, the second page - <filename>page2.php</filename> will magically contain the session - data. Read the <link linkend="ref.session">session reference</link> - for information on <link linkend="session.idpassing">propagating - session ids</link> as it, for example, explains what the constant - <constant>SID</constant> is all about. - </para> - <para> - <example> - <title>A session example: <filename>page2.php</filename></title> - <programlisting role="php"> + </programlisting> + </example> + </para> + <para> + After viewing <filename>page1.php</filename>, the second page + <filename>page2.php</filename> will magically contain the session + data. Read the <link linkend="ref.session">session reference</link> + for information on <link linkend="session.idpassing">propagating + session ids</link> as it, for example, explains what the constant + <constant>SID</constant> is all about. + </para> + <para> + <example> + <title>A session example: <filename>page2.php</filename></title> + <programlisting role="php"> <![CDATA[ <?php // page2.php @@ -81,44 +81,44 @@ echo '<br /><a href="page1.php">page 1</a>'; ?> ]]> - </programlisting> - </example> - </para> - <simpara> - If you want to use a named session, you must call - <function>session_name</function> before calling - <function>session_start</function>. - </simpara> - <simpara> - <function>session_start</function> will register internal output - handler for URL rewriting when <literal>trans-sid</literal> is - enabled. If a user uses <literal>ob_gzhandler</literal> or like - with <function>ob_start</function>, the order of output handler - is important for proper output. For example, user must register - <literal>ob_gzhandler</literal> before session start. - </simpara> - <note> - <simpara> - Use of <link linkend="ini.zlib.output-compression">zlib.output_compression</link> - is recommended rather than <function>ob_gzhandler</function> - </simpara> - </note> - <note> - <para> - As of PHP 4.3.3, calling <function>session_start</function> while the - session has already been started will result in an error of level - <constant>E_NOTICE</constant>. Also, the second session start will - simply be ignored. - </para> - </note> - <para> - See also - <link linkend="reserved.variables.session">$_SESSION</link>, - <link linkend="ini.session.auto-start">session.auto_start</link>, and - <function>session_id</function>. - </para> - </refsect1> - </refentry> + </programlisting> + </example> + </para> + <simpara> + If you want to use a named session, you must call + <function>session_name</function> before calling + <function>session_start</function>. + </simpara> + <simpara> + <function>session_start</function> will register internal output + handler for URL rewriting when <literal>trans-sid</literal> is + enabled. If a user uses <literal>ob_gzhandler</literal> or like + with <function>ob_start</function>, the order of output handler + is important for proper output. For example, user must register + <literal>ob_gzhandler</literal> before session start. + </simpara> + <note> + <simpara> + Use of <link linkend="ini.zlib.output-compression">zlib.output_compression</link> + is recommended rather than <function>ob_gzhandler</function> + </simpara> + </note> + <note> + <para> + As of PHP 4.3.3, calling <function>session_start</function> while the + session has already been started will result in an error of level + <constant>E_NOTICE</constant>. Also, the second session start will + simply be ignored. + </para> + </note> + <para> + See also + <link linkend="reserved.variables.session">$_SESSION</link>, + <link linkend="ini.session.auto-start">session.auto_start</link>, and + <function>session_id</function>. + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/session/functions/session-unregister.xml?r1=1.5&r2=1.6&diff_format=u Index: phpdoc/en/reference/session/functions/session-unregister.xml diff -u phpdoc/en/reference/session/functions/session-unregister.xml:1.5 phpdoc/en/reference/session/functions/session-unregister.xml:1.6 --- phpdoc/en/reference/session/functions/session-unregister.xml:1.5 Mon May 19 12:09:26 2003 +++ phpdoc/en/reference/session/functions/session-unregister.xml Fri Jun 15 00:15:33 2007 @@ -1,57 +1,55 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> +<!-- $Revision: 1.6 $ --> <!-- splitted from ./en/functions/session.xml, last change in rev 1.2 --> - <refentry id="function.session-unregister"> - <refnamediv> - <refname>session_unregister</refname> - <refpurpose> - Unregister a global variable from the current session - </refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <methodsynopsis> - <type>bool</type><methodname>session_unregister</methodname> - <methodparam><type>string</type><parameter>name</parameter></methodparam> - </methodsynopsis> - <para> - <function>session_unregister</function> unregisters - the global variable named <parameter>name</parameter> from the - current session. - </para> - <para> - This function returns &true; when the variable is successfully - unregistered from the session. - </para> - <note> - <para> - If <varname>$_SESSION</varname> (or - <varname>$HTTP_SESSION_VARS</varname> for PHP 4.0.6 or less) is - used, use <function>unset</function> to unregister a session - variable. Do not <function>unset</function> <varname>$_SESSION</varname> - itself as this will disable the special function of the - <varname>$_SESSION</varname> superglobal. - </para> - </note> - <caution> - <para> - This function does not unset the corresponding global variable for - <parameter>name</parameter>, it only prevents the variable from being - saved as part of the session. You must call <function>unset</function> - to remove the corresponding global variable. - </para> - </caution> - <caution> - <para> - If you are using - <varname>$_SESSION</varname> (or <varname>$HTTP_SESSION_VARS</varname>), - do not use <function>session_register</function>, - <function>session_is_registered</function> and - <function>session_unregister</function>. - </para> - </caution> - </refsect1> - </refentry> +<refentry id="function.session-unregister"> + <refnamediv> + <refname>session_unregister</refname> + <refpurpose>Unregister a global variable from the current session</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>bool</type><methodname>session_unregister</methodname> + <methodparam><type>string</type><parameter>name</parameter></methodparam> + </methodsynopsis> + <para> + <function>session_unregister</function> unregisters + the global variable named <parameter>name</parameter> from the + current session. + </para> + <para> + This function returns &true; when the variable is successfully + unregistered from the session. + </para> + <note> + <para> + If <varname>$_SESSION</varname> (or + <varname>$HTTP_SESSION_VARS</varname> for PHP 4.0.6 or less) is + used, use <function>unset</function> to unregister a session + variable. Do not <function>unset</function> <varname>$_SESSION</varname> + itself as this will disable the special function of the + <varname>$_SESSION</varname> superglobal. + </para> + </note> + <caution> + <para> + This function does not unset the corresponding global variable for + <parameter>name</parameter>, it only prevents the variable from being + saved as part of the session. You must call <function>unset</function> + to remove the corresponding global variable. + </para> + </caution> + <caution> + <para> + If you are using + <varname>$_SESSION</varname> (or <varname>$HTTP_SESSION_VARS</varname>), + do not use <function>session_register</function>, + <function>session_is_registered</function> and + <function>session_unregister</function>. + </para> + </caution> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/session/functions/session-unset.xml?r1=1.8&r2=1.9&diff_format=u Index: phpdoc/en/reference/session/functions/session-unset.xml diff -u phpdoc/en/reference/session/functions/session-unset.xml:1.8 phpdoc/en/reference/session/functions/session-unset.xml:1.9 --- phpdoc/en/reference/session/functions/session-unset.xml:1.8 Wed Oct 29 09:29:24 2003 +++ phpdoc/en/reference/session/functions/session-unset.xml Fri Jun 15 00:15:33 2007 @@ -1,43 +1,41 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.8 $ --> +<!-- $Revision: 1.9 $ --> <!-- splitted from ./en/functions/session.xml, last change in rev 1.8 --> - <refentry id="function.session-unset"> - <refnamediv> - <refname>session_unset</refname> - <refpurpose> - Free all session variables - </refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <methodsynopsis> - <type>void</type><methodname>session_unset</methodname> - <void/> - </methodsynopsis> +<refentry id="function.session-unset"> + <refnamediv> + <refname>session_unset</refname> + <refpurpose>Free all session variables</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>void</type><methodname>session_unset</methodname> + <void/> + </methodsynopsis> + <para> + The <function>session_unset</function> function frees all session variables + currently registered. + </para> + <note> + <para> + If <varname>$_SESSION</varname> (or + <varname>$HTTP_SESSION_VARS</varname> for PHP 4.0.6 or less) is + used, use <function>unset</function> to unregister a session + variable, i.e. <literal>unset ($_SESSION['varname']);</literal>. + </para> + </note> + <para> + <caution> <para> - The <function>session_unset</function> function frees all session variables - currently registered. + Do NOT unset the whole <varname>$_SESSION</varname> with + <literal>unset($_SESSION)</literal> as this will disable the + registering of session variables through the + <varname>$_SESSION</varname> superglobal. </para> - <note> - <para> - If <varname>$_SESSION</varname> (or - <varname>$HTTP_SESSION_VARS</varname> for PHP 4.0.6 or less) is - used, use <function>unset</function> to unregister a session - variable, i.e. <literal>unset ($_SESSION['varname']);</literal>. - </para> - </note> - <para> - <caution> - <para> - Do NOT unset the whole <varname>$_SESSION</varname> with - <literal>unset($_SESSION)</literal> as this will disable the - registering of session variables through the - <varname>$_SESSION</varname> superglobal. - </para> - </caution> - </para> - </refsect1> - </refentry> + </caution> + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/session/functions/session-write-close.xml?r1=1.2&r2=1.3&diff_format=u Index: phpdoc/en/reference/session/functions/session-write-close.xml diff -u phpdoc/en/reference/session/functions/session-write-close.xml:1.2 phpdoc/en/reference/session/functions/session-write-close.xml:1.3 --- phpdoc/en/reference/session/functions/session-write-close.xml:1.2 Wed Apr 17 06:44:00 2002 +++ phpdoc/en/reference/session/functions/session-write-close.xml Fri Jun 15 00:15:33 2007 @@ -1,37 +1,32 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <!-- splitted from ./en/functions/session.xml, last change in rev 1.38 --> - <refentry id="function.session-write-close"> - <refnamediv> - <refname>session_write_close</refname> - <refpurpose>Write session data and end session</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <methodsynopsis> - <type>void</type><methodname>session_write_close</methodname> - <void/> - </methodsynopsis> - <para> - End the current session and store session data. - </para> - <para> - Session data is usually stored after your script terminated - without the need to call <function>session_write_close</function>, but as - session data is locked to prevent concurrent writes only one - script may operate on a session at any time. When using framesets - together with sessions you will experience the frames loading one - by one due to this locking. You can reduce the time needed to - load all the frames by ending the session as soon as all changes - to session variables are done. - </para> -<!-- commented out until final decision on implementation - <para> - See also: <function>session_readonly</function>. - </para> ---> - </refsect1> - </refentry> +<refentry id="function.session-write-close"> + <refnamediv> + <refname>session_write_close</refname> + <refpurpose>Write session data and end session</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>void</type><methodname>session_write_close</methodname> + <void/> + </methodsynopsis> + <para> + End the current session and store session data. + </para> + <para> + Session data is usually stored after your script terminated + without the need to call <function>session_write_close</function>, but as + session data is locked to prevent concurrent writes only one + script may operate on a session at any time. When using framesets + together with sessions you will experience the frames loading one + by one due to this locking. You can reduce the time needed to + load all the frames by ending the session as soon as all changes + to session variables are done. + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables:
http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/session/functions/session-cache-expire.xml?r1=1.7&r2=1.8&diff_format=u Index: phpdoc/en/reference/session/functions/session-cache-expire.xml diff -u phpdoc/en/reference/session/functions/session-cache-expire.xml:1.7 phpdoc/en/reference/session/functions/session-cache-expire.xml:1.8 --- phpdoc/en/reference/session/functions/session-cache-expire.xml:1.7 Wed May 19 08:24:55 2004 +++ phpdoc/en/reference/session/functions/session-cache-expire.xml Fri Jun 15 00:15:33 2007 @@ -1,33 +1,33 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.7 $ --> +<!-- $Revision: 1.8 $ --> <!-- splitted from ./en/functions/session.xml, last change in rev 1.38 --> - <refentry id='function.session-cache-expire'> - <refnamediv> - <refname>session_cache_expire</refname> - <refpurpose>Return current cache expire</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <methodsynopsis> - <type>int</type><methodname>session_cache_expire</methodname> - <methodparam choice="opt"><type>int</type><parameter>new_cache_expire</parameter></methodparam> - </methodsynopsis> - <para> - <function>session_cache_expire</function> returns the current setting of - <literal>session.cache_expire</literal>. The value returned should be read - in minutes, defaults to 180. If <parameter>new_cache_expire</parameter> - is given, the current cache expire is replaced with - <parameter>new_cache_expire</parameter>. - </para> - <para> - The cache expire is reset to the default value of 180 stored in - <literal>session.cache_limiter</literal> at request startup time. Thus, - you need to call <function>session_cache_expire</function> for every - request (and before <function>session_start</function> is called). - </para> - <example> - <title><function>session_cache_expire</function> example</title> - <programlisting role="php"> +<refentry id='function.session-cache-expire'> + <refnamediv> + <refname>session_cache_expire</refname> + <refpurpose>Return current cache expire</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>int</type><methodname>session_cache_expire</methodname> + <methodparam choice="opt"><type>int</type><parameter>new_cache_expire</parameter></methodparam> + </methodsynopsis> + <para> + <function>session_cache_expire</function> returns the current setting of + <literal>session.cache_expire</literal>. The value returned should be read + in minutes, defaults to 180. If <parameter>new_cache_expire</parameter> + is given, the current cache expire is replaced with + <parameter>new_cache_expire</parameter>. + </para> + <para> + The cache expire is reset to the default value of 180 stored in + <literal>session.cache_limiter</literal> at request startup time. Thus, + you need to call <function>session_cache_expire</function> for every + request (and before <function>session_start</function> is called). + </para> + <example> + <title><function>session_cache_expire</function> example</title> + <programlisting role="php"> <![CDATA[ <?php @@ -48,22 +48,22 @@ echo "The cached session pages expire after $cache_expire minutes"; ?> ]]> - </programlisting> - </example> - <note> - <simpara> - Setting <parameter>new_cache_expire</parameter> is of value only, if - <literal>session.cache_limiter</literal> is set to a value - <emphasis>different</emphasis> from <literal>nocache</literal>. - </simpara> - </note> - <para> - See also the configuration settings <link linkend="ini.session.cache-expire"> - session.cache_expire</link>, <link linkend="ini.session.cache-limiter"> - session.cache_limiter</link> and <function>session_cache_limiter</function>. - </para> - </refsect1> - </refentry> + </programlisting> + </example> + <note> + <simpara> + Setting <parameter>new_cache_expire</parameter> is of value only, if + <literal>session.cache_limiter</literal> is set to a value + <emphasis>different</emphasis> from <literal>nocache</literal>. + </simpara> + </note> + <para> + See also the configuration settings <link linkend="ini.session.cache-expire"> + session.cache_expire</link>, <link linkend="ini.session.cache-limiter"> + session.cache_limiter</link> and <function>session_cache_limiter</function>. + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/session/functions/session-cache-limiter.xml?r1=1.6&r2=1.7&diff_format=u Index: phpdoc/en/reference/session/functions/session-cache-limiter.xml diff -u phpdoc/en/reference/session/functions/session-cache-limiter.xml:1.6 phpdoc/en/reference/session/functions/session-cache-limiter.xml:1.7 --- phpdoc/en/reference/session/functions/session-cache-limiter.xml:1.6 Wed May 19 08:26:55 2004 +++ phpdoc/en/reference/session/functions/session-cache-limiter.xml Fri Jun 15 00:15:33 2007 @@ -1,54 +1,54 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.6 $ --> +<!-- $Revision: 1.7 $ --> <!-- splitted from ./en/functions/session.xml, last change in rev 1.62 --> - <refentry id="function.session-cache-limiter"> - <refnamediv> - <refname>session_cache_limiter</refname> - <refpurpose>Get and/or set the current cache limiter</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <methodsynopsis> - <type>string</type><methodname>session_cache_limiter</methodname> - <methodparam choice="opt"><type>string</type><parameter>cache_limiter</parameter></methodparam> - </methodsynopsis> - <para> - <function>session_cache_limiter</function> returns the name of the - current cache limiter. If <parameter>cache_limiter</parameter> - is specified, the name of the current cache limiter is changed to the - new value. - </para> - <para> - The cache limiter defines which cache control HTTP headers are sent to - the client. These headers determine the rules by which the page content - may be cached by the client and intermediate proxies. Setting the cache - limiter to <literal>nocache</literal> disallows any client/proxy caching. - A value of <literal>public</literal> permits caching by proxies and the - client, whereas <literal>private</literal> disallows caching by proxies - and permits the client to cache the contents. - </para> - <para> - In <literal>private</literal> mode, the Expire header sent to the - client may cause confusion for some browsers, including Mozilla. - You can avoid this problem by using - <literal>private_no_expire</literal> mode. The expire header is never - sent to the client in this mode. - </para> - <note> - <para> - <literal>private_no_expire</literal> was added in PHP 4.2.0. - </para> - </note> - <para> - The cache limiter is reset to the default value stored in - <link linkend="ini.session.cache-limiter">session.cache_limiter</link> - at request startup time. Thus, you need to call - <function>session_cache_limiter</function> for every - request (and before <function>session_start</function> is called). - </para> - <example> - <title><function>session_cache_limiter</function> example</title> - <programlisting role="php"> +<refentry id="function.session-cache-limiter"> + <refnamediv> + <refname>session_cache_limiter</refname> + <refpurpose>Get and/or set the current cache limiter</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>string</type><methodname>session_cache_limiter</methodname> + <methodparam choice="opt"><type>string</type><parameter>cache_limiter</parameter></methodparam> + </methodsynopsis> + <para> + <function>session_cache_limiter</function> returns the name of the + current cache limiter. If <parameter>cache_limiter</parameter> + is specified, the name of the current cache limiter is changed to the + new value. + </para> + <para> + The cache limiter defines which cache control HTTP headers are sent to + the client. These headers determine the rules by which the page content + may be cached by the client and intermediate proxies. Setting the cache + limiter to <literal>nocache</literal> disallows any client/proxy caching. + A value of <literal>public</literal> permits caching by proxies and the + client, whereas <literal>private</literal> disallows caching by proxies + and permits the client to cache the contents. + </para> + <para> + In <literal>private</literal> mode, the Expire header sent to the + client may cause confusion for some browsers, including Mozilla. + You can avoid this problem by using + <literal>private_no_expire</literal> mode. The expire header is never + sent to the client in this mode. + </para> + <note> + <para> + <literal>private_no_expire</literal> was added in PHP 4.2.0. + </para> + </note> + <para> + The cache limiter is reset to the default value stored in + <link linkend="ini.session.cache-limiter">session.cache_limiter</link> + at request startup time. Thus, you need to call + <function>session_cache_limiter</function> for every + request (and before <function>session_start</function> is called). + </para> + <example> + <title><function>session_cache_limiter</function> example</title> + <programlisting role="php"> <![CDATA[ <?php @@ -60,14 +60,14 @@ echo "The cache limiter is now set to $cache_limiter<br />"; ?> ]]> - </programlisting> - </example> - <para> - Also see the <link linkend="ini.session.cache-limiter">session.cache_limiter</link> - configuration directive. - </para> - </refsect1> - </refentry> + </programlisting> + </example> + <para> + Also see the <link linkend="ini.session.cache-limiter">session.cache_limiter</link> + configuration directive. + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/session/functions/session-decode.xml?r1=1.4&r2=1.5&diff_format=u Index: phpdoc/en/reference/session/functions/session-decode.xml diff -u phpdoc/en/reference/session/functions/session-decode.xml:1.4 phpdoc/en/reference/session/functions/session-decode.xml:1.5 --- phpdoc/en/reference/session/functions/session-decode.xml:1.4 Tue Jan 28 04:06:26 2003 +++ phpdoc/en/reference/session/functions/session-decode.xml Fri Jun 15 00:15:33 2007 @@ -1,28 +1,28 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <!-- splitted from ./en/functions/session.xml, last change in rev 1.2 --> - <refentry id="function.session-decode"> - <refnamediv> - <refname>session_decode</refname> - <refpurpose>Decodes session data from a string</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <methodsynopsis> - <type>bool</type><methodname>session_decode</methodname> - <methodparam><type>string</type><parameter>data</parameter></methodparam> - </methodsynopsis> - <para> - <function>session_decode</function> decodes the session data in - <parameter>data</parameter>, setting variables stored in the - session. - </para> - <para> - See also - <function>session_encode</function>. - </para> - </refsect1> - </refentry> +<refentry id="function.session-decode"> + <refnamediv> + <refname>session_decode</refname> + <refpurpose>Decodes session data from a string</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>bool</type><methodname>session_decode</methodname> + <methodparam><type>string</type><parameter>data</parameter></methodparam> + </methodsynopsis> + <para> + <function>session_decode</function> decodes the session data in + <parameter>data</parameter>, setting variables stored in the + session. + </para> + <para> + See also + <function>session_encode</function>. + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/session/functions/session-destroy.xml?r1=1.4&r2=1.5&diff_format=u Index: phpdoc/en/reference/session/functions/session-destroy.xml diff -u phpdoc/en/reference/session/functions/session-destroy.xml:1.4 phpdoc/en/reference/session/functions/session-destroy.xml:1.5 --- phpdoc/en/reference/session/functions/session-destroy.xml:1.4 Sat Sep 4 14:14:25 2004 +++ phpdoc/en/reference/session/functions/session-destroy.xml Fri Jun 15 00:15:33 2007 @@ -1,36 +1,36 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <!-- splitted from ./en/functions/session.xml, last change in rev 1.2 --> - <refentry id="function.session-destroy"> - <refnamediv> - <refname>session_destroy</refname> - <refpurpose>Destroys all data registered to a session</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <methodsynopsis> - <type>bool</type><methodname>session_destroy</methodname> - <void/> - </methodsynopsis> - <simpara> - <function>session_destroy</function> destroys all of the data - associated with the current session. It does not unset any of - the global variables associated with the session, or unset the - session cookie. - </simpara> - <para> - In order to kill the session altogether, like to log the user out, the - session id must also be unset. If a cookie is used to propagate the - session id (default behavior), then the session cookie must be deleted. - <function>setcookie</function> may be used for that. - </para> - <simpara> - &return.success; - </simpara> - <para> - <example> - <title>Destroying a session with <varname>$_SESSION</varname></title> - <programlisting role="php"> +<refentry id="function.session-destroy"> + <refnamediv> + <refname>session_destroy</refname> + <refpurpose>Destroys all data registered to a session</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>bool</type><methodname>session_destroy</methodname> + <void/> + </methodsynopsis> + <simpara> + <function>session_destroy</function> destroys all of the data + associated with the current session. It does not unset any of + the global variables associated with the session, or unset the + session cookie. + </simpara> + <para> + In order to kill the session altogether, like to log the user out, the + session id must also be unset. If a cookie is used to propagate the + session id (default behavior), then the session cookie must be deleted. + <function>setcookie</function> may be used for that. + </para> + <simpara> + &return.success; + </simpara> + <para> + <example> + <title>Destroying a session with <varname>$_SESSION</varname></title> + <programlisting role="php"> <![CDATA[ <?php // Initialize the session. @@ -50,22 +50,22 @@ session_destroy(); ?> ]]> - </programlisting> - </example> - </para> - <note> - <para> - Only use <function>session_unset</function> for older deprecated code - that does not use <varname>$_SESSION</varname>. - </para> - </note> - <para> - See also - <function>unset</function> and - <function>setcookie</function>. - </para> - </refsect1> - </refentry> + </programlisting> + </example> + </para> + <note> + <para> + Only use <function>session_unset</function> for older deprecated code + that does not use <varname>$_SESSION</varname>. + </para> + </note> + <para> + See also + <function>unset</function> and + <function>setcookie</function>. + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/session/functions/session-encode.xml?r1=1.3&r2=1.4&diff_format=u Index: phpdoc/en/reference/session/functions/session-encode.xml diff -u phpdoc/en/reference/session/functions/session-encode.xml:1.3 phpdoc/en/reference/session/functions/session-encode.xml:1.4 --- phpdoc/en/reference/session/functions/session-encode.xml:1.3 Sun Jan 19 02:41:21 2003 +++ phpdoc/en/reference/session/functions/session-encode.xml Fri Jun 15 00:15:33 2007 @@ -1,29 +1,27 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <!-- splitted from ./en/functions/session.xml, last change in rev 1.2 --> - <refentry id="function.session-encode"> - <refnamediv> - <refname>session_encode</refname> - <refpurpose> - Encodes the current session data as a string - </refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <methodsynopsis> - <type>string</type><methodname>session_encode</methodname> - <void/> - </methodsynopsis> - <para> - <function>session_encode</function> returns a string with the - contents of the current session encoded within. - </para> - <para> - See also - <function>session_decode</function> - </para> - </refsect1> - </refentry> +<refentry id="function.session-encode"> + <refnamediv> + <refname>session_encode</refname> + <refpurpose>Encodes the current session data as a string</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>string</type><methodname>session_encode</methodname> + <void/> + </methodsynopsis> + <para> + <function>session_encode</function> returns a string with the + contents of the current session encoded within. + </para> + <para> + See also + <function>session_decode</function> + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/session/functions/session-get-cookie-params.xml?r1=1.5&r2=1.6&diff_format=u Index: phpdoc/en/reference/session/functions/session-get-cookie-params.xml diff -u phpdoc/en/reference/session/functions/session-get-cookie-params.xml:1.5 phpdoc/en/reference/session/functions/session-get-cookie-params.xml:1.6 --- phpdoc/en/reference/session/functions/session-get-cookie-params.xml:1.5 Fri Aug 11 16:21:54 2006 +++ phpdoc/en/reference/session/functions/session-get-cookie-params.xml Fri Jun 15 00:15:33 2007 @@ -1,64 +1,62 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> +<!-- $Revision: 1.6 $ --> <!-- splitted from ./en/functions/session.xml, last change in rev 1.8 --> - <refentry id="function.session-get-cookie-params"> - <refnamediv> - <refname>session_get_cookie_params</refname> - <refpurpose> - Get the session cookie parameters - </refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <methodsynopsis> - <type>array</type><methodname>session_get_cookie_params</methodname> - <void/> - </methodsynopsis> - <para> - The <function>session_get_cookie_params</function> function returns an - array with the current session cookie information, the array contains - the following items: - <itemizedlist> - <listitem> - <simpara> - "lifetime" - The lifetime of the cookie in seconds. - </simpara> - </listitem> - <listitem> - <simpara> - "path" - The path where information is stored. - </simpara> - </listitem> - <listitem> - <simpara> - "domain" - The domain of the cookie. - </simpara> - </listitem> - <listitem> - <simpara> - "secure" - The cookie should only be sent over secure connections. - (This item was added in PHP 4.0.4.) - </simpara> - </listitem> - <listitem> - <simpara> - "httponly" - The cookie can only be accessed through the HTTP protocol - (This item was added in PHP 5.2.0). - </simpara> - </listitem> - </itemizedlist> - </para> - <para> - See also the configuration directives - <link linkend="ini.session.cookie-lifetime">session.cookie_lifetime</link>, - <link linkend="ini.session.cookie-path">session.cookie_path</link>, - <link linkend="ini.session.cookie-domain">session.cookie_domain</link>, - <link linkend="ini.session.cookie-secure">session.cookie_secure</link>, - <link linkend="ini.session.cookie-httponly">session.cookie_httponly</link>, and - <function>session_set_cookie_params</function>. - </para> - </refsect1> - </refentry> +<refentry id="function.session-get-cookie-params"> + <refnamediv> + <refname>session_get_cookie_params</refname> + <refpurpose>Get the session cookie parameters</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>array</type><methodname>session_get_cookie_params</methodname> + <void/> + </methodsynopsis> + <para> + The <function>session_get_cookie_params</function> function returns an + array with the current session cookie information, the array contains + the following items: + <itemizedlist> + <listitem> + <simpara> + "lifetime" - The lifetime of the cookie in seconds. + </simpara> + </listitem> + <listitem> + <simpara> + "path" - The path where information is stored. + </simpara> + </listitem> + <listitem> + <simpara> + "domain" - The domain of the cookie. + </simpara> + </listitem> + <listitem> + <simpara> + "secure" - The cookie should only be sent over secure connections. + (This item was added in PHP 4.0.4.) + </simpara> + </listitem> + <listitem> + <simpara> + "httponly" - The cookie can only be accessed through the HTTP protocol + (This item was added in PHP 5.2.0). + </simpara> + </listitem> + </itemizedlist> + </para> + <para> + See also the configuration directives + <link linkend="ini.session.cookie-lifetime">session.cookie_lifetime</link>, + <link linkend="ini.session.cookie-path">session.cookie_path</link>, + <link linkend="ini.session.cookie-domain">session.cookie_domain</link>, + <link linkend="ini.session.cookie-secure">session.cookie_secure</link>, + <link linkend="ini.session.cookie-httponly">session.cookie_httponly</link>, and + <function>session_set_cookie_params</function>. + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/session/functions/session-is-registered.xml?r1=1.4&r2=1.5&diff_format=u Index: phpdoc/en/reference/session/functions/session-is-registered.xml diff -u phpdoc/en/reference/session/functions/session-is-registered.xml:1.4 phpdoc/en/reference/session/functions/session-is-registered.xml:1.5 --- phpdoc/en/reference/session/functions/session-is-registered.xml:1.4 Tue Dec 17 10:30:05 2002 +++ phpdoc/en/reference/session/functions/session-is-registered.xml Fri Jun 15 00:15:33 2007 @@ -1,43 +1,41 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <!-- splitted from ./en/functions/session.xml, last change in rev 1.8 --> - <refentry id="function.session-is-registered"> - <refnamediv> - <refname>session_is_registered</refname> - <refpurpose> - Find out whether a global variable is registered in a session - </refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <methodsynopsis> - <type>bool</type><methodname>session_is_registered</methodname> - <methodparam><type>string</type><parameter>name</parameter></methodparam> - </methodsynopsis> - <para> - <function>session_is_registered</function> returns &true; if there - is a global variable with the name <parameter>name</parameter> - registered in the current session. - </para> - <note> - <para> - If <varname>$_SESSION</varname> (or - <varname>$HTTP_SESSION_VARS</varname> for PHP 4.0.6 or less) is - used, use <function>isset</function> to check a variable is - registered in <varname>$_SESSION</varname>. - </para> - </note> - <caution> - <para> - If you are using - <varname>$_SESSION</varname> (or <varname>$HTTP_SESSION_VARS</varname>), - do not use <function>session_register</function>, - <function>session_is_registered</function> and - <function>session_unregister</function>. - </para> - </caution> - </refsect1> - </refentry> +<refentry id="function.session-is-registered"> + <refnamediv> + <refname>session_is_registered</refname> + <refpurpose>Find out whether a global variable is registered in a session</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>bool</type><methodname>session_is_registered</methodname> + <methodparam><type>string</type><parameter>name</parameter></methodparam> + </methodsynopsis> + <para> + <function>session_is_registered</function> returns &true; if there + is a global variable with the name <parameter>name</parameter> + registered in the current session. + </para> + <note> + <para> + If <varname>$_SESSION</varname> (or + <varname>$HTTP_SESSION_VARS</varname> for PHP 4.0.6 or less) is + used, use <function>isset</function> to check a variable is + registered in <varname>$_SESSION</varname>. + </para> + </note> + <caution> + <para> + If you are using + <varname>$_SESSION</varname> (or <varname>$HTTP_SESSION_VARS</varname>), + do not use <function>session_register</function>, + <function>session_is_registered</function> and + <function>session_unregister</function>. + </para> + </caution> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/session/functions/session-module-name.xml?r1=1.2&r2=1.3&diff_format=u Index: phpdoc/en/reference/session/functions/session-module-name.xml diff -u phpdoc/en/reference/session/functions/session-module-name.xml:1.2 phpdoc/en/reference/session/functions/session-module-name.xml:1.3 --- phpdoc/en/reference/session/functions/session-module-name.xml:1.2 Wed Apr 17 06:43:59 2002 +++ phpdoc/en/reference/session/functions/session-module-name.xml Fri Jun 15 00:15:33 2007 @@ -1,24 +1,24 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <!-- splitted from ./en/functions/session.xml, last change in rev 1.2 --> - <refentry id="function.session-module-name"> - <refnamediv> - <refname>session_module_name</refname> - <refpurpose>Get and/or set the current session module</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <methodsynopsis> - <type>string</type><methodname>session_module_name</methodname> - <methodparam choice="opt"><type>string</type><parameter>module</parameter></methodparam> - </methodsynopsis> - <para> - <function>session_module_name</function> returns the name of the - current session module. If <parameter>module</parameter> is - specified, that module will be used instead. - </para> - </refsect1> - </refentry> +<refentry id="function.session-module-name"> + <refnamediv> + <refname>session_module_name</refname> + <refpurpose>Get and/or set the current session module</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>string</type><methodname>session_module_name</methodname> + <methodparam choice="opt"><type>string</type><parameter>module</parameter></methodparam> + </methodsynopsis> + <para> + <function>session_module_name</function> returns the name of the + current session module. If <parameter>module</parameter> is + specified, that module will be used instead. + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/session/functions/session-name.xml?r1=1.6&r2=1.7&diff_format=u Index: phpdoc/en/reference/session/functions/session-name.xml diff -u phpdoc/en/reference/session/functions/session-name.xml:1.6 phpdoc/en/reference/session/functions/session-name.xml:1.7 --- phpdoc/en/reference/session/functions/session-name.xml:1.6 Sun Dec 18 16:29:30 2005 +++ phpdoc/en/reference/session/functions/session-name.xml Fri Jun 15 00:15:33 2007 @@ -1,41 +1,41 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.6 $ --> +<!-- $Revision: 1.7 $ --> <!-- splitted from ./en/functions/session.xml, last change in rev 1.2 --> - <refentry id="function.session-name"> - <refnamediv> - <refname>session_name</refname> - <refpurpose>Get and/or set the current session name</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <methodsynopsis> - <type>string</type><methodname>session_name</methodname> - <methodparam choice="opt"><type>string</type><parameter>name</parameter></methodparam> - </methodsynopsis> - <para> - <function>session_name</function> returns the name of the current - session. If <parameter>name</parameter> is specified, the name of - the current session is changed to its value. - </para> - <para> - The session name references the session id in cookies and - URLs. It should contain only alphanumeric characters; it should - be short and descriptive (i.e. for users with enabled cookie - warnings). The session name is reset to the default value - stored in <literal>session.name</literal> at request startup - time. Thus, you need to call <function>session_name</function> - for every request (and before <function>session_start</function> - or <function>session_register</function> are called). - </para> - <warning> - <para> - The session name can't consist of digits only, at least one letter must - be present. Otherwise a new session id is generated every time. - </para> - </warning> - <example> - <title><function>session_name</function> examples</title> - <programlisting role="php"> +<refentry id="function.session-name"> + <refnamediv> + <refname>session_name</refname> + <refpurpose>Get and/or set the current session name</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>string</type><methodname>session_name</methodname> + <methodparam choice="opt"><type>string</type><parameter>name</parameter></methodparam> + </methodsynopsis> + <para> + <function>session_name</function> returns the name of the current + session. If <parameter>name</parameter> is specified, the name of + the current session is changed to its value. + </para> + <para> + The session name references the session id in cookies and + URLs. It should contain only alphanumeric characters; it should + be short and descriptive (i.e. for users with enabled cookie + warnings). The session name is reset to the default value + stored in <literal>session.name</literal> at request startup + time. Thus, you need to call <function>session_name</function> + for every request (and before <function>session_start</function> + or <function>session_register</function> are called). + </para> + <warning> + <para> + The session name can't consist of digits only, at least one letter must + be present. Otherwise a new session id is generated every time. + </para> + </warning> + <example> + <title><function>session_name</function> examples</title> + <programlisting role="php"> <![CDATA[ <?php @@ -46,14 +46,14 @@ echo "The previous session name was $previous_name<br />"; ?> ]]> - </programlisting> - </example> - <para> - See also the <link linkend="ini.session.name">session.name</link> - configuration directive. - </para> - </refsect1> - </refentry> + </programlisting> + </example> + <para> + See also the <link linkend="ini.session.name">session.name</link> + configuration directive. + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/session/functions/session-register.xml?r1=1.9&r2=1.10&diff_format=u Index: phpdoc/en/reference/session/functions/session-register.xml diff -u phpdoc/en/reference/session/functions/session-register.xml:1.9 phpdoc/en/reference/session/functions/session-register.xml:1.10 --- phpdoc/en/reference/session/functions/session-register.xml:1.9 Wed Jun 11 04:38:52 2003 +++ phpdoc/en/reference/session/functions/session-register.xml Fri Jun 15 00:15:33 2007 @@ -1,79 +1,77 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.9 $ --> +<!-- $Revision: 1.10 $ --> <!-- splitted from ./en/functions/session.xml, last change in rev 1.2 --> - <refentry id="function.session-register"> - <refnamediv> - <refname>session_register</refname> - <refpurpose> - Register one or more global variables with the current session - </refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <methodsynopsis> - <type>bool</type><methodname>session_register</methodname> - <methodparam><type>mixed</type><parameter>name</parameter></methodparam> - <methodparam choice="opt"><type>mixed</type><parameter>...</parameter></methodparam> - </methodsynopsis> - <para> - <function>session_register</function> accepts a variable number of - arguments, any of which can be either a string holding the name of a - variable or an array consisting of variable names or other arrays. For - each name, <function>session_register</function> registers the global - variable with that name in the current session. - </para> - <caution> - <para> - If you want your script to work regardless of <link - linkend="ini.register-globals">register_globals</link>, - you need to instead use the - <link linkend="reserved.variables.session">$_SESSION</link> array - as <varname>$_SESSION</varname> entries are automatically - registered. If your script uses - <function>session_register</function>, it will not work in - environments where the PHP directive - <link linkend="ini.register-globals">register_globals</link> - is disabled. - </para> - </caution> - - ¬e.registerglobals; - - <caution> - <para> - This registers a <emphasis>global</emphasis> variable. If you - want to register a session variable from within a function, you - need to make sure to make it global using the <link - linkend="language.variables.scope"><command>global</command></link> - keyword or the <varname>$GLOBALS[]</varname> array, or use the - special session arrays as noted below. - </para> - </caution> - <caution> - <para> - If you are using <varname>$_SESSION</varname> - (or <varname>$HTTP_SESSION_VARS</varname>), do not use - <function>session_register</function>, - <function>session_is_registered</function>, and - <function>session_unregister</function>. - </para> - </caution> - <para> - This function returns &true; when all of the variables are successfully - registered with the session. - </para> - <para> - If <function>session_start</function> was not called before this function - is called, an implicit call to <function>session_start</function> with no - parameters will be made. <varname>$_SESSION</varname> does not mimic - this behavior and requires <function>session_start</function> before use. - </para> - <para> - You can also create a session variable by simply setting the - appropriate member of the <varname>$_SESSION</varname> - or <varname>$HTTP_SESSION_VARS</varname> (PHP < 4.1.0) array. - <informalexample> - <programlisting role="php"> +<refentry id="function.session-register"> + <refnamediv> + <refname>session_register</refname> + <refpurpose>Register one or more global variables with the current session</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>bool</type><methodname>session_register</methodname> + <methodparam><type>mixed</type><parameter>name</parameter></methodparam> + <methodparam choice="opt"><type>mixed</type><parameter>...</parameter></methodparam> + </methodsynopsis> + <para> + <function>session_register</function> accepts a variable number of + arguments, any of which can be either a string holding the name of a + variable or an array consisting of variable names or other arrays. For + each name, <function>session_register</function> registers the global + variable with that name in the current session. + </para> + <caution> + <para> + If you want your script to work regardless of <link + linkend="ini.register-globals">register_globals</link>, + you need to instead use the + <link linkend="reserved.variables.session">$_SESSION</link> array + as <varname>$_SESSION</varname> entries are automatically + registered. If your script uses + <function>session_register</function>, it will not work in + environments where the PHP directive + <link linkend="ini.register-globals">register_globals</link> + is disabled. + </para> + </caution> + + ¬e.registerglobals; + + <caution> + <para> + This registers a <emphasis>global</emphasis> variable. If you + want to register a session variable from within a function, you + need to make sure to make it global using the <link + linkend="language.variables.scope"><command>global</command></link> + keyword or the <varname>$GLOBALS[]</varname> array, or use the + special session arrays as noted below. + </para> + </caution> + <caution> + <para> + If you are using <varname>$_SESSION</varname> + (or <varname>$HTTP_SESSION_VARS</varname>), do not use + <function>session_register</function>, + <function>session_is_registered</function>, and + <function>session_unregister</function>. + </para> + </caution> + <para> + This function returns &true; when all of the variables are successfully + registered with the session. + </para> + <para> + If <function>session_start</function> was not called before this function + is called, an implicit call to <function>session_start</function> with no + parameters will be made. <varname>$_SESSION</varname> does not mimic + this behavior and requires <function>session_start</function> before use. + </para> + <para> + You can also create a session variable by simply setting the + appropriate member of the <varname>$_SESSION</varname> + or <varname>$HTTP_SESSION_VARS</varname> (PHP < 4.1.0) array. + <informalexample> + <programlisting role="php"> <![CDATA[ <?php // Use of session_register() is deprecated @@ -87,35 +85,35 @@ $HTTP_SESSION_VARS["spongebob"] = "He's got square pants."; ?> ]]> - </programlisting> - </informalexample> - </para> - <note> - <para> - It is currently impossible to register resource variables in a - session. For example, you cannot create a connection to a - database and store the connection id as a session variable and - expect the connection to still be valid the next time the - session is restored. PHP functions that return a resource are - identified by having a return type of - <literal>resource</literal> in their function definition. A - list of functions that return resources are available in the - <link linkend="resource">resource types</link> appendix. - </para> - <para> - If <varname>$_SESSION</varname> (or - <varname>$HTTP_SESSION_VARS</varname> for PHP 4.0.6 or less) is - used, assign values to - <varname>$_SESSION</varname>. For example: $_SESSION['var'] = 'ABC'; - </para> - </note> - <para> - See also <function>session_is_registered</function>, - <function>session_unregister</function>, and - <link linkend="reserved.variables.session">$_SESSION</link>. - </para> - </refsect1> - </refentry> + </programlisting> + </informalexample> + </para> + <note> + <para> + It is currently impossible to register resource variables in a + session. For example, you cannot create a connection to a + database and store the connection id as a session variable and + expect the connection to still be valid the next time the + session is restored. PHP functions that return a resource are + identified by having a return type of + <literal>resource</literal> in their function definition. A + list of functions that return resources are available in the + <link linkend="resource">resource types</link> appendix. + </para> + <para> + If <varname>$_SESSION</varname> (or + <varname>$HTTP_SESSION_VARS</varname> for PHP 4.0.6 or less) is + used, assign values to + <varname>$_SESSION</varname>. For example: $_SESSION['var'] = 'ABC'; + </para> + </note> + <para> + See also <function>session_is_registered</function>, + <function>session_unregister</function>, and + <link linkend="reserved.variables.session">$_SESSION</link>. + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/session/functions/session-save-path.xml?r1=1.3&r2=1.4&diff_format=u Index: phpdoc/en/reference/session/functions/session-save-path.xml diff -u phpdoc/en/reference/session/functions/session-save-path.xml:1.3 phpdoc/en/reference/session/functions/session-save-path.xml:1.4 --- phpdoc/en/reference/session/functions/session-save-path.xml:1.3 Sun Nov 17 13:52:05 2002 +++ phpdoc/en/reference/session/functions/session-save-path.xml Fri Jun 15 00:15:33 2007 @@ -1,38 +1,38 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <!-- splitted from ./en/functions/session.xml, last change in rev 1.2 --> - <refentry id="function.session-save-path"> - <refnamediv> - <refname>session_save_path</refname> - <refpurpose>Get and/or set the current session save path</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <methodsynopsis> - <type>string</type><methodname>session_save_path</methodname> - <methodparam choice="opt"><type>string</type><parameter>path</parameter></methodparam> - </methodsynopsis> +<refentry id="function.session-save-path"> + <refnamediv> + <refname>session_save_path</refname> + <refpurpose>Get and/or set the current session save path</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>string</type><methodname>session_save_path</methodname> + <methodparam choice="opt"><type>string</type><parameter>path</parameter></methodparam> + </methodsynopsis> + <para> + <function>session_save_path</function> returns the path of the current + directory used to save session data. If <parameter>path</parameter> + is specified, the path to which data is saved will be changed. + <function>session_save_path</function> needs to be called before + <function>session_start</function> for that purpose. + <note> <para> - <function>session_save_path</function> returns the path of the current - directory used to save session data. If <parameter>path</parameter> - is specified, the path to which data is saved will be changed. - <function>session_save_path</function> needs to be called before - <function>session_start</function> for that purpose. - <note> - <para> - On some operating systems, you may want to specify a path on a - filesystem that handles lots of small files efficiently. For - example, on Linux, reiserfs may provide better performance than - ext2fs. - </para> - </note> + On some operating systems, you may want to specify a path on a + filesystem that handles lots of small files efficiently. For + example, on Linux, reiserfs may provide better performance than + ext2fs. </para> - <para> - See also the <link linkend="ini.session.save-path">session.save_path</link> - configuration directive. - </para> - </refsect1> - </refentry> + </note> + </para> + <para> + See also the <link linkend="ini.session.save-path">session.save_path</link> + configuration directive. + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/session/functions/session-set-cookie-params.xml?r1=1.5&r2=1.6&diff_format=u Index: phpdoc/en/reference/session/functions/session-set-cookie-params.xml diff -u phpdoc/en/reference/session/functions/session-set-cookie-params.xml:1.5 phpdoc/en/reference/session/functions/session-set-cookie-params.xml:1.6 --- phpdoc/en/reference/session/functions/session-set-cookie-params.xml:1.5 Fri Aug 11 16:21:54 2006 +++ phpdoc/en/reference/session/functions/session-set-cookie-params.xml Fri Jun 15 00:15:33 2007 @@ -1,47 +1,45 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> +<!-- $Revision: 1.6 $ --> <!-- splitted from ./en/functions/session.xml, last change in rev 1.2 --> - <refentry id="function.session-set-cookie-params"> - <refnamediv> - <refname>session_set_cookie_params</refname> - <refpurpose> - Set the session cookie parameters - </refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <methodsynopsis> - <type>void</type><methodname>session_set_cookie_params</methodname> - <methodparam><type>int</type><parameter>lifetime</parameter></methodparam> - <methodparam choice="opt"><type>string</type><parameter>path</parameter></methodparam> - <methodparam choice="opt"><type>string</type><parameter>domain</parameter></methodparam> - <methodparam choice="opt"><type>bool</type><parameter>secure</parameter></methodparam> - <methodparam choice="opt"><type>bool</type><parameter>httponly</parameter></methodparam> - </methodsynopsis> - <para> - Set cookie parameters defined in the &php.ini; file. The effect of this - function only lasts for the duration of the script. Thus, you need to - call <function>session_set_cookie_params</function> for every request and - before <function>session_start</function> is called. - </para> - <note> - <para> - The <parameter>secure</parameter> parameter was added in PHP - 4.0.4, while the <parameter>httponly</parameter> parameter was added in - PHP 5.2.0. - </para> - </note> - <para> - See also the configuration directives - <link linkend="ini.session.cookie-lifetime">session.cookie_lifetime</link>, - <link linkend="ini.session.cookie-path">session.cookie_path</link>, - <link linkend="ini.session.cookie-domain">session.cookie_domain</link>, - <link linkend="ini.session.cookie-secure">session.cookie_secure</link>, - <link linkend="ini.session.cookie-httponly">session.cookie_httponly</link>, and - <function>session_get_cookie_params</function>. - </para> - </refsect1> - </refentry> +<refentry id="function.session-set-cookie-params"> + <refnamediv> + <refname>session_set_cookie_params</refname> + <refpurpose>Set the session cookie parameters</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>void</type><methodname>session_set_cookie_params</methodname> + <methodparam><type>int</type><parameter>lifetime</parameter></methodparam> + <methodparam choice="opt"><type>string</type><parameter>path</parameter></methodparam> + <methodparam choice="opt"><type>string</type><parameter>domain</parameter></methodparam> + <methodparam choice="opt"><type>bool</type><parameter>secure</parameter></methodparam> + <methodparam choice="opt"><type>bool</type><parameter>httponly</parameter></methodparam> + </methodsynopsis> + <para> + Set cookie parameters defined in the &php.ini; file. The effect of this + function only lasts for the duration of the script. Thus, you need to + call <function>session_set_cookie_params</function> for every request and + before <function>session_start</function> is called. + </para> + <note> + <para> + The <parameter>secure</parameter> parameter was added in PHP + 4.0.4, while the <parameter>httponly</parameter> parameter was added in + PHP 5.2.0. + </para> + </note> + <para> + See also the configuration directives + <link linkend="ini.session.cookie-lifetime">session.cookie_lifetime</link>, + <link linkend="ini.session.cookie-path">session.cookie_path</link>, + <link linkend="ini.session.cookie-domain">session.cookie_domain</link>, + <link linkend="ini.session.cookie-secure">session.cookie_secure</link>, + <link linkend="ini.session.cookie-httponly">session.cookie_httponly</link>, and + <function>session_get_cookie_params</function>. + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/session/functions/session-set-save-handler.xml?r1=1.14&r2=1.15&diff_format=u Index: phpdoc/en/reference/session/functions/session-set-save-handler.xml diff -u phpdoc/en/reference/session/functions/session-set-save-handler.xml:1.14 phpdoc/en/reference/session/functions/session-set-save-handler.xml:1.15 --- phpdoc/en/reference/session/functions/session-set-save-handler.xml:1.14 Wed Sep 6 11:50:00 2006 +++ phpdoc/en/reference/session/functions/session-set-save-handler.xml Fri Jun 15 00:15:33 2007 @@ -1,96 +1,94 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.14 $ --> +<!-- $Revision: 1.15 $ --> <!-- splitted from ./en/functions/session.xml, last change in rev 1.23 --> - <refentry id="function.session-set-save-handler"> - <refnamediv> - <refname>session_set_save_handler</refname> - <refpurpose> - Sets user-level session storage functions - </refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <methodsynopsis> - <type>bool</type><methodname>session_set_save_handler</methodname> - <methodparam><type>callback</type><parameter>open</parameter></methodparam> - <methodparam><type>callback</type><parameter>close</parameter></methodparam> - <methodparam><type>callback</type><parameter>read</parameter></methodparam> - <methodparam><type>callback</type><parameter>write</parameter></methodparam> - <methodparam><type>callback</type><parameter>destroy</parameter></methodparam> - <methodparam><type>callback</type><parameter>gc</parameter></methodparam> - </methodsynopsis> - <para> - <function>session_set_save_handler</function> sets the user-level - session storage functions which are used for storing and - retrieving data associated with a session. This is most useful - when a storage method other than those supplied by PHP sessions - is preferred. i.e. Storing the session data in a local database. - &return.success; - </para> - <note> - <para> - The "write" handler is not executed until after the output - stream is closed. Thus, output from debugging statements in the - "write" handler will never be seen in the browser. If debugging - output is necessary, it is suggested that the debug output be - written to a file instead. - </para> - </note> - <para> - The following example provides file based session - storage similar to the PHP sessions default save handler - <parameter>files</parameter>. This example could easily be - extended to cover database storage using your favorite PHP - supported database engine. - </para> - <para> - Read function must return string value always to make save - handler work as expected. Return empty string if there is no data - to read. Return values from other handlers are converted to - boolean expression. &true; for success, &false; for failure. - </para> - <warning> - <para> - Write and Close handlers are called after destructing objects since PHP - 5.0.5. Thus destructors can use sessions but session handler can't use - objects. In prior versions, they were called in the opposite order. It - is possible to call <function>session_write_close</function> from the - destructor to solve this chicken and egg problem. - </para> - </warning> - <para> - <example> - <title> - <function>session_set_save_handler</function> example - </title> - <programlisting role="php"> +<refentry id="function.session-set-save-handler"> + <refnamediv> + <refname>session_set_save_handler</refname> + <refpurpose>Sets user-level session storage functions</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>bool</type><methodname>session_set_save_handler</methodname> + <methodparam><type>callback</type><parameter>open</parameter></methodparam> + <methodparam><type>callback</type><parameter>close</parameter></methodparam> + <methodparam><type>callback</type><parameter>read</parameter></methodparam> + <methodparam><type>callback</type><parameter>write</parameter></methodparam> + <methodparam><type>callback</type><parameter>destroy</parameter></methodparam> + <methodparam><type>callback</type><parameter>gc</parameter></methodparam> + </methodsynopsis> + <para> + <function>session_set_save_handler</function> sets the user-level + session storage functions which are used for storing and + retrieving data associated with a session. This is most useful + when a storage method other than those supplied by PHP sessions + is preferred. i.e. Storing the session data in a local database. + &return.success; + </para> + <note> + <para> + The "write" handler is not executed until after the output + stream is closed. Thus, output from debugging statements in the + "write" handler will never be seen in the browser. If debugging + output is necessary, it is suggested that the debug output be + written to a file instead. + </para> + </note> + <para> + The following example provides file based session + storage similar to the PHP sessions default save handler + <parameter>files</parameter>. This example could easily be + extended to cover database storage using your favorite PHP + supported database engine. + </para> + <para> + Read function must return string value always to make save + handler work as expected. Return empty string if there is no data + to read. Return values from other handlers are converted to + boolean expression. &true; for success, &false; for failure. + </para> + <warning> + <para> + Write and Close handlers are called after destructing objects since PHP + 5.0.5. Thus destructors can use sessions but session handler can't use + objects. In prior versions, they were called in the opposite order. It + is possible to call <function>session_write_close</function> from the + destructor to solve this chicken and egg problem. + </para> + </warning> + <para> + <example> + <title> + <function>session_set_save_handler</function> example + </title> + <programlisting role="php"> <![CDATA[ <?php -function open($save_path, $session_name) +function open($save_path, $session_name) { global $sess_save_path; - + $sess_save_path = $save_path; return(true); } -function close() +function close() { return(true); } -function read($id) +function read($id) { global $sess_save_path; - + $sess_file = "$sess_save_path/sess_$id"; return (string) @file_get_contents($sess_file); } -function write($id, $sess_data) +function write($id, $sess_data) { global $sess_save_path; - + $sess_file = "$sess_save_path/sess_$id"; if ($fp = @fopen($sess_file, "w")) { $return = fwrite($fp, $sess_data); @@ -102,18 +100,18 @@ } -function destroy($id) +function destroy($id) { global $sess_save_path; - + $sess_file = "$sess_save_path/sess_$id"; return(@unlink($sess_file)); } -function gc($maxlifetime) +function gc($maxlifetime) { global $sess_save_path; - + foreach (glob("$sess_save_path/sess_*") as $filename) { if (filemtime($filename) + $maxlifetime < time()) { @unlink($filename); @@ -130,15 +128,15 @@ ?> ]]> - </programlisting> - </example> - </para> - <para> - See also the <link linkend="ini.session.save-handler">session.save_handler</link> - configuration directive. - </para> - </refsect1> - </refentry> + </programlisting> + </example> + </para> + <para> + See also the <link linkend="ini.session.save-handler">session.save_handler</link> + configuration directive. + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/session/functions/session-start.xml?r1=1.5&r2=1.6&diff_format=u Index: phpdoc/en/reference/session/functions/session-start.xml diff -u phpdoc/en/reference/session/functions/session-start.xml:1.5 phpdoc/en/reference/session/functions/session-start.xml:1.6 --- phpdoc/en/reference/session/functions/session-start.xml:1.5 Wed Jun 11 04:03:58 2003 +++ phpdoc/en/reference/session/functions/session-start.xml Fri Jun 15 00:15:33 2007 @@ -1,36 +1,36 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> +<!-- $Revision: 1.6 $ --> <!-- splitted from ./en/functions/session.xml, last change in rev 1.2 --> - <refentry id="function.session-start"> - <refnamediv> - <refname>session_start</refname> - <refpurpose>Initialize session data</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <methodsynopsis> - <type>bool</type><methodname>session_start</methodname> - <void/> - </methodsynopsis> - <simpara> - <function>session_start</function> creates a session or resumes - the current one based on the current session id that's being - passed via a request, such as GET, POST, or a cookie. - </simpara> - <simpara> - This function always returns &true;. - </simpara> - <note> - <para> - If you are using cookie-based sessions, you must call - <function>session_start</function> before anything is outputted to the - browser. - </para> - </note> - <para> - <example> - <title>A session example: <filename>page1.php</filename></title> - <programlisting role="php"> +<refentry id="function.session-start"> + <refnamediv> + <refname>session_start</refname> + <refpurpose>Initialize session data</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>bool</type><methodname>session_start</methodname> + <void/> + </methodsynopsis> + <simpara> + <function>session_start</function> creates a session or resumes + the current one based on the current session id that's being + passed via a request, such as GET, POST, or a cookie. + </simpara> + <simpara> + This function always returns &true;. + </simpara> + <note> + <para> + If you are using cookie-based sessions, you must call + <function>session_start</function> before anything is outputted to the + browser. + </para> + </note> + <para> + <example> + <title>A session example: <filename>page1.php</filename></title> + <programlisting role="php"> <![CDATA[ <?php // page1.php @@ -50,21 +50,21 @@ echo '<br /><a href="page2.php?' . SID . '">page 2</a>'; ?> ]]> - </programlisting> - </example> - </para> - <para> - After viewing <filename>page1.php</filename>, the second page - <filename>page2.php</filename> will magically contain the session - data. Read the <link linkend="ref.session">session reference</link> - for information on <link linkend="session.idpassing">propagating - session ids</link> as it, for example, explains what the constant - <constant>SID</constant> is all about. - </para> - <para> - <example> - <title>A session example: <filename>page2.php</filename></title> - <programlisting role="php"> + </programlisting> + </example> + </para> + <para> + After viewing <filename>page1.php</filename>, the second page + <filename>page2.php</filename> will magically contain the session + data. Read the <link linkend="ref.session">session reference</link> + for information on <link linkend="session.idpassing">propagating + session ids</link> as it, for example, explains what the constant + <constant>SID</constant> is all about. + </para> + <para> + <example> + <title>A session example: <filename>page2.php</filename></title> + <programlisting role="php"> <![CDATA[ <?php // page2.php @@ -81,44 +81,44 @@ echo '<br /><a href="page1.php">page 1</a>'; ?> ]]> - </programlisting> - </example> - </para> - <simpara> - If you want to use a named session, you must call - <function>session_name</function> before calling - <function>session_start</function>. - </simpara> - <simpara> - <function>session_start</function> will register internal output - handler for URL rewriting when <literal>trans-sid</literal> is - enabled. If a user uses <literal>ob_gzhandler</literal> or like - with <function>ob_start</function>, the order of output handler - is important for proper output. For example, user must register - <literal>ob_gzhandler</literal> before session start. - </simpara> - <note> - <simpara> - Use of <link linkend="ini.zlib.output-compression">zlib.output_compression</link> - is recommended rather than <function>ob_gzhandler</function> - </simpara> - </note> - <note> - <para> - As of PHP 4.3.3, calling <function>session_start</function> while the - session has already been started will result in an error of level - <constant>E_NOTICE</constant>. Also, the second session start will - simply be ignored. - </para> - </note> - <para> - See also - <link linkend="reserved.variables.session">$_SESSION</link>, - <link linkend="ini.session.auto-start">session.auto_start</link>, and - <function>session_id</function>. - </para> - </refsect1> - </refentry> + </programlisting> + </example> + </para> + <simpara> + If you want to use a named session, you must call + <function>session_name</function> before calling + <function>session_start</function>. + </simpara> + <simpara> + <function>session_start</function> will register internal output + handler for URL rewriting when <literal>trans-sid</literal> is + enabled. If a user uses <literal>ob_gzhandler</literal> or like + with <function>ob_start</function>, the order of output handler + is important for proper output. For example, user must register + <literal>ob_gzhandler</literal> before session start. + </simpara> + <note> + <simpara> + Use of <link linkend="ini.zlib.output-compression">zlib.output_compression</link> + is recommended rather than <function>ob_gzhandler</function> + </simpara> + </note> + <note> + <para> + As of PHP 4.3.3, calling <function>session_start</function> while the + session has already been started will result in an error of level + <constant>E_NOTICE</constant>. Also, the second session start will + simply be ignored. + </para> + </note> + <para> + See also + <link linkend="reserved.variables.session">$_SESSION</link>, + <link linkend="ini.session.auto-start">session.auto_start</link>, and + <function>session_id</function>. + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/session/functions/session-unregister.xml?r1=1.5&r2=1.6&diff_format=u Index: phpdoc/en/reference/session/functions/session-unregister.xml diff -u phpdoc/en/reference/session/functions/session-unregister.xml:1.5 phpdoc/en/reference/session/functions/session-unregister.xml:1.6 --- phpdoc/en/reference/session/functions/session-unregister.xml:1.5 Mon May 19 12:09:26 2003 +++ phpdoc/en/reference/session/functions/session-unregister.xml Fri Jun 15 00:15:33 2007 @@ -1,57 +1,55 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> +<!-- $Revision: 1.6 $ --> <!-- splitted from ./en/functions/session.xml, last change in rev 1.2 --> - <refentry id="function.session-unregister"> - <refnamediv> - <refname>session_unregister</refname> - <refpurpose> - Unregister a global variable from the current session - </refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <methodsynopsis> - <type>bool</type><methodname>session_unregister</methodname> - <methodparam><type>string</type><parameter>name</parameter></methodparam> - </methodsynopsis> - <para> - <function>session_unregister</function> unregisters - the global variable named <parameter>name</parameter> from the - current session. - </para> - <para> - This function returns &true; when the variable is successfully - unregistered from the session. - </para> - <note> - <para> - If <varname>$_SESSION</varname> (or - <varname>$HTTP_SESSION_VARS</varname> for PHP 4.0.6 or less) is - used, use <function>unset</function> to unregister a session - variable. Do not <function>unset</function> <varname>$_SESSION</varname> - itself as this will disable the special function of the - <varname>$_SESSION</varname> superglobal. - </para> - </note> - <caution> - <para> - This function does not unset the corresponding global variable for - <parameter>name</parameter>, it only prevents the variable from being - saved as part of the session. You must call <function>unset</function> - to remove the corresponding global variable. - </para> - </caution> - <caution> - <para> - If you are using - <varname>$_SESSION</varname> (or <varname>$HTTP_SESSION_VARS</varname>), - do not use <function>session_register</function>, - <function>session_is_registered</function> and - <function>session_unregister</function>. - </para> - </caution> - </refsect1> - </refentry> +<refentry id="function.session-unregister"> + <refnamediv> + <refname>session_unregister</refname> + <refpurpose>Unregister a global variable from the current session</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>bool</type><methodname>session_unregister</methodname> + <methodparam><type>string</type><parameter>name</parameter></methodparam> + </methodsynopsis> + <para> + <function>session_unregister</function> unregisters + the global variable named <parameter>name</parameter> from the + current session. + </para> + <para> + This function returns &true; when the variable is successfully + unregistered from the session. + </para> + <note> + <para> + If <varname>$_SESSION</varname> (or + <varname>$HTTP_SESSION_VARS</varname> for PHP 4.0.6 or less) is + used, use <function>unset</function> to unregister a session + variable. Do not <function>unset</function> <varname>$_SESSION</varname> + itself as this will disable the special function of the + <varname>$_SESSION</varname> superglobal. + </para> + </note> + <caution> + <para> + This function does not unset the corresponding global variable for + <parameter>name</parameter>, it only prevents the variable from being + saved as part of the session. You must call <function>unset</function> + to remove the corresponding global variable. + </para> + </caution> + <caution> + <para> + If you are using + <varname>$_SESSION</varname> (or <varname>$HTTP_SESSION_VARS</varname>), + do not use <function>session_register</function>, + <function>session_is_registered</function> and + <function>session_unregister</function>. + </para> + </caution> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/session/functions/session-unset.xml?r1=1.8&r2=1.9&diff_format=u Index: phpdoc/en/reference/session/functions/session-unset.xml diff -u phpdoc/en/reference/session/functions/session-unset.xml:1.8 phpdoc/en/reference/session/functions/session-unset.xml:1.9 --- phpdoc/en/reference/session/functions/session-unset.xml:1.8 Wed Oct 29 09:29:24 2003 +++ phpdoc/en/reference/session/functions/session-unset.xml Fri Jun 15 00:15:33 2007 @@ -1,43 +1,41 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.8 $ --> +<!-- $Revision: 1.9 $ --> <!-- splitted from ./en/functions/session.xml, last change in rev 1.8 --> - <refentry id="function.session-unset"> - <refnamediv> - <refname>session_unset</refname> - <refpurpose> - Free all session variables - </refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <methodsynopsis> - <type>void</type><methodname>session_unset</methodname> - <void/> - </methodsynopsis> +<refentry id="function.session-unset"> + <refnamediv> + <refname>session_unset</refname> + <refpurpose>Free all session variables</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>void</type><methodname>session_unset</methodname> + <void/> + </methodsynopsis> + <para> + The <function>session_unset</function> function frees all session variables + currently registered. + </para> + <note> + <para> + If <varname>$_SESSION</varname> (or + <varname>$HTTP_SESSION_VARS</varname> for PHP 4.0.6 or less) is + used, use <function>unset</function> to unregister a session + variable, i.e. <literal>unset ($_SESSION['varname']);</literal>. + </para> + </note> + <para> + <caution> <para> - The <function>session_unset</function> function frees all session variables - currently registered. + Do NOT unset the whole <varname>$_SESSION</varname> with + <literal>unset($_SESSION)</literal> as this will disable the + registering of session variables through the + <varname>$_SESSION</varname> superglobal. </para> - <note> - <para> - If <varname>$_SESSION</varname> (or - <varname>$HTTP_SESSION_VARS</varname> for PHP 4.0.6 or less) is - used, use <function>unset</function> to unregister a session - variable, i.e. <literal>unset ($_SESSION['varname']);</literal>. - </para> - </note> - <para> - <caution> - <para> - Do NOT unset the whole <varname>$_SESSION</varname> with - <literal>unset($_SESSION)</literal> as this will disable the - registering of session variables through the - <varname>$_SESSION</varname> superglobal. - </para> - </caution> - </para> - </refsect1> - </refentry> + </caution> + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/session/functions/session-write-close.xml?r1=1.2&r2=1.3&diff_format=u Index: phpdoc/en/reference/session/functions/session-write-close.xml diff -u phpdoc/en/reference/session/functions/session-write-close.xml:1.2 phpdoc/en/reference/session/functions/session-write-close.xml:1.3 --- phpdoc/en/reference/session/functions/session-write-close.xml:1.2 Wed Apr 17 06:44:00 2002 +++ phpdoc/en/reference/session/functions/session-write-close.xml Fri Jun 15 00:15:33 2007 @@ -1,37 +1,32 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <!-- splitted from ./en/functions/session.xml, last change in rev 1.38 --> - <refentry id="function.session-write-close"> - <refnamediv> - <refname>session_write_close</refname> - <refpurpose>Write session data and end session</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <methodsynopsis> - <type>void</type><methodname>session_write_close</methodname> - <void/> - </methodsynopsis> - <para> - End the current session and store session data. - </para> - <para> - Session data is usually stored after your script terminated - without the need to call <function>session_write_close</function>, but as - session data is locked to prevent concurrent writes only one - script may operate on a session at any time. When using framesets - together with sessions you will experience the frames loading one - by one due to this locking. You can reduce the time needed to - load all the frames by ending the session as soon as all changes - to session variables are done. - </para> -<!-- commented out until final decision on implementation - <para> - See also: <function>session_readonly</function>. - </para> ---> - </refsect1> - </refentry> +<refentry id="function.session-write-close"> + <refnamediv> + <refname>session_write_close</refname> + <refpurpose>Write session data and end session</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>void</type><methodname>session_write_close</methodname> + <void/> + </methodsynopsis> + <para> + End the current session and store session data. + </para> + <para> + Session data is usually stored after your script terminated + without the need to call <function>session_write_close</function>, but as + session data is locked to prevent concurrent writes only one + script may operate on a session at any time. When using framesets + together with sessions you will experience the frames loading one + by one due to this locking. You can reduce the time needed to + load all the frames by ending the session as soon as all changes + to session variables are done. + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: