cvs: phpdoc-ja /reference/session constants.xml ini.xml reference.xml /reference/session/functions session-cache-limiter.xml session-destroy.xml
session-id.xml session-name.xml

From: Date: Sun, 05 Sep 2004 04:11:47 +0000
Subject: cvs: phpdoc-ja /reference/session constants.xml ini.xml reference.xml /reference/session/functions session-cache-limiter.xml session-destroy.xml
session-id.xml session-name.xml
Groups: php.doc.ja 
Request: Send a blank email to doc-ja+get-720@lists.php.net to get a copy of this message
yuw Sun Sep 5 00:11:47 2004 EDT Modified files: /phpdoc-ja/reference/session constants.xml ini.xml reference.xml /phpdoc-ja/reference/session/functions session-cache-limiter.xml session-destroy.xml session-id.xml session-name.xml Log: translation update.

http://cvs.php.net/diff.php/phpdoc-ja/reference/session/constants.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-ja/reference/session/constants.xml diff -u phpdoc-ja/reference/session/constants.xml:1.1 phpdoc-ja/reference/session/constants.xml:1.2 --- phpdoc-ja/reference/session/constants.xml:1.1 Sat Jun 21 06:20:05 2003 +++ phpdoc-ja/reference/session/constants.xml Sun Sep 5 00:11:46 2004 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 1.1 $ --> -<!-- sync: 1.3 --> +<!-- $Revision: 1.2 $ --> +<!-- sync: 1.4 --> <section id="session.constants"> &reftitle.constants; &extension.constants; @@ -12,7 +12,8 @@ </term> <listitem> <simpara> - <literal>"name=ID"</literal>形式でセッション名とセッションIDを格納している定数 + <literal>"name=ID"</literal>形式でセッション名とセッションIDを格納している定数。 + セッションIDがセッションクッキーに適切にセットされている場合には空文字列が入る。 </simpara> </listitem> </varlistentry> http://cvs.php.net/diff.php/phpdoc-ja/reference/session/ini.xml?r1=1.4&r2=1.5&ty=u Index: phpdoc-ja/reference/session/ini.xml diff -u phpdoc-ja/reference/session/ini.xml:1.4 phpdoc-ja/reference/session/ini.xml:1.5 --- phpdoc-ja/reference/session/ini.xml:1.4 Thu Feb 26 05:56:16 2004 +++ phpdoc-ja/reference/session/ini.xml Sun Sep 5 00:11:46 2004 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 1.4 $ --> -<!-- sync: 1.21 --> +<!-- $Revision: 1.5 $ --> +<!-- sync: 1.26 --> <section id="session.configuration"> &reftitle.runtime; &extension.runtime; @@ -117,6 +117,26 @@ <entry>PHP_INI_SYSTEM|PHP_INI_PERDIR</entry> </row> <row> + <entry>session.bug_compat_42</entry> + <entry>"1"</entry> + <entry>PHP_INI_ALL</entry> + </row> + <row> + <entry>session.bug_compat_warn</entry> + <entry>"1"</entry> + <entry>PHP_INI_ALL</entry> + </row> + <row> + <entry>session.hash_function</entry> + <entry>"0"</entry> + <entry>PHP_INI_ALL</entry> + </row> + <row> + <entry>session.hash_bits_per_character</entry> + <entry>"4"</entry> + <entry>PHP_INI_ALL</entry> + </row> + <row> <entry>url_rewriter.tags</entry> <entry>"a=href,area=href,frame=src,input=src,form=fakeentry"</entry> <entry>PHP_INI_ALL</entry> @@ -417,7 +437,7 @@ </term> <listitem> <simpara> - <literal>session.cookie_path</literal>によりsession_cokkieで設 + <literal>session.cookie_path</literal>によりsession_cookieで設 定するパスを指定します。デフォルトは<literal>/</literal>です。 <function>session_get_cookie_params</function>および <function>session_set_cookie_params</function>も参照して下さい。 @@ -605,7 +625,7 @@ <literal>url_rewriter.tags</literal>は、透過的なセッションIDの 付加機能が有効となった場合に、セッションIDを含めるために書き換 えられるHTMLタグを指定します。デフォルトは、 - <literal>a=href,area=href,frame=src,input=src,form=fakeentry</literal> + <literal>a=href,area=href,frame=src,input=src,form=fakeentry,fieldset=</literal> です。 </simpara> <note> http://cvs.php.net/diff.php/phpdoc-ja/reference/session/reference.xml?r1=1.10&r2=1.11&ty=u Index: phpdoc-ja/reference/session/reference.xml diff -u phpdoc-ja/reference/session/reference.xml:1.10 phpdoc-ja/reference/session/reference.xml:1.11 --- phpdoc-ja/reference/session/reference.xml:1.10 Wed Jan 7 04:39:08 2004 +++ phpdoc-ja/reference/session/reference.xml Sun Sep 5 00:11:46 2004 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 1.10 $ --> -<!-- sync: 1.41 --> +<!-- $Revision: 1.11 $ --> +<!-- sync: 1.49 --> <reference id="ref.session"> <title>セッション処理関数(session)</title> <titleabbrev>セッション</titleabbrev> @@ -206,6 +206,24 @@ ]]> </programlisting> </example> + </para> + <para> + <caution> + <para> + <literal>unset($_SESSION)</literal>によって + 全ての<varname>$_SESSION</varname>を初期化してはいけません。 + <varname>$_SESSION</varname>スーパーグローバル変数を用いた + セッション変数の登録ができなくなってしまうからです。 + </para> + </caution> + </para> + <warning> + <para> + セッション変数において参照を使用することはできません。 + 他の変数への参照の再現する方法がないからです。 + </para> + </warning> + <para> <example> <title> <link @@ -360,9 +378,14 @@ } ?> -こんにちは、あなたがこのページに来たのは<?php echo $count; ?>回目ですね。 <p> +<p> +こんにちは、あなたがこのページに来たのは<?php echo $count; ?>回目ですね。 +</p> -続けるには、<A HREF="nextpage.php?<?php echo strip_tags (SID)?>">ここをクリック</A>して下さい。 +<p> +続けるには、<A HREF="nextpage.php?<?php echo strip_tags (SID)?>">ここをクリック</A> +して下さい。 +</p> ]]> </programlisting> </example> @@ -381,7 +404,7 @@ <para> 相対URLでないURLは外部サイトを指していると仮定され、SIDが追加 されません。これは、SIDを外部のサーバに開示することはセキュリティ - 上のリスクとなる可農政があるためです。 + 上のリスクとなる可能性があるためです。 </para> </note> </section> http://cvs.php.net/diff.php/phpdoc-ja/reference/session/functions/session-cache-limiter.xml?r1=1.3&r2=1.4&ty=u Index: phpdoc-ja/reference/session/functions/session-cache-limiter.xml diff -u phpdoc-ja/reference/session/functions/session-cache-limiter.xml:1.3 phpdoc-ja/reference/session/functions/session-cache-limiter.xml:1.4 --- phpdoc-ja/reference/session/functions/session-cache-limiter.xml:1.3 Thu Jul 3 20:06:49 2003 +++ phpdoc-ja/reference/session/functions/session-cache-limiter.xml Sun Sep 5 00:11:47 2004 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <!-- splitted from ./ja/functions/session.xml, last change in rev 1.27 --> -<!-- sync: 1.5 --> +<!-- sync: 1.6 --> <refentry id="function.session-cache-limiter"> <refnamediv> <refname>session_cache_limiter</refname> @@ -60,7 +60,7 @@ session_cache_limiter('private'); $cache_limiter = session_cache_limiter(); -echo "The cache limiter is now set to $cache_limiter<p>"; +echo "The cache limiter is now set to $cache_limiter<br />"; ?> ]]> </programlisting> http://cvs.php.net/diff.php/phpdoc-ja/reference/session/functions/session-destroy.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc-ja/reference/session/functions/session-destroy.xml diff -u phpdoc-ja/reference/session/functions/session-destroy.xml:1.2 phpdoc-ja/reference/session/functions/session-destroy.xml:1.3 --- phpdoc-ja/reference/session/functions/session-destroy.xml:1.2 Thu Jul 3 20:06:49 2003 +++ phpdoc-ja/reference/session/functions/session-destroy.xml Sun Sep 5 00:11:47 2004 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <!-- splitted from ./ja/functions/session.xml, last change in rev 1.1 --> -<!-- sync: 1.2 --> +<!-- sync: 1.4 --> <refentry id="function.session-destroy"> <refnamediv> <refname>session_destroy</refname> @@ -18,49 +18,51 @@ セッションに関するグローバル変数を破棄しません。また、セッション クッキーを破棄しません。 </simpara> + <para> + ユーザーがログアウトするときのように、セッションを切断するには、 + セッションIDも割り当てを解除する必要があります。セッションIDの受け渡しに + クッキーが使用されている場合(デフォルト)には、セッションクッキーも + 削除されなければなりません。 + そのためには<function>setcookie</function>が利用できます。 + </para> <simpara> - この関数はセッションデータの破棄に成功した場合に&true;、失敗した - 場合に&false;を返します。 + &return.success; </simpara> <para> <example> - <title>セッションを破棄する</title> + <title><varname>$_SESSION</varname>でセッションを破棄する</title> <programlisting role="php"> <![CDATA[ <?php - -// Initialize the session. -// If you are using session_name("something"), don't forget it now! +// セッションの初期化 +// session_name("something")を使用している場合は特にこれを忘れないように! session_start(); -// Unset all of the session variables. -session_unset(); -// Finally, destroy the session. -session_destroy(); -?> -]]> - </programlisting> - </example> - </para> - <para> - <example> - <title>$_SESSIONでセッションを破棄する</title> - <programlisting role="php"> -<![CDATA[ -<?php - -// Initialize the session. -// If you are using session_name("something"), don't forget it now! -session_start(); -// Unset all of the session variables. +// セッション変数を全て解除する $_SESSION = array(); -// Finally, destroy the session. -session_destroy(); +// セッションを切断するにはセッションクッキーも削除する。 +// Note: セッション情報だけでなくセッションを破壊する。 +if (isset($_COOKIE[session_name()])) { + setcookie(session_name(), '', time()-42000, '/'); +} + +// 最終的に、セッションを破壊する +session_destroy(); ?> ]]> </programlisting> </example> + </para> + <note> + <para> + <varname>$_SESSION</varname>を使っていない古いコードでのみ + <function>session_unset</function>を使用すること。 + </para> + </note> + <para> + <function>unset</function>と + <function>setcookie</function>も参照のこと。 </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-ja/reference/session/functions/session-id.xml?r1=1.3&r2=1.4&ty=u Index: phpdoc-ja/reference/session/functions/session-id.xml diff -u phpdoc-ja/reference/session/functions/session-id.xml:1.3 phpdoc-ja/reference/session/functions/session-id.xml:1.4 --- phpdoc-ja/reference/session/functions/session-id.xml:1.3 Thu Jul 3 20:06:49 2003 +++ phpdoc-ja/reference/session/functions/session-id.xml Sun Sep 5 00:11:47 2004 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <!-- splitted from ./ja/functions/session.xml, last change in rev 1.1 --> -<!-- sync: 1.5 --> +<!-- sync: 1.8 --> <refentry id="function.session-id"> <refnamediv> <refname>session_id</refname> @@ -10,20 +10,25 @@ <title>説明</title> <methodsynopsis> <type>string</type><methodname>session_id</methodname> - <methodparam><type>string</type><parameter> - <replaceable><optional>id</optional></replaceable> - </parameter></methodparam> + <methodparam choice="opt"><type>string</type><parameter>id</parameter></methodparam> </methodsynopsis> <para> - <function>session_id</function>は、カレントのセッションのセッショ - ンIDを返します。<parameter>id</parameter>が指定された場合、カレン - トのセッションIDを置換します。その際、 - <function>session_start</function>より前に - コールされている必要があります。 + <function>session_id</function>は、カレントのセッションのセッションIDを + 返します。<parameter>id</parameter>が指定された場合、カレントの + セッションIDを置換します。その際、 + <function>session_start</function>より前にコールされている必要があります。 セッションハンドラによっては、セッションIDとして使用できる文字に 制限がある場合があります。例えば、ファイルによるセッションハンドラは セッションIDとして使える文字は<literal>a-z, A-Z, 0-9</literal>に限られます! </para> + <note> + <simpara> + セッション保持にクッキーを使用している場合、<function>session_id</function> + において<parameter>id</parameter>引数を指定すると、 + カレントのセッションIDが、セットされるものとまったく同一であるか同化に関わらず、 + <function>session_start</function>が呼び出される際に常に新しいクッキーが送信されます。 + </simpara> + </note> <para> カレントの名前とセッションIDを、URLに追加可能な文字列として取得す るために定数 <systemitem>SID</systemitem> も使用することが可能です。 http://cvs.php.net/diff.php/phpdoc-ja/reference/session/functions/session-name.xml?r1=1.4&r2=1.5&ty=u Index: phpdoc-ja/reference/session/functions/session-name.xml diff -u phpdoc-ja/reference/session/functions/session-name.xml:1.4 phpdoc-ja/reference/session/functions/session-name.xml:1.5 --- phpdoc-ja/reference/session/functions/session-name.xml:1.4 Thu Jul 3 20:06:49 2003 +++ phpdoc-ja/reference/session/functions/session-name.xml Sun Sep 5 00:11:47 2004 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <!-- splitted from ./ja/functions/session.xml, last change in rev 1.3 --> -<!-- sync: 1.2 --> +<!-- sync: 1.4 --> <refentry id="function.session-name"> <refnamediv> <refname>session_name</refname> @@ -38,7 +38,7 @@ $previous_name = session_name("WebsiteID"); -echo "前回のセッション名は、$previous_name です。<p>"; +echo "前回のセッション名は、$previous_name です。<br />"; ?> ]]> </programlisting>
« previous php.doc.ja (#720) next »