cvs: phpdoc-zh /reference/session ini.xml

From: Date: Sat, 21 Jan 2006 04:43:32 +0000
Subject: cvs: phpdoc-zh /reference/session ini.xml
Groups: php.doc.zh 
Request: Send a blank email to doc-zh+get-2755@lists.php.net to get a copy of this message
dallas Sat Jan 21 04:43:32 2006 UTC Modified files: /phpdoc-zh/reference/session ini.xml Log: Completed.

http://cvs.php.net/viewcvs.cgi/phpdoc-zh/reference/session/ini.xml?r1=1.2&r2=1.3&diff_format=u Index: phpdoc-zh/reference/session/ini.xml diff -u phpdoc-zh/reference/session/ini.xml:1.2 phpdoc-zh/reference/session/ini.xml:1.3 --- phpdoc-zh/reference/session/ini.xml:1.2 Fri Jan 20 05:56:14 2006 +++ phpdoc-zh/reference/session/ini.xml Sat Jan 21 04:43:32 2006 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision: 1.39 Maintainer: dallas Status: partial --> +<!-- EN-Revision: 1.39 Maintainer: dallas Status: ready --> <section id="session.configuration"> &reftitle.runtime; &extension.runtime; @@ -318,27 +318,22 @@ </term> <listitem> <simpara> - <literal>session.gc_maxlifetime</literal> specifies the number - of seconds after which data will be seen as 'garbage' and - cleaned up. + <literal>session.gc_maxlifetime</literal> Ö¸¶¨¹ýÁ˶àÉÙÃëÖ®ºóÊý¾Ý¾Í»á±»ÊÓΪ¡°À¬»ø¡±²¢±»Çå³ý¡£ </simpara> <note> <para> - If different scripts have different values of - <literal>session.gc_maxlifetime</literal> but share the same place for - storing the session data then the script with the minimum value will be - cleaning the data. In this case, use this directive together with <link - linkend="ini.session.save-path">session.save_path</link>. + Èç¹û²»Í¬µÄ½Å±¾¾ßÓв»Í¬µÄ + <literal>session.gc_maxlifetime</literal> + ÊýÖµµ«Êǹ²ÏíÁËͬһ¸öµØ·½´æ´¢»á»°Êý¾Ý£¬Ôò¾ßÓÐ×îСÊýÖµµÄ½Å±¾»áÇåÀíÊý¾Ý¡£´ËÇé¿öÏ£¬Óë + <link linkend="ini.session.save-path">session.save_path</link> Ò»ÆðʹÓñ¾Ö¸Áî¡£ </para> </note> <note> - <simpara>If you are using the default file-based session handler, your - filesystem must keep track of access times (atime). Windows FAT does - not so you will have to come up with another way to handle garbage - collecting your session if you are stuck with a FAT filesystem or any - other filesystem where atime tracking is not available. - Since PHP 4.2.3 it has used mtime (modified date) instead of atime. So, you - won't have problems with filesystems where atime tracking is not available. + <simpara> + Èç¹ûʹÓÃĬÈϵĻùÓÚÎļþµÄ»á»°´¦ÀíÆ÷£¬ÔòÎļþϵͳ±ØÐë±£³Ö¸ú×Ù·ÃÎÊʱ¼ä£¨atime£©¡£Windows + FAT Îļþϵͳ²»ÐУ¬Òò´ËÈç¹û±ØÐëʹÓà FAT Îļþϵͳ»òÕ߯äËû²»Äܸú×Ù atime + µÄÎļþϵͳ£¬ÄǾͲ»µÃ²»Ïë±ðµÄ°ì·¨À´´¦Àí»á»°Êý¾ÝµÄÀ¬»ø»ØÊÕ¡£×Ô PHP 4.2.3 + ÆðÓà mtime£¨ÐÞ¸Äʱ¼ä£©À´´úÌæÁË atime¡£Òò´Ë¶ÔÓÚ²»Äܸú×Ù atime µÄÎļþϵͳҲûÎÊÌâÁË¡£ </simpara> </note> </listitem> @@ -351,11 +346,9 @@ </term> <listitem> <simpara> - <literal>session.referer_check</literal> contains the - substring you want to check each HTTP Referer for. If the - Referer was sent by the client and the substring was not - found, the embedded session id will be marked as invalid. - Defaults to the empty string. + <literal>session.referer_check</literal> °üº¬ÓÐÓÃÀ´¼ì²éÿ¸ö HTTP + Referer µÄ×Ó´®¡£Èç¹û¿Í»§¶Ë·¢ËÍÁË Referer + ÐÅÏ¢µ«ÊÇÔÚÆäÖв¢Î´ÕÒµ½¸Ã×Ó´®£¬ÔòǶÈëµÄ»á»° ID »á±»±ê¼ÇΪÎÞЧ¡£Ä¬ÈÏΪ¿Õ×Ö·û´®¡£ </simpara> </listitem> </varlistentry> @@ -367,11 +360,9 @@ </term> <listitem> <simpara> - <literal>session.entropy_file</literal> gives a path to an - external resource (file) which will be used as an additional - entropy source in the session id creation process. Examples are - <literal>/dev/random</literal> or <literal>/dev/urandom</literal> - which are available on many Unix systems. + <literal>session.entropy_file</literal> ¸ø³öÁËÒ»¸öµ½Íⲿ×ÊÔ´£¨Îļþ£©µÄ·¾¶£¬¸Ã×ÊÔ´½«ÔڻỰ + ID ´´½¨½ø³ÌÖб»ÓÃ×÷¸½¼ÓµÄìØÖµ×ÊÔ´¡£ÀýÈçÔÚÐí¶à Unix ϵͳ϶¼¿ÉÒÔÓà + <literal>/dev/random</literal> »ò <literal>/dev/urandom</literal>¡£ </simpara> </listitem> </varlistentry> @@ -383,9 +374,8 @@ </term> <listitem> <simpara> - <literal>session.entropy_length</literal> specifies the number - of bytes which will be read from the file specified - above. Defaults to <literal>0</literal> (disabled). + <literal>session.entropy_length</literal> Ö¸¶¨ÁË´ÓÉÏÃæµÄÎļþÖжÁÈ¡µÄ×Ö½ÚÊý¡£Ä¬ÈÏΪ + <literal>0</literal>£¨½ûÓã©¡£ </simpara> </listitem> </varlistentry> @@ -397,9 +387,8 @@ </term> <listitem> <simpara> - <literal>session.use_cookies</literal> specifies whether the - module will use cookies to store the session id on the client - side. Defaults to <literal>1</literal> (enabled). + <literal>session.use_cookies</literal> Ö¸¶¨ÊÇ·ñÔÚ¿Í»§¶ËÓà + cookie À´´æ·Å»á»° ID¡£Ä¬ÈÏΪ <literal>1</literal>£¨ÆôÓã©¡£ </simpara> </listitem> </varlistentry> @@ -411,12 +400,10 @@ </term> <listitem> <simpara> - <literal>session.use_only_cookies</literal> specifies whether - the module will <emphasis role="strong">only</emphasis> use - cookies to store the session id on the client side. Defaults - to <literal>0</literal> (disabled, for backward compatibility). - Enabling this setting prevents attacks involved passing session - ids in URLs. This setting was added in PHP 4.3.0. + <literal>session.use_only_cookies</literal> Ö¸¶¨ÊÇ·ñÔÚ¿Í»§¶Ë<emphasis + role="strong">½ö½ö</emphasis>ʹÓà cookie À´´æ·Å»á»° ID¡£Ä¬ÈÏΪ + <literal>0</literal>£¨½ûÓã¬ÎªÏòºó¼æÈÝ£©¡£ÆôÓôËÉ趨¿ÉÒÔ·ÀÖ¹ÓйØÍ¨¹ý + URL ´«µÝ»á»° ID µÄ¹¥»÷¡£´ËÉ趨ÊÇ PHP 4.3.0 Ìí¼ÓµÄ¡£ </simpara> </listitem> </varlistentry> @@ -429,12 +416,12 @@ </term> <listitem> <simpara> - <literal>session.cookie_lifetime</literal> specifies the lifetime of - the cookie in seconds which is sent to the browser. The value 0 - means "until the browser is closed." Defaults to - <literal>0</literal>. See also - <function>session_get_cookie_params</function> and - <function>session_set_cookie_params</function>. + <literal>session.cookie_lifetime</literal> ÒÔÃëÊýÖ¸¶¨ÁË·¢Ë͵½ä¯ÀÀÆ÷µÄ + cookie µÄÉúÃüÖÜÆÚ¡£ÖµÎª 0 + ±íʾ¡°Ö±µ½¹Ø±Õä¯ÀÀÆ÷¡±¡£Ä¬ÈÏΪ + <literal>0</literal>¡£²Î¼û + <function>session_get_cookie_params</function> ºÍ + <function>session_set_cookie_params</function>¡£ </simpara> </listitem> </varlistentry> @@ -446,10 +433,10 @@ </term> <listitem> <simpara> - <literal>session.cookie_path</literal> specifies path to set - in session_cookie. Defaults to <literal>/</literal>. See also - <function>session_get_cookie_params</function> and - <function>session_set_cookie_params</function>. + <literal>session.cookie_path</literal> Ö¸¶¨ÁËÒªÉ趨»á»° cookie µÄ·¾¶¡£Ä¬ÈÏΪ + <literal>/</literal>¡£²Î¼û + <function>session_get_cookie_params</function> ºÍ + <function>session_set_cookie_params</function>¡£ </simpara> </listitem> </varlistentry> @@ -461,11 +448,10 @@ </term> <listitem> <simpara> - <literal>session.cookie_domain</literal> specifies the domain to - set in session_cookie. Default is none at all meaning the host name of - the server which generated the cookie according to cookies specification. - See also <function>session_get_cookie_params</function> and - <function>session_set_cookie_params</function>. + <literal>session.cookie_domain</literal> Ö¸¶¨ÁËÒªÉ趨»á»° cookie + µÄÓòÃû¡£Ä¬ÈÏΪÎÞ£¬±íʾ¸ù¾Ý cookie ¹æ·¶²úÉú cookie µÄÖ÷»úÃû¡£²Î¼û + <function>session_get_cookie_params</function> ºÍ + <function>session_set_cookie_params</function>¡£ </simpara> </listitem> </varlistentry> @@ -477,12 +463,10 @@ </term> <listitem> <simpara> - <literal>session.cookie_secure</literal> specifies whether - cookies should only be sent over secure connections. Defaults to - <literal>off</literal>. - This setting was added in PHP 4.0.4. See also - <function>session_get_cookie_params</function> and - <function>session_set_cookie_params</function>. + <literal>session.cookie_secure</literal> Ö¸¶¨ÊÇ·ñ½öͨ¹ý°²È«Á¬½Ó·¢ËÍ + cookie¡£Ä¬ÈÏΪ <literal>off</literal>¡£´ËÉ趨ÊÇ PHP 4.0.4 Ìí¼ÓµÄ¡£²Î¼û + <function>session_get_cookie_params</function> ºÍ + <function>session_set_cookie_params</function>¡£ </simpara> </listitem> </varlistentry> @@ -494,11 +478,10 @@ </term> <listitem> <simpara> - <literal>session.cache_limiter</literal> specifies cache - control method to use for session pages - (none/nocache/private/private_no_expire/public). Defaults to - <literal>nocache</literal>. See also - <function>session_cache_limiter</function>. + <literal>session.cache_limiter</literal> + Ö¸¶¨»á»°Ò³ÃæËùʹÓõĻº³å¿ØÖÆ·½·¨£¨none/nocache/private/private_no_expire/public£©¡£Ä¬ÈÏΪ + <literal>nocache</literal>¡£²Î¼û + <function>session_cache_limiter</function>¡£ </simpara> </listitem> </varlistentry> @@ -511,10 +494,9 @@ </term> <listitem> <simpara> - <literal>session.cache_expire</literal> specifies time-to-live - for cached session pages in minutes, this has no effect for - nocache limiter. Defaults to <literal>180</literal>. See also - <function>session_cache_expire</function>. + <literal>session.cache_expire</literal> ÒÔ·ÖÖÓÊýÖ¸¶¨»º³åµÄ»á»°Ò³ÃæµÄ´æ»îÆÚ£¬´ËÉ趨¶Ô + nocache »º³å¿ØÖÆ·½·¨ÎÞЧ¡£Ä¬ÈÏΪ <literal>180</literal>¡£²Î¼û + <function>session_cache_expire</function>¡£ </simpara> </listitem> </varlistentry> @@ -526,24 +508,19 @@ </term> <listitem> <simpara> - <literal>session.use_trans_sid</literal> whether transparent - sid support is enabled or not. Defaults to - <literal>0</literal> (disabled). + <literal>session.use_trans_sid</literal> Ö¸¶¨ÊÇ·ñÆôÓÃ͸Ã÷ SID + Ö§³Ö¡£Ä¬ÈÏΪ <literal>0</literal>£¨½ûÓã©¡£ </simpara> <note> <simpara> - For PHP 4.1.2 or less, it is enabled by compiling with - <link linkend="configure.enable-trans-sid"> - <literal>--enable-trans-sid</literal></link>. - From PHP 4.2.0, trans-sid feature is always compiled. + ¶ÔÓÚ PHP 4.1.2 »òÒÔϰ汾£¬¿ÉÒÔͨ¹ý¼ÓÈë + <link linkend="configure.enable-trans-sid"><literal>--enable-trans-sid</literal></link> + ÅäÖÃÑ¡ÏîÈ¥±àÒëÀ´ÆôÓã¬´Ó PHP 4.2.0 Æð£¬trans-sid ÌØÐÔ×ÜÊDZ»±àÒë¡£ </simpara> <simpara> - URL based session management has additional security risks - compared to cookie based session management. Users may send - a URL that contains an active session ID to their friends by - email or users may save a URL that contains a session ID to - their bookmarks and access your site with the same session ID - always, for example. + »ùÓÚ URL µÄ»á»°¹ÜÀí±È»ùÓÚ cookie µÄ»á»°¹ÜÀíÓиü¶à°²È«·çÏÕ¡£ÀýÈçÓû§ÓпÉÄÜͨ¹ý + email ½«Ò»¸ö°üº¬ÓÐЧµÄ»á»° ID µÄ URL ·¢¸øËûµÄÅóÓÑ£¬»òÕßÓû§×ÜÊÇÓпÉÄÜÔÚÊղؼÐÖдæÓÐÒ»¸ö°üº¬»á»° + ID µÄ URL À´ÒÔͬÑùµÄ»á»° ID È¥·ÃÎÊÕ¾µã¡£ </simpara> </note> </listitem> @@ -556,13 +533,12 @@ </term> <listitem> <simpara> - PHP versions 4.2.3 and lower have an undocumented feature/bug that - allows you to initialize a session variable in the global scope, - albeit <link linkend="ini.register-globals">register_globals</link> - is disabled. PHP 4.3.0 and later will warn you, if this feature is - used, and if <link linkend="ini.session.bug-compat-warn"> - session.bug_compat_warn</link> is also enabled. This feature/bug can be - disabled by disabling this directive. + PHP 4.2.3 ÒÔ¼°¸üµÍ°æ±¾ÓÐÒ»¸öδ¹«¿ªµÄÌØÐÔ£¯´íÎó£¬ËüÔÊÐíÓû§ÔÚ + <link linkend="ini.register-globals">register_globals</link> + ±»½ûÓõÄÇé¿öÏÂÔÚÈ«¾Ö·¶Î§ÄÚ³õʼ»¯Ò»¸ö»á»°±äÁ¿¡£PHP 4.3.0 + ¼°¸ü¸ß°æ±¾»áÔÚʹÓôËÌØÐÔʱ²¢ÇÒÆôÓÃÁË + <link linkend="ini.session.bug-compat-warn">session.bug_compat_warn</link> + ʱ·¢³ö¾¯¸æ¡£´ËÌØÐÔ£¯´íÎó¿ÉÒÔͨ¹ý¹Ø±Õ´ËÑ¡Ïî¶ø½ûÓᣠ</simpara> </listitem> </varlistentry> @@ -574,14 +550,13 @@ </term> <listitem> <simpara> - PHP versions 4.2.3 and lower have an undocumented feature/bug that - allows you to initialize a session variable in the global scope, - albeit <link linkend="ini.register-globals">register_globals</link> - is disabled. PHP 4.3.0 and later will warn you, if this feature is - used by enabling both - <link linkend="ini.session.bug-compat-42">session.bug_compat_42</link> - and <link linkend="ini.session.bug-compat-warn"> - session.bug_compat_warn</link>. + PHP 4.2.3 ÒÔ¼°¸üµÍ°æ±¾ÓÐÒ»¸öδ¹«¿ªµÄÌØÐÔ£¯´íÎó£¬ËüÔÊÐíÓû§ÔÚ + <link linkend="ini.register-globals">register_globals</link> + ±»½ûÓõÄÇé¿öÏÂÔÚÈ«¾Ö·¶Î§ÄÚ³õʼ»¯Ò»¸ö»á»°±äÁ¿¡£PHP 4.3.0 + ¼°¸ü¸ß°æ±¾»áÔÚʹÓôËÌØÐÔʱ²¢ÇÒͬʱÆôÓÃÁË + <link linkend="ini.session.bug-compat-42">session.bug_compat_42</link> ºÍ + <link linkend="ini.session.bug-compat-warn">session.bug_compat_warn</link> + ʱ·¢³ö¾¯¸æ¡£ </simpara> </listitem> </varlistentry> @@ -593,13 +568,12 @@ </term> <listitem> <simpara> - <literal>session.hash_function</literal> allows you to specify the hash - algorithm used to generate the session IDs. '0' means MD5 (128 bits) and - '1' means SHA-1 (160 bits). + <literal>session.hash_function</literal> ÔÊÐíÓû§Ö¸¶¨Éú³É»á»° + ID µÄÉ¢ÁÐËã·¨¡£'0' ±íʾ MD5£¨128 룩£¬'1' ±íʾ SHA-1£¨160 룩¡£ </simpara> <note> <para> - This was introduced in PHP 5. + ÕâÊÇ PHP 5 Òý½øµÄ¡£ </para> </note> </listitem> @@ -612,14 +586,13 @@ </term> <listitem> <simpara> - <literal>session.hash_bits_per_character</literal> allows you to define - how many bits are stored in each character when converting the binary - hash data to something readable. The possible values are '4' (0-9, a-f), - '5' (0-9, a-v), and '6' (0-9, a-z, A-Z, "-", ","). + <literal>session.hash_bits_per_character</literal> + ÔÊÐíÓû§¶¨Ò彫¶þ½øÖÆÉ¢ÁÐÊý¾Ýת»»Îª¿É¶ÁµÄ¸ñʽʱÿ¸ö×Ö·û´æ·Å¶àÉÙ¸ö±ÈÌØ¡£¿ÉÄÜֵΪ + '4'£¨0-9£¬a-f£©£¬'5'£¨0-9£¬a-v£©£¬ÒÔ¼° '6'£¨0-9£¬a-z£¬A-Z£¬"-"£¬","£©¡£ </simpara> <note> <para> - This was introduced in PHP 5. + ÕâÊÇ PHP 5 Òý½øµÄ¡£ </para> </note> </listitem> @@ -632,15 +605,14 @@ </term> <listitem> <simpara> - <literal>url_rewriter.tags</literal> specifies which HTML tags - are rewritten to include session id if transparent sid support - is enabled. Defaults to - <literal>a=href,area=href,frame=src,input=src,form=fakeentry,fieldset=</literal> + <literal>url_rewriter.tags</literal> Ö¸¶¨ÔÚʹÓÃ͸Ã÷ SID Ö§³ÖʱÄÄЩ HTML + ±ê¼Ç»á±»ÐÞ¸ÄÒÔ¼ÓÈë»á»° ID¡£Ä¬ÈÏΪ + <literal>a=href,area=href,frame=src,input=src,form=fakeentry,fieldset=</literal>¡£ </simpara> <note> <simpara> - If you want XHTML conformity, remove the <literal>form</literal> entry and - use the &lt;fieldset&gt; tags around your form fields. + Èç¹ûÒª·ûºÏ XHTML£¬È¥µô <literal>form</literal> Ïî²¢ÔÚ±íµ¥×Ö¶Îǰºó¼ÓÉÏ + &lt;fieldset&gt; ±ê¼Ç¡£ </simpara> </note> </listitem>
« previous php.doc.zh (#2755) next »