From aec7115f7ddb8ce8bb4f8d6cd3a01f7c6816762e Mon Sep 17 00:00:00 2001 From: Yasuo Ohgaki Date: Sun, 20 Jan 2002 09:07:28 +0000 Subject: [PATCH] Added more warnings for mixed usage for track vars ($HTTP_SESSION_VARS/$_SESSION) and functions for global vars session handleing functions (session_register/session_is_register/ session_unregister) # These warnings are required since session module does not handle # PS(vars) and PS(http_session_vars) cocnsistent manner :) git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@68191 c90b9560-bf6c-de11-be94-00142212c4b1 --- functions/session.xml | 39 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/functions/session.xml b/functions/session.xml index d516f5a2bb..d41818dc7b 100644 --- a/functions/session.xml +++ b/functions/session.xml @@ -1,5 +1,5 @@ - + Session handling functions Sessions @@ -51,6 +51,8 @@ linkend="ini.track-vars">track_vars is always turned on. + + As of PHP 4.1.0, $_SESSION is available as global variable just like $_POST, $_GET, $_REQUEST and so on. Not like @@ -94,7 +96,7 @@ else { $HTTP_SESSION_VARS, there is no need to use session_register()/session_unregister()/session_is_registered() functions. Users can access session variable like a normal - variable. + variable. Registering a variable with $_SESSION. @@ -137,6 +139,15 @@ unset($_SESSION['count']); variables with session_register() function while $HTTP_SESSION_VARS/$_SESSION does not need to use session_register(). + <caution> + <para> + If you are using $HTTP_SESSION_VARS/$_SESSION, do not use + <function>session_register</function>, + <function>session_is_registered</function> and + <function>session_unregister</function> unless you know internal + of session module. + </para> + </caution> <example> <title> Registering a variable with <link @@ -690,6 +701,14 @@ echo "The previous session name was $previous_name<p>"; arrays as noted below. </para> </caution> + <caution> + <para> + If you are using $HTTP_SESSION_VARS/$_SESSION, 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. @@ -780,6 +799,14 @@ $_SESSION["spongebob"] = "He's got square pants."; to remove the corresponding global variable. </para> </caution> + <caution> + <para> + If you are using $HTTP_SESSION_VARS/$_SESSION, do not use + <function>session_register</function>, + <function>session_is_registered</function> and + <function>session_unregister</function>. + </para> + </caution> </refsect1> </refentry> @@ -839,6 +866,14 @@ $_SESSION["spongebob"] = "He's got square pants."; registered in $_SESSION. </para> </note> + <caution> + <para> + If you are using $HTTP_SESSION_VARS/$_SESSION, do not use + <function>session_register</function>, + <function>session_is_registered</function> and + <function>session_unregister</function>. + </para> + </caution> </refsect1> </refentry>