php-doc-en/reference/phar/ini.xml
Jakub Vrana f052ac1bd7 Revert useless change in 326638
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@323642 c90b9560-bf6c-de11-be94-00142212c4b1
2012-02-29 00:24:15 +00:00

191 lines
5.8 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<section xml:id="phar.configuration" xmlns="http://docbook.org/ns/docbook">
&reftitle.runtime;
&extension.runtime;
<para>
<table>
<title>Filesystem and Streams Configuration Options</title>
<tgroup cols="4">
<thead>
<row>
<entry>&Name;</entry>
<entry>&Default;</entry>
<entry>&Changeable;</entry>
<entry>&Changelog;</entry>
</row>
</thead>
<tbody>
<row>
<entry><link linkend="ini.phar.readonly">phar.readonly</link></entry>
<entry>"1"</entry>
<entry>PHP_INI_ALL</entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.phar.require-hash">phar.require_hash</link></entry>
<entry>"1"</entry>
<entry>PHP_INI_ALL</entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.phar.extract-list">phar.extract_list</link></entry>
<entry>""</entry>
<entry>PHP_INI_ALL</entry>
<entry>Available from phar 1.1.0 to 1.2.3, removed in 2.0.0.</entry>
</row>
<row>
<entry><link linkend="ini.phar.cache-list">phar.cache_list</link></entry>
<entry>""</entry>
<entry>PHP_INI_SYSTEM</entry>
<entry>Available from phar 2.0.0.</entry>
</row>
</tbody>
</tgroup>
</table>
</para>
&ini.descriptions.title;
<para>
<variablelist>
<varlistentry xml:id="ini.phar.readonly">
<term>
<parameter>phar.readonly</parameter>
<type>boolean</type>
</term>
<listitem>
<para>
This option disables creation or modification of Phar archives
using the <literal>phar</literal> stream or <classname>Phar</classname>
object's write support. This setting should always be enabled on
production machines, as the phar extension's convenient write support
could allow straightforward creation of a php-based virus when coupled
with other common security vulnerabilities.
</para>
<note>
<para>
This setting can only be unset in php.ini due to security reasons.
If <literal>phar.readonly</literal> is disabled in php.ini, the
user may enable <literal>phar.readonly</literal> in a script
or disable it later. If <literal>phar.readonly</literal> is
enabled in php.ini, a script may harmlessly &quot;re-enable&quot;
the INI variable, but may not disable it.
</para>
</note>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.phar.require-hash">
<term>
<parameter>phar.require_hash</parameter>
<type>boolean</type>
</term>
<listitem>
<para>
This option will force all opened Phar archives to contain some
kind of signature (currently MD5, SHA1, SHA256 and SHA512 are supported), and will
refuse to process any Phar archive that does not contain a signature.
</para>
<note>
<para>
This setting can only be unset in php.ini due to security reasons.
If <literal>phar.require_hash</literal> is disabled in php.ini, the
user may enable <literal>phar.require_hash</literal> in a script
or disable it later. If <literal>phar.require_hash</literal> is
enabled in php.ini, a script may harmlessly &quot;re-enable&quot;
the INI variable, but may not disable it.
</para>
<para>
This setting does not affect reading plain tar files with the
<classname>PharData</classname> class.
</para>
</note>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.phar.extract-list">
<term>
<parameter>phar.extract_list</parameter>
<type>string</type>
</term>
<listitem>
<para>
This INI setting has been removed as of phar 2.0.0
</para>
<para>
Allows mappings from a full path to a phar archive or its alias to
the location of its extracted files.
The format of the parameter is <literal>name=archive,name2=archive2</literal>.
This allows extraction of phar files to disk, and allows phar to act as a
kind of mapper to extracted disk files. This is often done for performance
reasons, or to assist with debugging a phar.
<example>
<title>phar.extract_list usage example</title>
<programlisting role="php">
<![CDATA[
in php.ini:
phar.extract_list = archive=/full/path/to/archive/,arch2=/full/path/to/arch2
<?php
include "phar://archive/content.php";
include "phar://arch2/foo.php";
?>
]]>
</programlisting>
</example>
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ini.phar.cache-list">
<term>
<parameter>phar.cache_list</parameter>
<type>string</type>
</term>
<listitem>
<para>
This INI setting was added in phar 2.0.0
</para>
<para>
Allows mapping phar archives to be pre-parsed at web server startup,
providing a performance improvement that brings running files out of a
phar archive very close to the speed of running those files from a
traditional disk-based installation.
<example>
<title>phar.cache_list usage example</title>
<programlisting>
<![CDATA[
in php.ini (windows):
phar.cache_list =C:\path\to\phar1.phar;C:\path\to\phar2.phar
in php.ini (unix):
phar.cache_list =/path/to/phar1.phar:/path/to/phar2.phar
]]>
</programlisting>
</example>
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</section>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->