📄 session.configuration.html
字号:
<dt id="ini.session.referer-check"> <span class="term"> <i><tt class="parameter">session.referer_check</tt></i> <a href="language.types.string.html" class="type string">string</a> </span> <dd> <span class="simpara"> <i>session.referer_check</i> 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. </span> </dd> </dt> <dt id="ini.session.entropy-file"> <span class="term"> <i><tt class="parameter">session.entropy_file</tt></i> <a href="language.types.string.html" class="type string">string</a> </span> <dd> <span class="simpara"> <i>session.entropy_file</i> 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 <i>/dev/random</i> or <i>/dev/urandom</i> which are available on many Unix systems. </span> </dd> </dt> <dt id="ini.session.entropy-length"> <span class="term"> <i><tt class="parameter">session.entropy_length</tt></i> <a href="language.types.integer.html" class="type integer">integer</a> </span> <dd> <span class="simpara"> <i>session.entropy_length</i> specifies the number of bytes which will be read from the file specified above. Defaults to <i>0</i> (disabled). </span> </dd> </dt> <dt id="ini.session.use-cookies"> <span class="term"> <i><tt class="parameter">session.use_cookies</tt></i> <a href="language.types.boolean.html" class="type boolean">boolean</a> </span> <dd> <span class="simpara"> <i>session.use_cookies</i> specifies whether the module will use cookies to store the session id on the client side. Defaults to <i>1</i> (enabled). </span> </dd> </dt> <dt id="ini.session.use-only-cookies"> <span class="term"> <i><tt class="parameter">session.use_only_cookies</tt></i> <a href="language.types.boolean.html" class="type boolean">boolean</a> </span> <dd> <span class="simpara"> <i>session.use_only_cookies</i> specifies whether the module will <em class="emphasis">only</em> use cookies to store the session id on the client side. Enabling this setting prevents attacks involved passing session ids in URLs. This setting was added in PHP 4.3.0. Defaults to <i>1</i> (enabled) since PHP 6.0. </span> </dd> </dt> <dt id="ini.session.cookie-lifetime"> <span class="term"> <i><tt class="parameter">session.cookie_lifetime</tt></i> <a href="language.types.integer.html" class="type integer">integer</a> </span> <dd> <span class="simpara"> <i>session.cookie_lifetime</i> 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 <i>0</i>. See also <a href="function.session-get-cookie-params.html" class="function">session_get_cookie_params()</a> and <a href="function.session-set-cookie-params.html" class="function">session_set_cookie_params()</a>. </span> <blockquote><p><b class="note">Note</b>: The expiration timestamp is set relative to the server time, which is not necessarily the same as the time in the client's browser. <br /> </p></blockquote> </dd> </dt> <dt id="ini.session.cookie-path"> <span class="term"> <i><tt class="parameter">session.cookie_path</tt></i> <a href="language.types.string.html" class="type string">string</a> </span> <dd> <span class="simpara"> <i>session.cookie_path</i> specifies path to set in session_cookie. Defaults to <i>/</i>. See also <a href="function.session-get-cookie-params.html" class="function">session_get_cookie_params()</a> and <a href="function.session-set-cookie-params.html" class="function">session_set_cookie_params()</a>. </span> </dd> </dt> <dt id="ini.session.cookie-domain"> <span class="term"> <i><tt class="parameter">session.cookie_domain</tt></i> <a href="language.types.string.html" class="type string">string</a> </span> <dd> <span class="simpara"> <i>session.cookie_domain</i> 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 <a href="function.session-get-cookie-params.html" class="function">session_get_cookie_params()</a> and <a href="function.session-set-cookie-params.html" class="function">session_set_cookie_params()</a>. </span> </dd> </dt> <dt id="ini.session.cookie-secure"> <span class="term"> <i><tt class="parameter">session.cookie_secure</tt></i> <a href="language.types.boolean.html" class="type boolean">boolean</a> </span> <dd> <span class="simpara"> <i>session.cookie_secure</i> specifies whether cookies should only be sent over secure connections. Defaults to <i>off</i>. This setting was added in PHP 4.0.4. See also <a href="function.session-get-cookie-params.html" class="function">session_get_cookie_params()</a> and <a href="function.session-set-cookie-params.html" class="function">session_set_cookie_params()</a>. </span> </dd> </dt> <dt id="ini.session.cookie-httponly"> <span class="term"> <i><tt class="parameter">session.cookie_httponly</tt></i> <a href="language.types.boolean.html" class="type boolean">boolean</a> </span> <dd> <span class="simpara"> Marks the cookie as accessible only through the HTTP protocol. This means that the cookie won't be accessible by scripting languages, such as JavaScript. This setting can effectively help to reduce identity theft through XSS attacks (although it is not supported by all browsers). </span> </dd> </dt> <dt id="ini.session.cache-limiter"> <span class="term"> <i><tt class="parameter">session.cache_limiter</tt></i> <a href="language.types.string.html" class="type string">string</a> </span> <dd> <span class="simpara"> <i>session.cache_limiter</i> specifies cache control method to use for session pages (none/nocache/private/private_no_expire/public). Defaults to <i>nocache</i>. See also <a href="function.session-cache-limiter.html" class="function">session_cache_limiter()</a>. </span> </dd> </dt> <dt id="ini.session.cache-expire"> <span class="term"> <i><tt class="parameter">session.cache_expire</tt></i> <a href="language.types.integer.html" class="type integer">integer</a> </span> <dd> <span class="simpara"> <i>session.cache_expire</i> specifies time-to-live for cached session pages in minutes, this has no effect for nocache limiter. Defaults to <i>180</i>. See also <a href="function.session-cache-expire.html" class="function">session_cache_expire()</a>. </span> </dd> </dt> <dt id="ini.session.use-trans-sid"> <span class="term"> <i><tt class="parameter">session.use_trans_sid</tt></i> <a href="language.types.boolean.html" class="type boolean">boolean</a> </span> <dd> <span class="simpara"> <i>session.use_trans_sid</i> whether transparent sid support is enabled or not. Defaults to <i>0</i> (disabled). </span> <blockquote><p><b class="note">Note</b>: <span class="simpara"> For PHP 4.1.2 or less, it is enabled by compiling with <a href="configure.html#configure.enable-trans-sid" class="link"> <i>--enable-trans-sid</i></a>. From PHP 4.2.0, trans-sid feature is always compiled. </span> <span class="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. </span> </p></blockquote> </dd> </dt> <dt id="ini.session.bug-compat-42"> <span class="term"> <i><tt class="parameter">session.bug_compat_42</tt></i> <a href="language.types.boolean.html" class="type boolean">boolean</a> </span> <dd> <span class="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 <a href="ini.core.html#ini.register-globals" class="link">register_globals</a> is disabled. PHP 4.3.0 and later will warn you, if this feature is used, and if <a href="session.configuration.html#ini.session.bug-compat-warn" class="link"> session.bug_compat_warn</a> is also enabled. This feature/bug can be disabled by disabling this directive. </span> </dd> </dt> <dt id="ini.session.bug-compat-warn"> <span class="term"> <i><tt class="parameter">session.bug_compat_warn</tt></i> <a href="language.types.boolean.html" class="type boolean">boolean</a> </span> <dd> <span class="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 <a href="ini.core.html#ini.register-globals" class="link">register_globals</a> is disabled. PHP 4.3.0 and later will warn you, if this feature is used by enabling both <a href="session.configuration.html#ini.session.bug-compat-42" class="link">session.bug_compat_42</a> and <a href="session.configuration.html#ini.session.bug-compat-warn" class="link"> session.bug_compat_warn</a>. </span> </dd> </dt> <dt id="ini.session.hash-function"> <span class="term"> <i><tt class="parameter">session.hash_function</tt></i> <a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a> </span> <dd> <span class="simpara"> <i>session.hash_function</i> 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). </span> <p class="para"> Since PHP 6.0.0 it is also possible to specify any of the algorithms provided by the <a href="ref.hash.html" class="link">hash extension</a> (if it is available), like <i>sha512</i> or <i>whirlpool</i>. A complete list of supported algorithms can be obtained with the <a href="function.hash-algos.html" class="function">hash_algos()</a> function. </p> <blockquote><p><b class="note">Note</b>: This was introduced in PHP 5. <br /> </p></blockquote> </dd> </dt> <dt id="ini.session.hash-bits-per-character"> <span class="term"> <i><tt class="parameter">session.hash_bits_per_character</tt></i> <a href="language.types.integer.html" class="type integer">integer</a> </span> <dd> <span class="simpara"> <i>session.hash_bits_per_character</i> 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, "-", ","). </span> <blockquote><p><b class="note">Note</b>: This was introduced in PHP 5. <br /> </p></blockquote> </dd> </dt> <dt id="ini.url-rewriter.tags"> <span class="term"> <i><tt class="parameter">url_rewriter.tags</tt></i> <a href="language.types.string.html" class="type string">string</a> </span> <dd> <span class="simpara"> <i>url_rewriter.tags</i> specifies which HTML tags are rewritten to include session id if transparent sid support is enabled. Defaults to <i>a=href,area=href,frame=src,input=src,form=fakeentry,fieldset=</i> </span> <blockquote><p><b class="note">Note</b>: <span class="simpara"> If you want HTML/XHTML strict conformity, remove the <i>form</i> entry and use the <fieldset> tags around your form fields. </span> </p></blockquote> </dd> </dt> </dl> </p> <p class="para"> The <a href="ini.core.html#ini.track-vars" class="link"><i>track_vars</i></a> and <a href="ini.core.html#ini.register-globals" class="link"><i>register_globals</i></a> configuration settings influence how the session variables get stored and restored. </p> <blockquote><p><b class="note">Note</b>: As of PHP 4.0.3, <a href="ini.core.html#ini.track-vars" class="link"><i>track_vars</i></a> is always turned on. <br /> </p></blockquote></div><hr /><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="session.installation.html">Installation</a></div> <div class="next" style="text-align: right; float: right;"><a href="session.resources.html">Resource Types</a></div> <div class="up"><a href="session.setup.html">Installing/Configuring</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -