Sophie

Sophie

distrib > Mageia > 4 > i586 > by-pkgid > f800694edefe91adea2624f711a41a2d > files > 11292

php-manual-en-5.5.7-1.mga4.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Runtime Configuration</title>

 </head>
 <body><div class="manualnavbar" 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><hr /><div id="session.configuration" class="section">
 <h2 class="title">Runtime Configuration</h2>
 <p class="simpara">
The behaviour of these functions is affected by settings in <var class="filename">php.ini</var>.
</p>
 <p class="para">
 <table class="doctable table">
  <caption><strong>Session configuration options</strong></caption>
  
   <thead>
    <tr>
     <th>Name</th>
     <th>Default</th>
     <th>Changeable</th>
     <th>Changelog</th>
    </tr>

   </thead>

   <tbody class="tbody">
    <tr>
     <td><a href="session.configuration.html#ini.session.save-path" class="link">session.save_path</a></td>
     <td>&quot;&quot;</td>
     <td>PHP_INI_ALL</td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr>
     <td><a href="session.configuration.html#ini.session.name" class="link">session.name</a></td>
     <td>&quot;PHPSESSID&quot;</td>
     <td>PHP_INI_ALL</td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr>
     <td><a href="session.configuration.html#ini.session.save-handler" class="link">session.save_handler</a></td>
     <td>&quot;files&quot;</td>
     <td>PHP_INI_ALL</td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr>
     <td><a href="session.configuration.html#ini.session.auto-start" class="link">session.auto_start</a></td>
     <td>&quot;0&quot;</td>
     <td>PHP_INI_PERDIR</td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr>
     <td><a href="session.configuration.html#ini.session.gc-probability" class="link">session.gc_probability</a></td>
     <td>&quot;1&quot;</td>
     <td>PHP_INI_ALL</td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr>
     <td><a href="session.configuration.html#ini.session.gc-divisor" class="link">session.gc_divisor</a></td>
     <td>&quot;100&quot;</td>
     <td>PHP_INI_ALL</td>
     <td>Available since PHP 4.3.2.</td>
    </tr>

    <tr>
     <td><a href="session.configuration.html#ini.session.gc-maxlifetime" class="link">session.gc_maxlifetime</a></td>
     <td>&quot;1440&quot;</td>
     <td>PHP_INI_ALL</td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr>
     <td><a href="session.configuration.html#ini.session.serialize-handler" class="link">session.serialize_handler</a></td>
     <td>&quot;php&quot;</td>
     <td>PHP_INI_ALL</td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr>
     <td><a href="session.configuration.html#ini.session.cookie-lifetime" class="link">session.cookie_lifetime</a></td>
     <td>&quot;0&quot;</td>
     <td>PHP_INI_ALL</td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr>
     <td><a href="session.configuration.html#ini.session.cookie-path" class="link">session.cookie_path</a></td>
     <td>&quot;/&quot;</td>
     <td>PHP_INI_ALL</td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr>
     <td><a href="session.configuration.html#ini.session.cookie-domain" class="link">session.cookie_domain</a></td>
     <td>&quot;&quot;</td>
     <td>PHP_INI_ALL</td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr>
     <td><a href="session.configuration.html#ini.session.cookie-secure" class="link">session.cookie_secure</a></td>
     <td>&quot;&quot;</td>
     <td>PHP_INI_ALL</td>
     <td>Available since PHP 4.0.4.</td>
    </tr>

    <tr>
     <td><a href="session.configuration.html#ini.session.cookie-httponly" class="link">session.cookie_httponly</a></td>
     <td>&quot;&quot;</td>
     <td>PHP_INI_ALL</td>
     <td>Available since PHP 5.2.0.</td>
    </tr>

    <tr>
     <td><a href="session.configuration.html#ini.session.use-strict-mode" class="link">session.use_strict_mode</a></td>
     <td>&quot;0&quot;</td>
     <td>PHP_INI_ALL</td>
     <td>Available since PHP 5.5.2.</td>
    </tr>

    <tr>
     <td><a href="session.configuration.html#ini.session.use-cookies" class="link">session.use_cookies</a></td>
     <td>&quot;1&quot;</td>
     <td>PHP_INI_ALL</td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr>
     <td><a href="session.configuration.html#ini.session.use-only-cookies" class="link">session.use_only_cookies</a></td>
     <td>&quot;1&quot;</td>
     <td>PHP_INI_ALL</td>
     <td>Available since PHP 4.3.0.</td>
    </tr>

    <tr>
     <td><a href="session.configuration.html#ini.session.referer-check" class="link">session.referer_check</a></td>
     <td>&quot;&quot;</td>
     <td>PHP_INI_ALL</td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr>
     <td><a href="session.configuration.html#ini.session.entropy-file" class="link">session.entropy_file</a></td>
     <td>&quot;&quot;</td>
     <td>PHP_INI_ALL</td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr>
     <td><a href="session.configuration.html#ini.session.entropy-length" class="link">session.entropy_length</a></td>
     <td>&quot;0&quot;</td>
     <td>PHP_INI_ALL</td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr>
     <td><a href="session.configuration.html#ini.session.cache-limiter" class="link">session.cache_limiter</a></td>
     <td>&quot;nocache&quot;</td>
     <td>PHP_INI_ALL</td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr>
     <td><a href="session.configuration.html#ini.session.cache-expire" class="link">session.cache_expire</a></td>
     <td>&quot;180&quot;</td>
     <td>PHP_INI_ALL</td>
     <td class="empty">&nbsp;</td>
    </tr>

    <tr>
     <td><a href="session.configuration.html#ini.session.use-trans-sid" class="link">session.use_trans_sid</a></td>
     <td>&quot;0&quot;</td>
     <td>PHP_INI_ALL</td>
     <td>PHP_INI_ALL in PHP &lt;= 4.2.3. PHP_INI_PERDIR in PHP &lt; 5. Available since PHP 4.0.3.</td>
    </tr>

    <tr>
     <td><a href="session.configuration.html#ini.session.bug-compat-42" class="link">session.bug_compat_42</a></td>
     <td>&quot;1&quot;</td>
     <td>PHP_INI_ALL</td>
     <td>Available since PHP 4.3.0. Removed in PHP 5.4.0.</td>
    </tr>

    <tr>
     <td><a href="session.configuration.html#ini.session.bug-compat-warn" class="link">session.bug_compat_warn</a></td>
     <td>&quot;1&quot;</td>
     <td>PHP_INI_ALL</td>
     <td>Available since PHP 4.3.0. Removed in PHP 5.4.0.</td>
    </tr>

    <tr>
     <td><a href="session.configuration.html#ini.session.hash-function" class="link">session.hash_function</a></td>
     <td>&quot;0&quot;</td>
     <td>PHP_INI_ALL</td>
     <td>Available since PHP 5.0.0.</td>
    </tr>

    <tr>
     <td><a href="session.configuration.html#ini.session.hash-bits-per-character" class="link">session.hash_bits_per_character</a></td>
     <td>&quot;4&quot;</td>
     <td>PHP_INI_ALL</td>
     <td>Available since PHP 5.0.0.</td>
    </tr>

    <tr>
     <td><a href="session.configuration.html#ini.url-rewriter.tags" class="link">url_rewriter.tags</a></td>
     <td>&quot;a=href,area=href,frame=src,form=,fieldset=&quot;</td>
     <td>PHP_INI_ALL</td>
     <td>Available since PHP 4.0.4.</td>
    </tr>

     <tr>
      <td><a href="session.configuration.html#ini.session.upload-progress.enabled" class="link">session.upload_progress.enabled</a></td>
      <td>&quot;1&quot;</td>
      <td>PHP_INI_PERDIR</td>
      <td>Available since PHP 5.4.0.</td>
     </tr>

     <tr>
      <td><a href="session.configuration.html#ini.session.upload-progress.cleanup" class="link">session.upload_progress.cleanup</a></td>
      <td>&quot;1&quot;</td>
      <td>PHP_INI_PERDIR</td>
      <td>Available since PHP 5.4.0.</td>
     </tr>

     <tr>
      <td><a href="session.configuration.html#ini.session.upload-progress.prefix" class="link">session.upload_progress.prefix</a></td>
      <td>&quot;upload_progress_&quot;</td>
      <td>PHP_INI_PERDIR</td>
      <td>Available since PHP 5.4.0.</td>
     </tr>

     <tr>
      <td><a href="session.configuration.html#ini.session.upload-progress.name" class="link">session.upload_progress.name</a></td>
      <td>&quot;PHP_SESSION_UPLOAD_PROGRESS&quot;</td>
      <td>PHP_INI_PERDIR</td>
      <td>Available since PHP 5.4.0.</td>
     </tr>

     <tr>
      <td><a href="session.configuration.html#ini.session.upload-progress.freq" class="link">session.upload_progress.freq</a></td>
      <td>&quot;1%&quot;</td>
      <td>PHP_INI_PERDIR</td>
      <td>Available since PHP 5.4.0.</td>
     </tr>

     <tr>
      <td><a href="session.configuration.html#ini.session.upload-progress.min-freq" class="link">session.upload_progress.min_freq</a></td>
      <td>&quot;1&quot;</td>
      <td>PHP_INI_PERDIR</td>
      <td>Available since PHP 5.4.0.</td>
     </tr>

   </tbody>
  
 </table>

 For further details and definitions of the
PHP_INI_* modes, see the <a href="configuration.changes.modes.html" class="xref">Where a configuration setting may be set</a>.
 </p>
 <p class="para">
  The session management system supports a number of configuration
  options which you can place in your <var class="filename">php.ini</var> file. We will give a
  short overview.
 <dl>


  <dt id="ini.session.save-handler">
   <span class="term">
    <em><code class="parameter">session.save_handler</code></em>
    <span class="type"><a href="language.types.string.html" class="type string">string</a></span>
   </span>
   <dd>

    <span class="simpara">
     <em>session.save_handler</em> defines the name of the
     handler which is used for storing and retrieving data
     associated with a session. Defaults to
     <em>files</em>. Note that individual extensions may register
     their own <em>save_handler</em>s; registered handlers can be
     obtained on a per-installation basis by referring to
      <span class="function"><a href="function.phpinfo.html" class="function">phpinfo()</a></span>. See also
      <span class="function"><a href="function.session-set-save-handler.html" class="function">session_set_save_handler()</a></span>.
    </span>
   </dd>

  </dt>


  <dt id="ini.session.save-path">
   <span class="term">
    <em><code class="parameter">session.save_path</code></em>
    <span class="type"><a href="language.types.string.html" class="type string">string</a></span>
   </span>
   <dd>

    <span class="simpara">
     <em>session.save_path</em> defines the argument which
     is passed to the save handler. If you choose the default files
     handler, this is the path where the files are created. See also
      <span class="function"><a href="function.session-save-path.html" class="function">session_save_path()</a></span>. 
    </span>
    <p class="para">
     There is an optional <em>N</em> argument to this directive that determines 
     the number of directory levels your session files will be spread
     around in.  For example, setting to <em>&#039;5;/tmp&#039;</em>
     may end up creating a session file and location like
     <em>/tmp/4/b/1/e/3/sess_4b1e384ad74619bd212e236e52a5a174If
     </em>.  In order to use <em>N</em> you must create all of these
     directories before use.  A small shell script exists in
     <var class="filename">ext/session</var> to do this, it&#039;s called
     <var class="filename">mod_files.sh</var>, with a Windows version called
     <var class="filename">mod_files.bat</var>.  Also note that if <em>N</em> is
     used and greater than 0 then automatic garbage collection will
     not be performed, see a copy of <var class="filename">php.ini</var> for further
     information.  Also, if you use <em>N</em>, be sure to surround
     <em>session.save_path</em> in  
     &quot;quotes&quot; because the separator (<em>;</em>) is
     also used for comments in <var class="filename">php.ini</var>.
    </p>
    <p class="para">
     The file storage module creates files using mode 600 by default.
     This default can be changed with the optional <em>MODE</em> argument:
     <em>N;MODE;/path</em> where <em>MODE</em> is the octal 
     representation of the mode. 
     Setting <em>MODE</em> does not affect the process umask.
    </p>
    <div class="warning"><strong class="warning">Warning</strong>
     <p class="para">
      If you leave this set to a world-readable directory, such as
      <var class="filename">/tmp</var> (the default), other users on the
      server may be able to hijack sessions by getting the list of
      files in that directory.
     </p>
    </div>
    <blockquote class="note"><p><strong class="note">Note</strong>: 
     <span class="simpara">
      Prior to PHP 4.3.6, Windows users had to change this variable in order
      to use PHP&#039;s session functions. A valid path must be specified, e.g.:
      <var class="filename">c:/temp</var>.
     </span>
    </p></blockquote>
   </dd>

  </dt>


  <dt id="ini.session.name">
   <span class="term">
    <em><code class="parameter">session.name</code></em>
    <span class="type"><a href="language.types.string.html" class="type string">string</a></span>
   </span>
   <dd>

    <span class="simpara">
     <em>session.name</em> specifies the name of the
     session which is used as cookie name. It should only contain
     alphanumeric characters. Defaults to <em>PHPSESSID</em>.
     See also  <span class="function"><a href="function.session-name.html" class="function">session_name()</a></span>.
    </span>
   </dd>

  </dt>

  
  <dt id="ini.session.auto-start">
   <span class="term">
    <em><code class="parameter">session.auto_start</code></em>
    <span class="type"><a href="language.types.boolean.html" class="type boolean">boolean</a></span>
   </span>
   <dd>

    <span class="simpara">
     <em>session.auto_start</em> specifies whether the
     session module starts a session automatically on request
     startup. Defaults to <em>0</em> (disabled).
    </span>
   </dd>

  </dt>


  <dt id="ini.session.serialize-handler">
   <span class="term">
    <em><code class="parameter">session.serialize_handler</code></em>
    <span class="type"><a href="language.types.string.html" class="type string">string</a></span>
   </span>
   <dd>

    <span class="simpara">
     <em>session.serialize_handler</em> defines the name of
     the handler which is used to serialize/deserialize data. PHP
     serialize format (name <em>php_serialize</em>, PHP
     internal formats (name <em>php</em> and
     <em>php_binary</em>) and WDDX are supported (name
     <em>wddx</em>). WDDX is only available, if PHP is
     compiled with <a href="ref.wddx.html" class="link">WDDX
     support</a>. <em>php_serialize</em> is available
     from PHP 5.5.4. <em>php_serialize</em> uses plain
     serialize/unserialize function internally and does not have
     limitations that <em>php</em>
     and <em>php_binary</em> have. Older serialize handlers
     cannot store numeric index nor string index contains special
     characters (<em>|</em> and <em>!</em>) in
     $_SESSION. Use <em>php_serialize</em> to avoid numeric
     index or special character errors at script shutdown. Defaults
     to <em>php</em>.
    </span>
   </dd>

  </dt>


  <dt id="ini.session.gc-probability">
   <span class="term">
    <em><code class="parameter">session.gc_probability</code></em>
    <span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>
   </span>
   <dd>

    <span class="simpara">
     <em>session.gc_probability</em> in conjunction with
     <em>session.gc_divisor</em> is used to manage probability
     that the gc (garbage collection) routine is started.
     Defaults to <em>1</em>. See <a href="session.configuration.html#ini.session.gc-divisor" class="link">session.gc_divisor</a> for details.
    </span>
   </dd>

  </dt>


  <dt id="ini.session.gc-divisor">
   <span class="term">
    <em><code class="parameter">session.gc_divisor</code></em>
    <span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>
   </span>
   <dd>

    <span class="simpara">
     <em>session.gc_divisor</em> coupled with 
     <em>session.gc_probability</em> defines the probability 
     that the gc (garbage collection) process is started on every session 
     initialization.
     The probability is calculated by using gc_probability/gc_divisor,
     e.g. 1/100 means there is a 1% chance that the GC process starts
     on each request.
     <em>session.gc_divisor</em> defaults to <em>100</em>.
    </span>
   </dd>

  </dt>

  
  <dt id="ini.session.gc-maxlifetime">
   <span class="term">
    <em><code class="parameter">session.gc_maxlifetime</code></em>
    <span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>
   </span>
   <dd>

    <span class="simpara">
     <em>session.gc_maxlifetime</em> specifies the number
     of seconds after which data will be seen as &#039;garbage&#039; and
     potentially cleaned up. Garbage collection may occur during session start
     (depending on <a href="session.configuration.html#ini.session.gc-probability" class="link">session.gc_probability</a> and
     <a href="session.configuration.html#ini.session.gc-divisor" class="link">session.gc_divisor</a>).
    </span>
    <blockquote class="note"><p><strong class="note">Note</strong>: 
     <p class="para">
      If different scripts have different values of
      <em>session.gc_maxlifetime</em> 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 <a href="session.configuration.html#ini.session.save-path" class="link">session.save_path</a>.
     </p>
    </p></blockquote>
    <blockquote class="note"><p><strong class="note">Note</strong>: 
     <span class="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&#039;t have problems with filesystems where atime tracking is not available.
     </span>
    </p></blockquote>
   </dd>

  </dt>


  <dt id="ini.session.referer-check">
   <span class="term">
    <em><code class="parameter">session.referer_check</code></em>
    <span class="type"><a href="language.types.string.html" class="type string">string</a></span>
   </span>
   <dd>

    <span class="simpara">
     <em>session.referer_check</em> 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">
    <em><code class="parameter">session.entropy_file</code></em>
    <span class="type"><a href="language.types.string.html" class="type string">string</a></span>
   </span>
   <dd>

    <span class="simpara">
     <em>session.entropy_file</em> 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
     <em>/dev/random</em> or <em>/dev/urandom</em>
     which are available on many Unix systems.
    </span>
    <span class="simpara">
     This feature is supported on Windows since PHP 5.3.3. Setting 
     <em>session.entropy_length</em> to a non zero value
     will make PHP use the Windows Random API as entropy source.
    </span>
    <blockquote class="note"><p><strong class="note">Note</strong>: 
     <span class="simpara">
      As of PHP 5.4.0 <em>session.entropy_file</em> defaults
      to <em>/dev/urandom</em> or <em>/dev/arandom</em>
      if it is available. In PHP 5.3.0 this directive is left empty by default.
     </span>
    </p></blockquote>
   </dd>

  </dt>


  <dt id="ini.session.entropy-length">
   <span class="term">
    <em><code class="parameter">session.entropy_length</code></em>
    <span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>
   </span>
   <dd>

    <span class="simpara">
     <em>session.entropy_length</em> specifies the number
     of bytes which will be read from the file specified
     above. Defaults to <em>0</em> (disabled).
    </span>
   </dd>

  </dt>


  <dt id="ini.session.use-strict-mode">
   <span class="term">
    <em><code class="parameter">session.use_strict_mode</code></em>
    <span class="type"><a href="language.types.boolean.html" class="type boolean">boolean</a></span>
   </span>
   <dd>

    <span class="simpara">
     <em>session.use_strict_mode</em> specifies whether the
     module will use strict session id mode. If this mode is enabled,
     the module does not accept uninitialized session ID. If uninitialized
     session ID is sent from browser, new session ID is sent to browser.
     Applications are protected from session fixation via session adoption
     with strict mode.
     Defaults to <em>0</em> (disabled).
    </span>
   </dd>

  </dt>


  <dt id="ini.session.use-cookies">
   <span class="term">
    <em><code class="parameter">session.use_cookies</code></em>
    <span class="type"><a href="language.types.boolean.html" class="type boolean">boolean</a></span>
   </span>
   <dd>

    <span class="simpara">
     <em>session.use_cookies</em> specifies whether the
     module will use cookies to store the session id on the client
     side. Defaults to <em>1</em> (enabled).
    </span>
   </dd>

  </dt>


  <dt id="ini.session.use-only-cookies">
   <span class="term">
    <em><code class="parameter">session.use_only_cookies</code></em>
    <span class="type"><a href="language.types.boolean.html" class="type boolean">boolean</a></span>
   </span>
   <dd>

    <span class="simpara">
     <em>session.use_only_cookies</em> 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 <em>1</em> (enabled) since PHP 5.3.0.
    </span>
   </dd>

  </dt>



  <dt id="ini.session.cookie-lifetime">
   <span class="term">
    <em><code class="parameter">session.cookie_lifetime</code></em>
    <span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>
   </span>
   <dd>

    <span class="simpara">
     <em>session.cookie_lifetime</em> specifies the lifetime of
     the cookie in seconds which is sent to the browser. The value 0
     means &quot;until the browser is closed.&quot; Defaults to
     <em>0</em>. See also
      <span class="function"><a href="function.session-get-cookie-params.html" class="function">session_get_cookie_params()</a></span> and
      <span class="function"><a href="function.session-set-cookie-params.html" class="function">session_set_cookie_params()</a></span>.
    </span>
    <blockquote class="note"><p><strong class="note">Note</strong>: 
     <p class="para">
      The expiration timestamp is set relative to the server time, which is
      not necessarily the same as the time in the client&#039;s browser.
     </p>
    </p></blockquote> 
   </dd>

  </dt>


  <dt id="ini.session.cookie-path">
   <span class="term">
    <em><code class="parameter">session.cookie_path</code></em>
    <span class="type"><a href="language.types.string.html" class="type string">string</a></span>
   </span>
   <dd>

    <span class="simpara">
     <em>session.cookie_path</em> specifies path to set
     in the session cookie. Defaults to <em>/</em>. See also
      <span class="function"><a href="function.session-get-cookie-params.html" class="function">session_get_cookie_params()</a></span> and
      <span class="function"><a href="function.session-set-cookie-params.html" class="function">session_set_cookie_params()</a></span>.
    </span>
   </dd>

  </dt>


  <dt id="ini.session.cookie-domain">
   <span class="term">
    <em><code class="parameter">session.cookie_domain</code></em>
    <span class="type"><a href="language.types.string.html" class="type string">string</a></span>
   </span>
   <dd>

    <span class="simpara">
     <em>session.cookie_domain</em> specifies the domain to
     set in the session cookie. Default is none at all meaning the host name of
     the server which generated the cookie according to cookies specification.
     See also  <span class="function"><a href="function.session-get-cookie-params.html" class="function">session_get_cookie_params()</a></span> and
      <span class="function"><a href="function.session-set-cookie-params.html" class="function">session_set_cookie_params()</a></span>.
    </span>
   </dd>

  </dt>


  <dt id="ini.session.cookie-secure">
   <span class="term">
    <em><code class="parameter">session.cookie_secure</code></em>
    <span class="type"><a href="language.types.boolean.html" class="type boolean">boolean</a></span>
   </span>
   <dd>

    <span class="simpara">
     <em>session.cookie_secure</em> specifies whether
     cookies should only be sent over secure connections. Defaults to
     <em>off</em>.
     This setting was added in PHP 4.0.4. See also
      <span class="function"><a href="function.session-get-cookie-params.html" class="function">session_get_cookie_params()</a></span> and
      <span class="function"><a href="function.session-set-cookie-params.html" class="function">session_set_cookie_params()</a></span>.
    </span>
   </dd>

  </dt>


  <dt id="ini.session.cookie-httponly">
   <span class="term">
    <em><code class="parameter">session.cookie_httponly</code></em>
    <span class="type"><a href="language.types.boolean.html" class="type boolean">boolean</a></span>
   </span>
   <dd>

    <span class="simpara">
     Marks the cookie as accessible only through the HTTP protocol. This means
     that the cookie won&#039;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">
    <em><code class="parameter">session.cache_limiter</code></em>
    <span class="type"><a href="language.types.string.html" class="type string">string</a></span>
   </span>
   <dd>

    <span class="simpara">
     <em>session.cache_limiter</em> specifies the cache
     control method used for session pages.
     It may be one of the following values:
     <em>nocache</em>, <em>private</em>, 
     <em>private_no_expire</em>, or <em>public</em>.
     Defaults to <em>nocache</em>. See also the
      <span class="function"><a href="function.session-cache-limiter.html" class="function">session_cache_limiter()</a></span> documentation for
     information about what these values mean.
    </span>
   </dd>

  </dt>



  <dt id="ini.session.cache-expire">
   <span class="term">
    <em><code class="parameter">session.cache_expire</code></em>
    <span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>
   </span>
   <dd>

    <span class="simpara">
     <em>session.cache_expire</em> specifies time-to-live
     for cached session pages in minutes, this has no effect for
     nocache limiter. Defaults to <em>180</em>. See also
      <span class="function"><a href="function.session-cache-expire.html" class="function">session_cache_expire()</a></span>.
    </span>
   </dd>

  </dt>


  <dt id="ini.session.use-trans-sid">
   <span class="term">
    <em><code class="parameter">session.use_trans_sid</code></em>
    <span class="type"><a href="language.types.boolean.html" class="type boolean">boolean</a></span>
   </span>
   <dd>

    <span class="simpara">
     <em>session.use_trans_sid</em> whether transparent
     sid support is enabled or not. Defaults to
     <em>0</em> (disabled).
    </span>
    <blockquote class="note"><p><strong class="note">Note</strong>: 
     <span class="simpara">
      For PHP 4.1.2 or less, it is enabled by compiling with 
      <a href="configure.about.html#configure.enable-trans-sid" class="link">
      <em>--enable-trans-sid</em></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">
    <em><code class="parameter">session.bug_compat_42</code></em>
    <span class="type"><a href="language.types.boolean.html" class="type boolean">boolean</a></span>
   </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">
    <em><code class="parameter">session.bug_compat_warn</code></em>
    <span class="type"><a href="language.types.boolean.html" class="type boolean">boolean</a></span>
   </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">
    <em><code class="parameter">session.hash_function</code></em>
    <span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span>
   </span>
   <dd>

    <span class="simpara">
     <em>session.hash_function</em> allows you to specify the hash
     algorithm used to generate the session IDs. &#039;0&#039; means MD5 (128 bits) and
     &#039;1&#039; means SHA-1 (160 bits).
    </span>
    <p class="para">
     Since PHP 5.3.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 <em>sha512</em> or
     <em>whirlpool</em>. A complete list of supported algorithms can
     be obtained with the  <span class="function"><a href="function.hash-algos.html" class="function">hash_algos()</a></span> function.
    </p>
    <blockquote class="note"><p><strong class="note">Note</strong>: 
     <p class="para">
      This setting was introduced in PHP 5.
     </p>
    </p></blockquote>
   </dd>

  </dt>


  <dt id="ini.session.hash-bits-per-character">
   <span class="term">
    <em><code class="parameter">session.hash_bits_per_character</code></em>
    <span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>
   </span>
   <dd>

    <span class="simpara">
     <em>session.hash_bits_per_character</em> 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 &#039;4&#039; (0-9, a-f),
     &#039;5&#039; (0-9, a-v), and &#039;6&#039; (0-9, a-z, A-Z, &quot;-&quot;, &quot;,&quot;).
    </span>
    <blockquote class="note"><p><strong class="note">Note</strong>: 
     <p class="para">
      This was introduced in PHP 5.
     </p>
    </p></blockquote>
   </dd>

  </dt>


  <dt id="ini.url-rewriter.tags">
   <span class="term">
    <em><code class="parameter">url_rewriter.tags</code></em>
    <span class="type"><a href="language.types.string.html" class="type string">string</a></span>
   </span>
   <dd>

    <span class="simpara">
     <em>url_rewriter.tags</em> specifies which HTML tags
     are rewritten to include session id if transparent sid support
     is enabled. Defaults to
     <em>a=href,area=href,frame=src,input=src,form=fakeentry,fieldset=</em>
    </span>
    <blockquote class="note"><p><strong class="note">Note</strong>: 
     <span class="simpara">
      If you want HTML/XHTML strict conformity, remove the <em>form</em> entry and
      use the &lt;fieldset&gt; tags around your form fields.
     </span>
    </p></blockquote>
   </dd>

  </dt>


  <dt id="ini.session.upload-progress.enabled">
   <span class="term">
    <em><code class="parameter">session.upload_progress.enabled</code></em>
    <span class="type"><a href="language.types.boolean.html" class="type boolean">boolean</a></span>
   </span>
   <dd>

    <span class="simpara">
     Enables upload progress tracking, populating the <var class="varname"><var class="varname"><a href="reserved.variables.session.html" class="classname">$_SESSION</a></var></var> variable.
     Defaults to 1, enabled.
    </span>
   </dd>

  </dt>


  <dt id="ini.session.upload-progress.cleanup">
   <span class="term">
    <em><code class="parameter">session.upload_progress.cleanup</code></em>
    <span class="type"><a href="language.types.boolean.html" class="type boolean">boolean</a></span>
   </span>
   <dd>

    <span class="simpara">
     Cleanup the progress information as soon as all POST data has been read
     (i.e. upload completed). Defaults to 1, enabled.
    </span>
    <blockquote class="note"><p><strong class="note">Note</strong>: 
     <span class="simpara">
      It is highly recommended to keep this feature enabled.
     </span>
    </p></blockquote>
   </dd>

  </dt>


  <dt id="ini.session.upload-progress.prefix">
   <span class="term">
    <em><code class="parameter">session.upload_progress.prefix</code></em>
    <span class="type"><a href="language.types.string.html" class="type string">string</a></span>
   </span>
   <dd>

    <span class="simpara">
     A prefix used for the upload progress key in the <var class="varname"><var class="varname"><a href="reserved.variables.session.html" class="classname">$_SESSION</a></var></var>.
     This key will be concatenated with the value of
     <em>$_POST[ini_get(&quot;session.upload_progress.name&quot;)]</em> to
     provide a unique index.
    </span>
    <span class="simpara">
     Defaults to &quot;upload_progress_&quot;.
    </span>
   </dd>

  </dt>


  <dt id="ini.session.upload-progress.name">
   <span class="term">
    <em><code class="parameter">session.upload_progress.name</code></em>
    <span class="type"><a href="language.types.string.html" class="type string">string</a></span>
   </span>
   <dd>

    <span class="simpara">
     The name of the key to be used in <var class="varname"><var class="varname"><a href="reserved.variables.session.html" class="classname">$_SESSION</a></var></var> storing
     the progress information. See also
     <a href="session.configuration.html#ini.session.upload-progress.prefix" class="link">session.upload_progress.prefix</a>.
    </span>
    <span class="simpara">
     If <em>$_POST[ini_get(&quot;session.upload_progress.name&quot;)]</em>
     is not passed or available, upload progressing will not be recorded.
    </span>
    <span class="simpara">
     Defaults to &quot;PHP_SESSION_UPLOAD_PROGRESS&quot;.
    </span>
   </dd>

  </dt>


  <dt id="ini.session.upload-progress.freq">
   <span class="term">
    <em><code class="parameter">session.upload_progress.freq</code></em>
    <span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span>
   </span>
   <dd>

    <span class="simpara">
     Defines how often the upload progress information should be updated.
     This can be defined in bytes (i.e. &quot;update progress information after every 100 bytes&quot;), or in percentages (i.e. &quot;update progress information after receiving every 1% of the whole filesize&quot;).
    </span>
    <span class="simpara">
     Defaults to &quot;1%&quot;.
    </span>
   </dd>

  </dt>


  <dt id="ini.session.upload-progress.min-freq">
   <span class="term">
    <em><code class="parameter">session.upload_progress.min_freq</code></em>
    <span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>
   </span>
   <dd>

    <span class="simpara">
     The minimum delay between updates, in seconds.
     Defaults to &quot;1&quot; (one second).
    </span>
   </dd>

  </dt>


 </dl>

 </p>

 <p class="para">
  The <a href="ini.core.html#ini.track-vars" class="link"><em>track_vars</em></a> and
  <a href="ini.core.html#ini.register-globals" class="link"><em>register_globals</em></a>
  configuration settings influence how the session variables get
  stored and restored.
 </p>

 <p class="para">
  Upload progress will not be registered unless
  session.upload_progress.enabled is enabled, and the
  $_POST[ini_get(&quot;session.upload_progress.name&quot;)] variable is set.
  See <a href="session.upload-progress.html" class="link">Session Upload Progress</a> for mor details on this functionality.
 </p>

 <blockquote class="note"><p><strong class="note">Note</strong>: 
  <p class="para">
   As of PHP 4.0.3, <a href="ini.core.html#ini.track-vars" class="link"><em>track_vars</em></a> is
   always turned on.
  </p>
 </p></blockquote>

</div><hr /><div class="manualnavbar" 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>