cvs: phpdoc-it /appendices reserved.xml /features safe-mode.xml /reference/session ini.xml
| From: | Marco Cucinato | Date: | Tue, 08 Mar 2005 17:00:00 +0000 |
| Subject: | cvs: phpdoc-it /appendices reserved.xml /features safe-mode.xml /reference/session ini.xml | ||
| Groups: | php.doc.it | ||
| Request: | Send a blank email to doc-it+get-687@lists.php.net to get a copy of this message | ||
cucinato Tue Mar 8 12:00:00 2005 EDT
Added files:
/phpdoc-it/reference/session ini.xml
Modified files:
/phpdoc-it/appendices reserved.xml
/phpdoc-it/features safe-mode.xml
Log:
Sync to EN tree to avoid 'make test' errors (Missing IDs)
Still working on them.
http://cvs.php.net/diff.php/phpdoc-it/appendices/reserved.xml?r1=1.11&r2=1.12&ty=u Index: phpdoc-it/appendices/reserved.xml diff -u phpdoc-it/appendices/reserved.xml:1.11 phpdoc-it/appendices/reserved.xml:1.12 --- phpdoc-it/appendices/reserved.xml:1.11 Fri Jan 30 15:37:34 2004 +++ phpdoc-it/appendices/reserved.xml Tue Mar 8 11:59:59 2005 @@ -1,230 +1,1296 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- EN-Revision: 1.14 Maintainer: cortesi Status: ready --> -<appendix id="reserved"> - <title>Parole riservate nel PHP</title> - <para> - Questa è la lista delle parole riservate nel PHP, tipicamente - <link linkend="language.constants">costanti</link> e - delle <link linkend="language.variables.predefined">variabili predefinite</link>. - In questa lista non sono elencate le funzioni, ma solo i costrutti del - linguaggio. I nomi qui elencati non devono essere utilizzati come nomi di variabili, funzioni, - costanti o metodi, ciò porterebbe inevitabilmente a creare confusioni. - <simplelist columns="3"> - <member> - <link linkend="language.operators.logical">and</link> - </member> - <member> - <link linkend="language.variables.predefined.php">$argv</link> - </member> - <member> - <link linkend="control-structures.foreach">as</link> - </member> - <member> - <link linkend="language.variables.predefined.php">$argc</link> - </member> - <member> - <link linkend="control-structures.break">break</link> - </member> - <member> - <link linkend="control-structures.switch">case</link> - </member> - <member> - <link linkend="functions.old-syntax">cfunction</link> - </member> - <member> - <link linkend="keyword.class">class</link> - </member> - <member> - <link linkend="control-structures.continue">continue</link> - </member> - <member> - <link linkend="control-structures.declare">declare</link> - </member> - <member> - <link linkend="control-structures.switch">default</link> - </member> - <member> - <link linkend="control-structures.do.while">do</link> - </member> - <member> - <function>die</function> - </member> - <member> - <function>echo</function> - </member> - <member> - <link linkend="control-structures.else">else</link> - </member> - <member> - <link linkend="control-structures.elseif">elseif</link> - </member> - <member> - <function>empty</function> - </member> - <member> - <link linkend="control-structures.declare">enddeclare</link> - </member> - <member> - <link linkend="control-structures.alternative-syntax">endfor</link> - </member> - <member> - <link linkend="control-structures.alternative-syntax">endforeach</link> - </member> - <member> - <link linkend="control-structures.alternative-syntax">endif</link> - </member> - <member> - <link linkend="control-structures.alternative-syntax">endswitch</link> - </member> - <member> - <link linkend="control-structures.alternative-syntax">endwhile</link> - </member> - <member> - <link linkend="language.constants">E_ALL</link> - </member> - <member> - <link linkend="language.constants">E_PARSE</link> - </member> - <member> - <link linkend="language.constants">E_ERROR</link> - </member> - <member> - <link linkend="language.constants">E_WARNING</link> - </member> - <member> - <link linkend="function.eval">eval</link> - </member> - <member> - <function>exit</function> - </member> - <member> - <link linkend="keyword.class">extends</link> - </member> - <member> - <link linkend="language.constants">&false;</link> - </member> - <member> - <link linkend="control-structures.for">for</link> - </member> - <member> - <link linkend="control-structures.foreach">foreach</link> - </member> - <member> - <link linkend="functions.user-defined">function</link> - </member> - <member> - <link linkend="language.variables.predefined.php">$HTTP_COOKIE_VARS</link> - </member> - <member> - <link linkend="language.variables.predefined.php">$HTTP_GET_VARS</link> - </member> - <member> - <link linkend="language.variables.predefined.php">$HTTP_POST_VARS</link> - </member> - <member> - <link linkend="language.variables.predefined.php">$HTTP_POST_FILES</link> - </member> - <member> - <link linkend="language.variables.predefined.php">$HTTP_ENV_VARS</link> - </member> - <member> - <link linkend="language.variables.predefined.php">$HTTP_SERVER_VARS</link> - </member> - <member> - <link linkend="control-structures.if">if</link> - </member> - <member> - <function>include</function> - </member> - <member> - <function>include_once</function> - </member> - <member> - <link linkend="language.variables.scope">global</link> - </member> - <member> - <function>list</function> - </member> - <member> - <link linkend="keyword.class">new</link> - </member> - <member> - <link linkend="language.operators.logical">not</link> - </member> - <member> - <link linkend="language.constants.predefined">NULL</link> - </member> - <member> - <link linkend="functions.old-syntax">old_function</link> - </member> - <member> - <link linkend="language.operators.logical">or</link> - </member> - <member> - <link linkend="keyword.parent">parent</link> - </member> - <member> - <link linkend="language.constants">PHP_OS</link> - </member> - <member> - <link linkend="language.variables.predefined.php">$PHP_SELF</link> - </member> - <member> - <link linkend="language.constants">PHP_VERSION</link> - </member> - <member> - <function>print</function> - </member> - <member> - <function>require</function> - </member> - <member> - <function>require_once</function> - </member> - <member> - <function>return</function> - </member> - <member> - <link linkend="language.variables.scope">static</link> - </member> - <member> - <link linkend="control-structures.switch">switch</link> - </member> - <member> - <link linkend="keyword.class">stdClass</link> - </member> - <member> - <link linkend="keyword.class">$this</link> - </member> - <member> - <link linkend="language.constants">&true;</link> - </member> - <member> - <link linkend="keyword.class">var</link> - </member> - <member> - <link linkend="language.operators.logical">xor</link> - </member> - <member> - <function>virtual</function> - </member> - <member> - <link linkend="control-structures.while">while</link> - </member> - <member> - <link linkend="language.constants">__FILE__</link> - </member> - <member> - <link linkend="language.constants">__LINE__</link> - </member> - <member> - <link linkend="language.oop.magic-functions">__sleep</link> - </member> - <member> - <link linkend="language.oop.magic-functions">__wakeup</link> - </member> - </simplelist> - </para> +<!-- EN-Revision: 1.53 Maintainer: cucinato Status: working --> +<!-- CREDITS: cortesi --> + <appendix id="reserved"> + <title>Parole riservate nel PHP</title> + <para> + Questa è la lista delle parole riservate nel PHP. Nessuno + di questi identificatori deve essere utilizzato negli + script. Questa lista include parole chiave e variabili predefinite, + costanti e nomi di classi. Questa lista non è né esaustiva né + completa. + </para> + + <sect1 id="reserved.keywords"> + <title>Lista delle parole chiave</title> + <simpara> + Queste parole hanno significato speciale per il PHP. Alcune di esse rappresentano cose + che assomigliano a funzioni, altri a costanti, e così via. Ma + non lo sono, in verità : sono costrutti del linguaggi. non si deve utilizzare + nessuna di queste parole come costante, nome di classe, funzione o nome di metodo. + L'utilizzo come nomi di variabili normalmente funziona, ma questo può generare confusione. + </simpara> + + <table> + <title>Parole chiave</title> + <tgroup cols="5"> + <tbody> + <row> + <entry> + <link linkend="language.operators.logical">and</link> + </entry> + <entry> + <link linkend="language.operators.logical">or</link> + </entry> + <entry> + <link linkend="language.operators.logical">xor</link> + </entry> + <entry> + <link linkend="language.constants.predefined">__FILE__</link> + </entry> + <entry> + <link linkend="reserved.classes.php5">exception</link> (PHP 5) + </entry> + </row> + <row> + <entry> + <link linkend="language.constants.predefined">__LINE__</link> + </entry> + <entry> + <function>array</function> + </entry> + <entry> + <link linkend="control-structures.foreach">as</link> + </entry> + <entry> + <link linkend="control-structures.break">break</link> + </entry> + <entry> + <link linkend="control-structures.switch">case</link> + </entry> + </row> + <row> + <entry> + <link linkend="keyword.class">class</link> + </entry> + <entry> + <link linkend="language.oop5.constants">const</link> + </entry> + <entry> + <link linkend="control-structures.continue">continue</link> + </entry> + <entry> + <link linkend="control-structures.declare">declare</link> + </entry> + <entry> + <link linkend="control-structures.switch">default</link> + </entry> + </row> + <row> + <entry> + <function>die</function> + </entry> + <entry> + <link linkend="control-structures.do.while">do</link> + </entry> + <entry> + <function>echo</function> + </entry> + <entry> + <link linkend="control-structures.else">else</link> + </entry> + <entry> + <link linkend="control-structures.elseif">elseif</link> + </entry> + </row> + <row> + <entry> + <function>empty</function> + </entry> + <entry> + <link linkend="control-structures.declare">enddeclare</link> + </entry> + <entry> + <link linkend="control-structures.alternative-syntax">endfor</link> + </entry> + <entry> + <link linkend="control-structures.alternative-syntax">endforeach</link> + </entry> + <entry> + <link linkend="control-structures.alternative-syntax">endif</link> + </entry> + </row> + <row> + <entry> + <link linkend="control-structures.alternative-syntax">endswitch</link> + </entry> + <entry> + <link linkend="control-structures.alternative-syntax">endwhile</link> + </entry> + <entry> + <function>eval</function> + </entry> + <entry> + <function>exit</function> + </entry> + <entry> + <link linkend="keyword.class">extends</link> + </entry> + </row> + <row> + <entry> + <link linkend="control-structures.for">for</link> + </entry> + <entry> + <link linkend="control-structures.foreach">foreach</link> + </entry> + <entry> + <link linkend="functions.user-defined">function</link> + </entry> + <entry> + <link linkend="language.variables.scope">global</link> + </entry> + <entry> + <link linkend="control-structures.if">if</link> + </entry> + </row> + <row> + <entry> + <function>include</function> + </entry> + <entry> + <function>include_once</function> + </entry> + <entry> + <function>isset</function> + </entry> + <entry> + <function>list</function> + </entry> + <entry> + <link linkend="keyword.class">new</link> + </entry> + </row> + <row> + <entry> + <function>print</function> + </entry> + <entry> + <function>require</function> + </entry> + <entry> + <function>require_once</function> + </entry> + <entry> + <function>return</function> + </entry> + <entry> + <link linkend="language.variables.scope">static</link> + </entry> + </row> + <row> + <entry> + <link linkend="control-structures.switch">switch</link> + </entry> + <entry> + <function>unset</function> + </entry> + <entry> + use + </entry> + <entry> + <link linkend="keyword.class">var</link> + </entry> + <entry> + <link linkend="control-structures.while">while</link> + </entry> + </row> + <row> + <entry> + <link linkend="language.constants.predefined">__FUNCTION__</link> + </entry> + <entry> + <link linkend="language.constants.predefined">__CLASS__</link> + </entry> + <entry> + <link linkend="language.constants.predefined">__METHOD__</link> + </entry> + <entry> + <link linkend="language.oop5.final">final</link> (PHP 5) + </entry> + <entry> + <link linkend="reserved.classes.php5">php_user_filter</link> (PHP 5) + </entry> + </row> + <row> + <entry> + <link linkend="language.oop5.interfaces">interface</link> (PHP 5) + </entry> + <entry> + <link linkend="language.oop5.interfaces">implements</link> (PHP 5) + </entry> + <entry> + <link linkend="language.oop5.basic">extends</link> + </entry> + <entry> + <link linkend="language.oop5.visibility">public</link> (PHP 5) + </entry> + <entry> + <link linkend="language.oop5.visibility">private</link> (PHP 5) + </entry> + </row> + <row> + <entry> + <link linkend="language.oop5.visibility">protected</link> (PHP 5) + </entry> + <entry> + <link linkend="language.oop5.abstract">abstract</link> (PHP 5) + </entry> + <entry> + <link linkend="language.oop5.cloning">clone</link> (PHP 5) + </entry> + <entry> + <link linkend="language.exceptions">try</link> (PHP 5) + </entry> + <entry> + <link linkend="language.exceptions">catch</link> (PHP 5) + </entry> + </row> + <row> + <entry> + <link linkend="language.exceptions">throw</link> (PHP 5) + </entry> + <entry> + <link linkend="migration.old-function">cfunction</link> (PHP 4 only) + </entry> + <entry> + <link linkend="migration.old-function">old_function</link> (PHP 4 only) + </entry> + <entry> + </entry> + <entry> + </entry> + </row> + </tbody> + </tgroup> + </table> + </sect1> + + <sect1 id="reserved.variables"> + <title>Variabili predefinite</title> + + <para> + A partire dal PHP 4.1.0, il metodo raccomandato per ottenere le + <link linkend="language.variables.external">variabili esterne</link> è + quello di usare i superglobals, come spiegato più sotto. In precedenza, gli sviluppatori si appoggiavano + ai <link linkend="ini.register-globals">register_globals</link> + o agli array predefiniti (<varname>$HTTP_*_VARS</varname>). + + &avail.register-long-arrays; + </para> + + <sect2 id="reserved.variables.server"> + <title>Variabili di server: <varname>$_SERVER</varname></title> + <note> + <simpara> + Introdotta dal PHP 4.1.0. Nelle versioni precedenti, utilizzare + <varname>$HTTP_SERVER_VARS</varname>. + </simpara> + </note> + + <simpara> + <varname>$_SERVER</varname> è un array che contiene informazioni + quali header, percorsi e posizioni degli script. Le voci in questo + array sono create dal server web. non c'è garanzia che + ogni server web fornisca queste informazioni; i server possono ometterne alcune, + oppure fornirne altre non contemplate qui. Detto questo, gran parte di + queste variabili sono contemplate nelle <ulink + url="&url.cgispec;">specifiche CGI 1.1</ulink>, quindi è molto probabile + ritrovarle in questo array. + </simpara> + + <simpara> + Questo array è una variabile 'superglobal', o globale automatica. Ciò + siginifica che è disponibile in tutti gli scope all'interno di uno + script. Non è necessario scrivere <command>global + $_SERVER;</command> per accedervi in una funzione o metodo, come + invece occorreva fare con <varname>$HTTP_SERVER_VARS</varname>. + </simpara> + + <simpara> + <varname>$HTTP_SERVER_VARS</varname> contiene le stesse informazioni, + ma non è autoglobal. (si noti che + <varname>$HTTP_SERVER_VARS</varname> e <varname>$_SERVER</varname> + sono variabili distinte e che PHP le tratta di conseguenza) + </simpara> + + <simpara> + Se la direttiva <link + linkend="ini.register-globals">register_globals</link> + è impostata, queste informazioni saranno rese disponibili anche nello + scope globale dello script; quindi in variabili diverse da + <varname>$_SERVER</varname> e <varname>$HTTP_SERVER_VARS</varname> + arrays. Per la documentazione correlata, vedere il capitolo sulla sicurezza intitolato + <link linkend="security.globals">Utilizzo dei Register + Globals</link>. Queste variabili globali individuali non sono autoglobal. + </simpara> + + <simpara> + You may or may not find any of the following elements in + $_SERVER. Note that few, if any, of these will be available (or + indeed have any meaning) if running PHP on the command line. + </simpara> + + <para> + <variablelist> + <varlistentry> + <term>'<varname>PHP_SELF</varname>'</term> + <listitem> + <simpara> + The filename of the currently executing script, relative to + the document root. For instance, + <varname>$_SERVER['PHP_SELF']</varname> in a script at the + address <filename>http://example.com/test.php/foo.bar</filename> + would be <filename>/test.php/foo.bar</filename>. + The <link linkend="language.constants.predefined">__FILE__</link> + constant contains the full path and filename of the current (i.e. + included) file. + </simpara> + <simpara> + If PHP is running as a command-line processor this variable contains + the script name since PHP 4.3.0. Previously it was not available. + </simpara> + </listitem> + </varlistentry> + + <varlistentry> + <term>'<varname>argv</varname>'</term> + <listitem> + <simpara> + Array of arguments passed to the script. When the script is + run on the command line, this gives C-style access to the + command line parameters. When called via the GET method, this + will contain the query string. + </simpara> + </listitem> + </varlistentry> + + <varlistentry> + <term>'<varname>argc</varname>'</term> + <listitem> + <simpara> + Contains the number of command line parameters passed to the + script (if run on the command line). + </simpara> + </listitem> + </varlistentry> + + <varlistentry> + <term>'<varname>GATEWAY_INTERFACE</varname>'</term> + <listitem> + <simpara> + What revision of the CGI specification the server is using; + i.e. '<literal>CGI/1.1</literal>'. + </simpara> + </listitem> + </varlistentry> + + <varlistentry> + <term>'<varname>SERVER_NAME</varname>'</term> + <listitem> + <simpara> + The name of the server host under which the current script is + executing. If the script is running on a virtual host, this + will be the value defined for that virtual host. + </simpara> + </listitem> + </varlistentry> + + <varlistentry> + <term>'<varname>SERVER_SOFTWARE</varname>'</term> + <listitem> + <simpara> + Server identification string, given in the headers when + responding to requests. + </simpara> + </listitem> + </varlistentry> + + <varlistentry> + <term>'<varname>SERVER_PROTOCOL</varname>'</term> + <listitem> + <simpara> + Name and revision of the information protocol via which the + page was requested; i.e. '<literal>HTTP/1.0</literal>'; + </simpara> + </listitem> + </varlistentry> + + <varlistentry> + <term>'<varname>REQUEST_METHOD</varname>'</term> + <listitem> + <simpara> + Which request method was used to access the page; i.e. '<literal>GET</literal>', + '<literal>HEAD</literal>', '<literal>POST</literal>', '<literal>PUT</literal>'. + </simpara> + </listitem> + </varlistentry> + + <varlistentry> + <term>'<varname>REQUEST_TIME</varname>'</term> + <listitem> + <simpara> + The timestamp of the start of the request. Available since PHP 5.1.0. + </simpara> + </listitem> + </varlistentry> + + <varlistentry> + <term>'<varname>QUERY_STRING</varname>'</term> + <listitem> + <simpara> + The query string, if any, via which the page was accessed. + </simpara> + </listitem> + </varlistentry> + + <varlistentry> + <term>'<varname>DOCUMENT_ROOT</varname>'</term> + <listitem> + <simpara> + The document root directory under which the current script is + executing, as defined in the server's configuration file. + </simpara> + </listitem> + </varlistentry> + + <varlistentry> + <term>'<varname>HTTP_ACCEPT</varname>'</term> + <listitem> + <simpara> + Contents of the <literal>Accept:</literal> header from the + current request, if there is one. + </simpara> + </listitem> + </varlistentry> + + <varlistentry> + <term>'<varname>HTTP_ACCEPT_CHARSET</varname>'</term> + <listitem> + <simpara> + Contents of the <literal>Accept-Charset:</literal> header + from the current request, if there is one. Example: + '<literal>iso-8859-1,*,utf-8</literal>'. + </simpara> + </listitem> + </varlistentry> + + <varlistentry> + <term>'<varname>HTTP_ACCEPT_ENCODING</varname>'</term> + <listitem> + <simpara> + Contents of the <literal>Accept-Encoding:</literal> header + from the current request, if there is one. Example: '<literal>gzip</literal>'. + </simpara> + </listitem> + </varlistentry> + + <varlistentry> + <term>'<varname>HTTP_ACCEPT_LANGUAGE</varname>'</term> + <listitem> + <simpara> + Contents of the <literal>Accept-Language:</literal> header + from the current request, if there is one. Example: '<literal>en</literal>'. + </simpara> + </listitem> + </varlistentry> + + <varlistentry> + <term>'<varname>HTTP_CONNECTION</varname>'</term> + <listitem> + <simpara> + Contents of the <literal>Connection:</literal> header from + the current request, if there is one. Example: '<literal>Keep-Alive</literal>'. + </simpara> + </listitem> + </varlistentry> + + <varlistentry> + <term>'<varname>HTTP_HOST</varname>'</term> + <listitem> + <simpara> + Contents of the <literal>Host:</literal> header from the + current request, if there is one. + </simpara> + </listitem> + </varlistentry> + + <varlistentry> + <term>'<varname>HTTP_REFERER</varname>'</term> + <listitem> + <simpara> + The address of the page (if any) which referred the user + agent to the current page. This is set by the user agent. Not + all user agents will set this, and some provide the ability + to modify <varname>HTTP_REFERER</varname> as a feature. In + short, it cannot really be trusted. + </simpara> + </listitem> + </varlistentry> + + <varlistentry> + <term>'<varname>HTTP_USER_AGENT</varname>'</term> + <listitem> + <simpara> + Contents of the <literal>User-Agent:</literal> header from + the current request, if there is one. This is a string + denoting the user agent being which is accessing the page. A + typical example is: <computeroutput>Mozilla/4.5 [en] (X11; U; + Linux 2.2.9 i586)</computeroutput>. Among other things, you + can use this value with <function>get_browser</function> to + tailor your page's output to the capabilities of the user + agent. + </simpara> + </listitem> + </varlistentry> + + <varlistentry> + <term>'<varname>REMOTE_ADDR</varname>'</term> + <listitem> + <simpara> + The IP address from which the user is viewing the current + page. + </simpara> + </listitem> + </varlistentry> + + <varlistentry> + <term>'<varname>REMOTE_HOST</varname>'</term> + <listitem> + <simpara> + The Host name from which the user is viewing the current + page. The reverse dns lookup is based off the + <varname>REMOTE_ADDR</varname> of the user. + </simpara> + <note> + <simpara> + Your web server must be configured to create this variable. For + example in Apache you'll need <literal>HostnameLookups On</literal> + inside &httpd.conf; for it to exist. See also + <function>gethostbyaddr</function>. + </simpara> + </note> + </listitem> + </varlistentry> + + <varlistentry> + <term>'<varname>REMOTE_PORT</varname>'</term> + <listitem> + <simpara> + The port being used on the user's machine to communicate with + the web server. + </simpara> + </listitem> + </varlistentry> + + <varlistentry> + <term>'<varname>SCRIPT_FILENAME</varname>'</term> + <listitem> + <para> + The absolute pathname of the currently executing script. + <note> + <para> + If a script is executed with the CLI, as a relative path, + such as <filename>file.php</filename> or + <filename>../file.php</filename>, + <varname>$_SERVER['SCRIPT_FILENAME']</varname> will + contain the relative path specified by the user. + </para> + </note> + </para> + </listitem> + </varlistentry> + + <varlistentry> + <term>'<varname>SERVER_ADMIN</varname>'</term> + <listitem> + <simpara> + The value given to the SERVER_ADMIN (for Apache) directive in + the web server configuration file. If the script is running + on a virtual host, this will be the value defined for that + virtual host. + </simpara> + </listitem> + </varlistentry> + + <varlistentry> + <term>'<varname>SERVER_PORT</varname>'</term> + <listitem> + <simpara> + The port on the server machine being used by the web server + for communication. For default setups, this will be '<literal>80</literal>'; + using SSL, for instance, will change this to whatever your + defined secure HTTP port is. + </simpara> + </listitem> + </varlistentry> + + <varlistentry> + <term>'<varname>SERVER_SIGNATURE</varname>'</term> + <listitem> + <simpara> + String containing the server version and virtual host name + which are added to server-generated pages, if enabled. + </simpara> + </listitem> + </varlistentry> + + <varlistentry> + <term>'<varname>PATH_TRANSLATED</varname>'</term> + <listitem> + <simpara> + Filesystem- (not document root-) based path to the current + script, after the server has done any virtual-to-real + mapping. + </simpara> + <note> + <simpara> + As of PHP 4.3.2, <envar>PATH_TRANSLATED</envar> is no longer set + implicitly under the Apache 2 <acronym>SAPI</acronym> in contrast + to the situation in Apache 1, where it's set to the same value as + the <envar>SCRIPT_FILENAME</envar> server variable when it's not + populated by Apache. This change was made to comply with the + <acronym>CGI</acronym> specification that + <envar>PATH_TRANSLATED</envar> should only exist if + <envar>PATH_INFO</envar> is defined. + </simpara> + <simpara> + Apache 2 users may use <literal>AcceptPathInfo = On</literal> inside + <filename>httpd.conf</filename> to define <envar>PATH_INFO</envar>. + </simpara> + </note> + </listitem> + </varlistentry> + + <varlistentry> + <term>'<varname>SCRIPT_NAME</varname>'</term> + <listitem> + <simpara> + Contains the current script's path. This is useful for pages + which need to point to themselves. + The <link linkend="language.constants.predefined">__FILE__</link> + constant contains the full path and filename of the current (i.e. + included) file. + </simpara> + </listitem> + </varlistentry> + + <varlistentry> + <term>'<varname>REQUEST_URI</varname>'</term> + <listitem> + <simpara> + The URI which was given in order to access this page; for + instance, '<literal>/index.html</literal>'. + </simpara> + </listitem> + </varlistentry> + + <varlistentry> + <term>'<varname>PHP_AUTH_USER</varname>'</term> + <listitem> + <simpara> + When running under Apache as module doing HTTP authentication this + variable is set to the username provided by the user. + </simpara> + </listitem> + </varlistentry> + + <varlistentry> + <term>'<varname>PHP_AUTH_PW</varname>'</term> + <listitem> + <simpara> + When running under Apache as module doing HTTP authentication this + variable is set to the password provided by the user. + </simpara> + </listitem> + </varlistentry> + + <varlistentry> + <term>'<varname>AUTH_TYPE</varname>'</term> + <listitem> + <simpara> + When running under Apache as module doing HTTP authenticated this + variable is set to the authentication type. + </simpara> + </listitem> + </varlistentry> + + </variablelist> + </para> + + </sect2> + + <sect2 id="reserved.variables.environment"> + <title>Environment variables: <varname>$_ENV</varname></title> + + <note> + <simpara> + Introduced in 4.1.0. In earlier versions, use + <varname>$HTTP_ENV_VARS</varname>. + </simpara> + </note> + + <simpara> + These variables are imported into PHP's global namespace from the + environment under which the PHP parser is running. Many are + provided by the shell under which PHP is running and different + systems are likely running different kinds of shells, a + definitive list is impossible. Please see your shell's + documentation for a list of defined environment variables. + </simpara> + + <simpara> + Other environment variables include the CGI variables, placed + there regardless of whether PHP is running as a server module or + CGI processor. + </simpara> + + <simpara> + This is a 'superglobal', or automatic global, variable. This + simply means that it is available in all scopes throughout a + script. You don't need to do a <command>global + $_ENV;</command> to access it within functions or methods, as + you do with <varname>$HTTP_ENV_VARS</varname>. + </simpara> + + <simpara> + <varname>$HTTP_ENV_VARS</varname> contains the same initial + information, but is not an autoglobal. (Note that + <varname>$HTTP_ENV_VARS</varname> and <varname>$_ENV</varname> + are different variables and that PHP handles them as such) + </simpara> + + <simpara> + If the <link + linkend="ini.register-globals">register_globals</link> directive + is set, then these variables will also be made available in the + global scope of the script; i.e., separate from the + <varname>$_ENV</varname> and <varname>$HTTP_ENV_VARS</varname> + arrays. For related information, see the security chapter titled + <link linkend="security.globals">Using Register + Globals</link>. These individual globals are not autoglobals. + </simpara> + </sect2> + + <sect2 id="reserved.variables.cookies"> + <title>HTTP Cookies: <varname>$_COOKIE</varname></title> + + <note> + <simpara> + Introduced in 4.1.0. In earlier versions, use + <varname>$HTTP_COOKIE_VARS</varname>. + </simpara> + </note> + + <simpara> + An associative array of variables passed to the current script + via HTTP cookies. Automatically global in any scope. + </simpara> + + <simpara> + This is a 'superglobal', or automatic global, variable. This + simply means that it is available in all scopes throughout a + script. You don't need to do a <command>global + $_COOKIE;</command> to access it within functions or methods, as + you do with <varname>$HTTP_COOKIE_VARS</varname>. + </simpara> + + <simpara> + <varname>$HTTP_COOKIE_VARS</varname> contains the same initial + information, but is not an autoglobal. (Note that + <varname>$HTTP_COOKIE_VARS</varname> and <varname>$_COOKIE</varname> + are different variables and that PHP handles them as such) + </simpara> + + <simpara> + If the <link + linkend="ini.register-globals">register_globals</link> directive + is set, then these variables will also be made available in the + global scope of the script; i.e., separate from the + <varname>$_COOKIE</varname> and <varname>$HTTP_COOKIE_VARS</varname> + arrays. For related information, see the security chapter titled + <link linkend="security.globals">Using Register + Globals</link>. These individual globals are not autoglobals. + </simpara> + </sect2> + + <sect2 id="reserved.variables.get"> + <title>HTTP GET variables: <varname>$_GET</varname></title> + + <note> + <simpara> + Introduced in 4.1.0. In earlier versions, use + <varname>$HTTP_GET_VARS</varname>. + </simpara> + </note> + + <simpara> + An associative array of variables passed to the current script + via the HTTP GET method. Automatically global in any scope. + </simpara> + + <simpara> + This is a 'superglobal', or automatic global, variable. This + simply means that it is available in all scopes throughout a + script. You don't need to do a <command>global + $_GET;</command> to access it within functions or methods, as + you do with <varname>$HTTP_GET_VARS</varname>. + </simpara> + + <simpara> + <varname>$HTTP_GET_VARS</varname> contains the same initial + information, but is not an autoglobal. (Note that + <varname>$HTTP_GET_VARS</varname> and <varname>$_GET</varname> + are different variables and that PHP handles them as such) + </simpara> + + <simpara> + If the <link + linkend="ini.register-globals">register_globals</link> directive + is set, then these variables will also be made available in the + global scope of the script; i.e., separate from the + <varname>$_GET</varname> and <varname>$HTTP_GET_VARS</varname> + arrays. For related information, see the security chapter titled + <link linkend="security.globals">Using Register + Globals</link>. These individual globals are not autoglobals. + </simpara> + </sect2> + + <sect2 id="reserved.variables.post"> + <title>HTTP POST variables: <varname>$_POST</varname></title> + + <note> + <simpara> + Introduced in 4.1.0. In earlier versions, use + <varname>$HTTP_POST_VARS</varname>. + </simpara> + </note> + + <simpara> + An associative array of variables passed to the current script + via the HTTP POST method. Automatically global in any scope. + </simpara> + + <simpara> + This is a 'superglobal', or automatic global, variable. This + simply means that it is available in all scopes throughout a + script. You don't need to do a <command>global + $_POST;</command> to access it within functions or methods, as + you do with <varname>$HTTP_POST_VARS</varname>. + </simpara> + + <simpara> + <varname>$HTTP_POST_VARS</varname> contains the same initial + information, but is not an autoglobal. (Note that + <varname>$HTTP_POST_VARS</varname> and <varname>$_POST</varname> + are different variables and that PHP handles them as such) + </simpara> + + <simpara> + If the <link + linkend="ini.register-globals">register_globals</link> directive + is set, then these variables will also be made available in the + global scope of the script; i.e., separate from the + <varname>$_POST</varname> and <varname>$HTTP_POST_VARS</varname> + arrays. For related information, see the security chapter titled + <link linkend="security.globals">Using Register + Globals</link>. These individual globals are not autoglobals. + </simpara> + </sect2> + + <sect2 id="reserved.variables.files"> + <title>HTTP File upload variables: <varname>$_FILES</varname></title> + + <note> + <simpara> + Introduced in 4.1.0. In earlier versions, use + <varname>$HTTP_POST_FILES</varname>. + </simpara> + </note> + + <simpara> + An associative array of items uploaded to the current script + via the HTTP POST method. Automatically global in any scope. + </simpara> + + <simpara> + This is a 'superglobal', or automatic global, variable. This + simply means that it is available in all scopes throughout a + script. You don't need to do a <command>global + $_FILES;</command> to access it within functions or methods, as + you do with <varname>$HTTP_POST_FILES</varname>. + </simpara> + + <simpara> + <varname>$HTTP_POST_FILES</varname> contains the same + information, but is not an autoglobal. (Note that + <varname>$HTTP_POST_FILES</varname> and <varname>$_FILES</varname> + are different variables and that PHP handles them as such) + </simpara> + + <simpara> + If the <link + linkend="ini.register-globals">register_globals</link> directive + is set, then these variables will also be made available in the + global scope of the script; i.e., separate from the + <varname>$_FILES</varname> and <varname>$HTTP_POST_FILES</varname> + arrays. For related information, see the security chapter titled + <link linkend="security.globals">Using Register + Globals</link>. These individual globals are not autoglobals. + </simpara> + </sect2> + + <sect2 id="reserved.variables.request"> + <title>Request variables: <varname>$_REQUEST</varname></title> + + <note> + <simpara> + Introduced in 4.1.0. There is no equivalent array in earlier + versions. + </simpara> + </note> + <note> + <simpara> + Prior to PHP 4.3.0, <varname>$_FILES</varname> information was + also included in <varname>$_REQUEST</varname>. + </simpara> + </note> + + <simpara> + An associative array consisting of the contents of + <varname>$_GET</varname>, <varname>$_POST</varname>, + and <varname>$_COOKIE</varname>. + </simpara> + + <simpara> + This is a 'superglobal', or automatic global, variable. This + simply means that it is available in all scopes throughout a + script. You don't need to do a <command>global + $_REQUEST;</command> to access it within functions or methods. + </simpara> + + <simpara> + If the <link + linkend="ini.register-globals">register_globals</link> directive + is set, then these variables will also be made available in the + global scope of the script; i.e., separate from the + <varname>$_REQUEST</varname> array. For related information, see + the security chapter titled <link + linkend="security.globals">Using Register + Globals</link>. These individual globals are not autoglobals. + </simpara> + </sect2> + + <sect2 id="reserved.variables.session"> + <title>Session variables: <varname>$_SESSION</varname></title> + + <note> + <simpara> + Introduced in 4.1.0. In earlier versions, use + <varname>$HTTP_SESSION_VARS</varname>. + </simpara> + </note> + + <simpara> + An associative array containing session variables available to + the current script. See the <link linkend="ref.session">Session + functions</link> documentation for more information on how this + is used. + </simpara> + + <simpara> + This is a 'superglobal', or automatic global, variable. This + simply means that it is available in all scopes throughout a + script. You don't need to do a <command>global + $_SESSION;</command> to access it within functions or methods, as + you do with <varname>$HTTP_SESSION_VARS</varname>. + </simpara> + + <simpara> + <varname>$HTTP_SESSION_VARS</varname> contains the same + information, but is not an autoglobal. (Note that + <varname>$HTTP_SESSION_VARS</varname> and <varname>$_SESSION</varname> + are different variables and that PHP handles them as such) + </simpara> + + <simpara> + If the <link + linkend="ini.register-globals">register_globals</link> directive + is set, then these variables will also be made available in the + global scope of the script; i.e., separate from the + <varname>$_SESSION</varname> and <varname>$HTTP_SESSION_VARS</varname> + arrays. For related information, see the security chapter titled + <link linkend="security.globals">Using Register + Globals</link>. These individual globals are not autoglobals. + </simpara> + </sect2> + + <sect2 id="reserved.variables.globals"> + <title>Global variables: <varname>$GLOBALS</varname></title> + + <note> + <simpara> + <varname>$GLOBALS</varname> has been available since PHP 3.0.0. + </simpara> + </note> + + <simpara> + An associative array containing references to all variables which + are currently defined in the global scope of the script. The + variable names are the keys of the array. + </simpara> + + <simpara> + This is a 'superglobal', or automatic global, variable. This + simply means that it is available in all scopes throughout a + script. You don't need to do a <command>global + $GLOBALS;</command> to access it within functions or methods. + </simpara> + + </sect2> + + <sect2 id="reserved.variables.phperrormsg"> + <title>The previous error message: <varname>$php_errormsg</varname></title> + <simpara> + <varname>$php_errormsg</varname> is a variable containing the + text of the last error message generated by PHP. This variable + will only be available within the scope in which the error + occurred, and only if the <link + linkend="ini.track-errors">track_errors</link> configuration + option is turned on (it defaults to off). + </simpara> + </sect2> + </sect1> + + + <sect1 id="reserved.classes"> + <title>Predefined Classes</title> + + <sect2 id="reserved.classes.standard"> + <title>Standard Defined Classes</title> + + <simpara> + These classes are defined in the standard set of functions included + in the PHP build. + </simpara> + + <variablelist> + <varlistentry> + <term><classname>Directory</classname></term> + <listitem> + <simpara> + The class from which <link linkend="class.dir">dir</link> is instantiated. + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><classname>stdClass</classname></term> + <listitem> + <simpara> + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><classname>__PHP_Incomplete_Class</classname></term> + <listitem> + <simpara> + </simpara> + </listitem> + </varlistentry> + </variablelist> + </sect2> + + <sect2 id="reserved.classes.php5"> + <title>Predefined classes as of PHP 5</title> + + <simpara> + These additional predefined classes were introduced in + PHP 5.0.0 + </simpara> + + <variablelist> + <varlistentry> + <term><classname>exception</classname></term> + <listitem> + <simpara> + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><classname>php_user_filter</classname></term> + <listitem> + <simpara> + </simpara> + </listitem> + </varlistentry> + </variablelist> + </sect2> + + <sect2 id="reserved.classes.ming"> + <title><link linkend="ref.ming">Ming</link> Defined Classes</title> + + <simpara> + These classes are defined in the + <link linkend="ref.ming">Ming</link> + extension, and will only be available when that extension has either + been compiled into PHP or dynamically loaded at runtime. + </simpara> + + <variablelist> + <varlistentry> + <term><classname>swfshape</classname></term> + <listitem> + <simpara> + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><classname>swffill</classname></term> + <listitem> + <simpara> + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><classname>swfgradient</classname></term> + <listitem> + <simpara> + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><classname>swfbitmap</classname></term> + <listitem> + <simpara> + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><classname>swftext</classname></term> + <listitem> + <simpara> + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><classname>swftextfield</classname></term> + <listitem> + <simpara> + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><classname>swffont</classname></term> + <listitem> + <simpara> + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><classname>swfdisplayitem</classname></term> + <listitem> + <simpara> + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><classname>swfmovie</classname></term> + <listitem> + <simpara> + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><classname>swfbutton</classname></term> + <listitem> + <simpara> + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><classname>swfaction</classname></term> + <listitem> + <simpara> + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><classname>swfmorph</classname></term> + <listitem> + <simpara> + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><classname>swfsprite</classname></term> + <listitem> + <simpara> + </simpara> + </listitem> + </varlistentry> + </variablelist> + </sect2> + + <sect2 id="reserved.classes.oci8"> + <title><link linkend="ref.oci8">Oracle 8</link> Defined Classes</title> + + <simpara> + These classes are defined in the <link + linkend="ref.oci8">Oracle 8</link> extension, and will only be + available when that extension has either been compiled into PHP + or dynamically loaded at runtime. + </simpara> + + <variablelist> + <varlistentry> + <term><classname>OCI-Lob</classname></term> + <listitem> + <simpara> + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><classname>OCI-Collection</classname></term> + <listitem> + <simpara> + </simpara> + </listitem> + </varlistentry> + </variablelist> + </sect2> + + <sect2 id="reserved.classes.qtdom"> + <title><link linkend="ref.qtdom">qtdom</link> Defined Classes</title> + + <simpara> + These classes are defined in the + <link linkend="ref.qtdom">qtdom</link> + extension, and will only be available when that extension has either + been compiled into PHP or dynamically loaded at runtime. + </simpara> + + <variablelist> + <varlistentry> + <term><classname>QDomDocument</classname></term> + <listitem> + <simpara> + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><classname>QDomNode</classname></term> + <listitem> + <simpara> + </simpara> + </listitem> + </varlistentry> + </variablelist> + </sect2> + + </sect1> + + &appendices.reserved.constants; + </appendix> <!-- Keep this comment at the end of the file http://cvs.php.net/diff.php/phpdoc-it/features/safe-mode.xml?r1=1.7&r2=1.8&ty=u Index: phpdoc-it/features/safe-mode.xml diff -u phpdoc-it/features/safe-mode.xml:1.7 phpdoc-it/features/safe-mode.xml:1.8 --- phpdoc-it/features/safe-mode.xml:1.7 Wed Dec 12 15:51:46 2001 +++ phpdoc-it/features/safe-mode.xml Tue Mar 8 12:00:00 2005 @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- EN-Revision: 1.16 Maintainer: perugini Status: working --> +<!-- EN-Revision: 1.17 Maintainer: cucinato Status: working --> +<!-- CREDITS: perugini --> <chapter id="features.safe-mode"> <title>Modalità sicura (Safe mode)</title> @@ -11,6 +12,300 @@ non sono realistiche, in molti, specialmente ISP (Internet Service Provider), utilizzano la modalità sicura. </para> + + <sect1 id="ini.sect.safe-mode"> + <title>Security and Safe Mode</title> + <para> + <table> + <title>Direttive di configurazione della Modalità sicura e Sdella icurezza</title> + <tgroup cols="4"> + <thead> + <row> + <entry>Nome</entry> + <entry>Default</entry> + <entry>Changeable</entry> + <entry>Changelog</entry> + </row> + </thead> + <tbody> + <row> + <entry>safe_mode</entry> + <entry>"0"</entry> + <entry>PHP_INI_SYSTEM</entry> + <entry></entry> + </row> + <row> + <entry>safe_mode_gid</entry> + <entry>"0"</entry> + <entry>PHP_INI_SYSTEM</entry> + <entry>Disponibile dal PHP 4.1.0.</entry> + </row> + <row> + <entry>safe_mode_include_dir</entry> + <entry>NULL</entry> + <entry>PHP_INI_SYSTEM</entry> + <entry>Disponibile dal PHP 4.1.0.</entry> + </row> + <row> + <entry>safe_mode_exec_dir</entry> + <entry>""</entry> + <entry>PHP_INI_SYSTEM</entry> + <entry></entry> + </row> + <row> + <entry>safe_mode_allowed_env_vars</entry> + <entry>"PHP_"</entry> + <entry>PHP_INI_SYSTEM</entry> + <entry></entry> + </row> + <row> + <entry>safe_mode_protected_env_vars</entry> + <entry>"LD_LIBRARY_PATH"</entry> + <entry>PHP_INI_SYSTEM</entry> + <entry></entry> + </row> + <row> + <entry>open_basedir</entry> + <entry>NULL</entry> + <entry>PHP_INI_SYSTEM</entry> + <entry></entry> + </row> + <row> + <entry>disable_functions</entry> + <entry>""</entry> + <entry>&php.ini; only</entry> + <entry>Disponibile dal PHP 4.0.1.</entry> + </row> + <row> + <entry>disable_classes</entry> + <entry>""</entry> + <entry>&php.ini; only</entry> + <entry>Disponibile dal PHP 4.3.2.</entry> + </row> + </tbody> + </tgroup> + </table> + Per ulteriori dettagli e definizione delle costanti PHP_INI_* vedere + <function>ini_set</function>. + </para> + + &ini.descriptions.title; + + <para> + <variablelist> + <varlistentry id="ini.safe-mode"> + <term> + <parameter>safe_mode</parameter> + <type>boolean</type> + </term> + <listitem> + <para> + Abilita o disabilita la modalità sicura di PHP's. Leggere il + capitolo <link linkend="security">Sicurezza</link> per ulteriori + informazioni. + </para> + </listitem> + </varlistentry> + <varlistentry id="ini.safe-mode-gid"> + <term> + <parameter>safe_mode_gid</parameter> + <type>boolean</type> + </term> + <listitem> + <para> + Di default, Safe Mode does a UID compare check when + opening files. If you want to relax this to a GID compare, + then turn on safe_mode_gid. + Whether to use <literal>UID</literal> (&false;) or + <literal>GID</literal> (&true;) checking upon file + access. + </para> + </listitem> + </varlistentry> + <varlistentry id="ini.safe-mode-include-dir"> + <term> + <parameter>safe_mode_include_dir</parameter> + <type>string</type> + </term> + <listitem> + <para> + <literal>UID</literal>/<literal>GID</literal> checks are bypassed when + including files from this directory and its subdirectories (directory + must also be in <link linkend="ini.include-path">include_path</link> + or full path must including). + </para> + <simpara> + As of PHP 4.2.0, this directive can take a colon (semi-colon on + Windows) separated path in a fashion similar to the + <link linkend="ini.include-path">include_path</link> directive, + rather than just a single directory. + </simpara> + <simpara> + The restriction specified is actually a prefix, not a directory name. + This means that "safe_mode_include_dir = /dir/incl" also allows + access to "/dir/include" and "/dir/incls" if they exist. When you + want to restrict access to only the specified directory, end with a + slash. For example: "safe_mode_include_dir = /dir/incl/" + </simpara> + </listitem> + </varlistentry> + <varlistentry id="ini.safe-mode-exec-dir"> + <term> + <parameter>safe_mode_exec_dir</parameter> + <type>string</type> + </term> + <listitem> + <para> + If PHP is used in safe mode, <function>system</function> and the other + <link linkend="ref.exec">functions executing system programs</link> + refuse to start programs that are not in this directory. + You have to use <literal>/</literal> as directory separator on all + environments including Windows. + </para> + </listitem> + </varlistentry> + <varlistentry id="ini.safe-mode-allowed-env-vars"> + <term> + <parameter>safe_mode_allowed_env_vars</parameter> + <type>string</type> + </term> + <listitem> + <para> + Setting certain environment variables may be a potential security breach. + This directive contains a comma-delimited list of prefixes. In Safe Mode, + the user may only alter environment variables whose names begin with the + prefixes supplied here. By default, users will only be able to set + environment variables that begin with PHP_ (e.g. PHP_FOO=BAR). + </para> + <note> + <para> + If this directive is empty, PHP will let the user modify ANY + environment variable! + </para> + </note> + </listitem> + </varlistentry> + <varlistentry id="ini.safe-mode-protected-env-vars"> + <term> + <parameter>safe_mode_protected_env_vars</parameter> + <type>string</type> + </term> + <listitem> + <para> + This directive contains a comma-delimited list of environment + variables that the end user won't be able to change using + <function>putenv</function>. These variables will be protected + even if safe_mode_allowed_env_vars is set to allow to change them. + </para> + </listitem> + </varlistentry> + <varlistentry id="ini.open-basedir"> + <term> + <parameter>open_basedir</parameter> + <type>string</type> + </term> + <listitem> + <para> + Limit the files that can be opened by PHP to the specified + directory-tree, including the file itself. This directive + is <emphasis>NOT</emphasis> affected by whether Safe Mode is + turned On or Off. + </para> + <para> + When a script tries to open a file with, for example, + <function>fopen</function> or <function>gzopen</function>, + the location of the file is checked. When the file is outside the + specified directory-tree, PHP will refuse to open it. All symbolic + links are resolved, so it's not possible to avoid this restriction + with a symlink. + </para> + <para> + The special value <systemitem class="constant">.</systemitem> + indicates that the working directory of the script will be used as the + base-directory. This is, however, a little dangerous as the working directory + of the script can easily be changed with <function>chdir</function>. + </para> + <para> + In <filename>httpd.conf</filename>, open_basedir can be turned off + (e.g. for some virtual hosts) + <link linkend="configuration.changes.apache">the same way</link> as + any other configuration directive with "php_admin_value open_basedir + none". + </para> + <para> + Under Windows, separate the directories with a semicolon. On all + other systems, separate the directories with a colon. As an Apache + module, open_basedir paths from parent directories are now + automatically inherited. + </para> + <para> + The restriction specified with open_basedir is actually a + prefix, not a directory name. This means that "open_basedir = + /dir/incl" also allows access to "/dir/include" and + "/dir/incls" if they exist. When you want to restrict access + to only the specified directory, end with a slash. For example: + "open_basedir = /dir/incl/" + </para> + <note> + <para> + Support for multiple directories was added in 3.0.7. + </para> + </note> + <para> + The default is to allow all files to be opened. + </para> + </listitem> + </varlistentry> + <varlistentry id="ini.disable-functions"> + <term> + <parameter>disable_functions</parameter> + <type>string</type> + </term> + <listitem> + <simpara> + This directive allows you to disable certain functions for + <link linkend="security">security</link> reasons. It takes + on a comma-delimited list of function names. disable_functions + is not affected by <link linkend="ini.safe-mode">Safe Mode</link>. + </simpara> + <simpara> + This directive must be set in &php.ini; For example, you + cannot set this in &httpd.conf;. + </simpara> + </listitem> + </varlistentry> + <varlistentry id="ini.disable-classes"> + <term> + <parameter>disable_classes</parameter> + <type>string</type> + </term> + <listitem> + <simpara> + This directive allows you to disable certain classes for + <link linkend="security">security</link> reasons. It takes + on a comma-delimited list of class names. disable_classes + is not affected by <link linkend="ini.safe-mode">Safe Mode</link>. + </simpara> + <simpara> + This directive must be set in &php.ini; For example, you + cannot set this in &httpd.conf;. + </simpara> + <note> + <title>Availability note</title> + <simpara> + This directive became available in PHP 4.3.2 + </simpara> + </note> + </listitem> + </varlistentry> + </variablelist> + </para> + <para> + See also: <link linkend="ini.register-globals">register_globals</link>, + <link linkend="ini.display-errors">display_errors</link>, and + <link linkend="ini.log-errors">log_errors</link> + </para> + <para> Le direttive di configurazione che controllano la modalità sicura sono: <programlisting role="ini"> @@ -87,6 +382,7 @@ ]]> </screen> </para> + </sect1> <sect1 id="features.safe-mode.functions"> <title>Funzioni limitate/disabilitate dalla modalità sicura (safe-mode)</title> http://cvs.php.net/co.php/phpdoc-it/reference/session/ini.xml?r=1.1&p=1 Index: phpdoc-it/reference/session/ini.xml +++ phpdoc-it/reference/session/ini.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- EN-Revision: 1.30 Maintainer: cucinato Status: working --> <section id="session.configuration"> &reftitle.runtime; &extension.runtime; <para> <table> <title>Opzioni di configurazione della sessione</title> <tgroup cols="4"> <thead> <row> <entry>Name</entry> <entry>Default</entry> <entry>Modificabile</entry> <entry>Changelog</entry> </row> </thead> <tbody> <row> <entry>session.save_path</entry> <entry>""</entry> <entry>PHP_INI_ALL</entry> <entry></entry> </row> <row> <entry>session.name</entry> <entry>"PHPSESSID"</entry> <entry>PHP_INI_ALL</entry> <entry></entry> </row> <row> <entry>session.save_handler</entry> <entry>"files"</entry> <entry>PHP_INI_ALL</entry> <entry></entry> </row> <row> <entry>session.auto_start</entry> <entry>"0"</entry> <entry>PHP_INI_ALL</entry> <entry></entry> </row> <row> <entry>session.gc_probability</entry> <entry>"1"</entry> <entry>PHP_INI_ALL</entry> <entry></entry> </row> <row> <entry>session.gc_divisor</entry> <entry>"100"</entry> <entry>PHP_INI_ALL</entry> <entry>Disponibile dal PHP 4.3.2.</entry> </row> <row> <entry>session.gc_maxlifetime</entry> <entry>"1440"</entry> <entry>PHP_INI_ALL</entry> <entry></entry> </row> <row> <entry>session.serialize_handler</entry> <entry>"php"</entry> <entry>PHP_INI_ALL</entry> <entry></entry> </row> <row> <entry>session.cookie_lifetime</entry> <entry>"0"</entry> <entry>PHP_INI_ALL</entry> <entry></entry> </row> <row> <entry>session.cookie_path</entry> <entry>"/"</entry> <entry>PHP_INI_ALL</entry> <entry></entry> </row> <row> <entry>session.cookie_domain</entry> <entry>""</entry> <entry>PHP_INI_ALL</entry> <entry></entry> </row> <row> <entry>session.cookie_secure</entry> <entry>""</entry> <entry>PHP_INI_ALL</entry> <entry>Disponibile dal PHP 4.0.4.</entry> </row> <row> <entry>session.use_cookies</entry> <entry>"1"</entry> <entry>PHP_INI_ALL</entry> <entry></entry> </row> <row> <entry>session.use_only_cookies</entry> <entry>"0"</entry> <entry>PHP_INI_ALL</entry> <entry>Disponibile dal PHP 4.3.0.</entry> </row> <row> <entry>session.referer_check</entry> <entry>""</entry> <entry>PHP_INI_ALL</entry> <entry></entry> </row> <row> <entry>session.entropy_file</entry> <entry>""</entry> <entry>PHP_INI_ALL</entry> <entry></entry> </row> <row> <entry>session.entropy_length</entry> <entry>"0"</entry> <entry>PHP_INI_ALL</entry> <entry></entry> </row> <row> <entry>session.cache_limiter</entry> <entry>"nocache"</entry> <entry>PHP_INI_ALL</entry> <entry></entry> </row> <row> <entry>session.cache_expire</entry> <entry>"180"</entry> <entry>PHP_INI_ALL</entry> <entry></entry> </row> <row> <entry>session.use_trans_sid</entry> <entry>"0"</entry> <entry>PHP_INI_ALL</entry> <entry>PHP_INI_ALL in PHP <= 4.2.3. PHP_INI_PERDIR in PHP <= 4-cvs. Disponibile dal PHP 4.0.3.</entry> </row> <row> <entry>session.bug_compat_42</entry> <entry>"1"</entry> <entry>PHP_INI_ALL</entry> <entry>Disponibile dal PHP 4.3.0.</entry> </row> <row> <entry>session.bug_compat_warn</entry> <entry>"1"</entry> <entry>PHP_INI_ALL</entry> <entry>Disponibile dal PHP 4.3.0.</entry> </row> <row> <entry>session.hash_function</entry> <entry>"0"</entry> <entry>PHP_INI_ALL</entry> <entry>Disponibile dal PHP 5.0.0.</entry> </row> <row> <entry>session.hash_bits_per_character</entry> <entry>"4"</entry> <entry>PHP_INI_ALL</entry> <entry>Disponibile dal PHP 5.0.0.</entry> </row> <row> <entry>url_rewriter.tags</entry> <entry>"a=href,area=href,frame=src,form=,fieldset="</entry> <entry>PHP_INI_ALL</entry> <entry>Disponibile dal PHP 4.0.4.</entry> </row> <!-- Not yet <row> <entry>session.encode_sources</entry> <entry>"globals</entry> <entry>track"</entry> <entry></entry> </row> --> </tbody> </tgroup> </table> &ini.php.constants; </para> <para> The session management system supports a number of configuration options which you can place in your &php.ini; file. We will give a short overview. <variablelist> <varlistentry id="ini.session.save-handler"> <term> <parameter>session.save_handler</parameter> <type>string</type> </term> <listitem> <simpara> <literal>session.save_handler</literal> defines the name of the handler which is used for storing and retrieving data associated with a session. Defaults to <literal>files</literal>. See also <function>session_set_save_handler</function>. </simpara> </listitem> </varlistentry> <varlistentry id="ini.session.save-path"> <term> <parameter>session.save_path</parameter> <type>string</type> </term> <listitem> <simpara> <literal>session.save_path</literal> 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. Defaults to <literal>/tmp</literal>. See also <function>session_save_path</function>. </simpara> <para> There is an optional N argument to this directive that determines the number of directory levels your session files will be spread around in. For example, setting to <literal>'5;/tmp'</literal> may end up creating a session file and location like <literal>/tmp/4/b/1/e/3/sess_4b1e384ad74619bd212e236e52a5a174If </literal>. In order to use N you must create all of these directories before use. A small shell script exists in <filename>ext/session</filename> to do this, it's called <filename>mod_files.sh</filename>. Also note that if N is used and greater than 0 then automatic garbage collection will not be performed, see a copy of &php.ini; for further information. Also, if you use N, be sure to surround <literal>session.save_path</literal> in "quotes" because the separator (<literal>;</literal>) is also used for comments in &php.ini;. </para> <warning> <para> If you leave this set to a world-readable directory, such as <filename>/tmp</filename> (the default), other users on the server may be able to hijack sessions by getting the list of files in that directory. </para> </warning> <note> <simpara> Prior to PHP 4.3.6, Windows users had to change this variable in order to use PHP's session functions. A valid path must be specified, e.g.: <filename>c:/temp</filename>. </simpara> </note> </listitem> </varlistentry> <varlistentry id="ini.session.name"> <term> <parameter>session.name</parameter> <type>string</type> </term> <listitem> <simpara> <literal>session.name</literal> specifies the name of the session which is used as cookie name. It should only contain alphanumeric characters. Defaults to <literal>PHPSESSID</literal>. See also <function>session_name</function>. </simpara> </listitem> </varlistentry> <varlistentry id="ini.session.auto-start"> <term> <parameter>session.auto_start</parameter> <type>boolean</type> </term> <listitem> <simpara> <literal>session.auto_start</literal> specifies whether the session module starts a session automatically on request startup. Defaults to <literal>0</literal> (disabled). </simpara> </listitem> </varlistentry> <varlistentry id="ini.session.serialize-handler"> <term> <parameter>session.serialize_handler</parameter> <type>string</type> </term> <listitem> <simpara> <literal>session.serialize_handler</literal> defines the name of the handler which is used to serialize/deserialize data. Currently, a PHP internal format (name <literal>php</literal>) and WDDX is supported (name <literal>wddx</literal>). WDDX is only available, if PHP is compiled with <link linkend="ref.wddx">WDDX support</link>. Defaults to <literal>php</literal>. </simpara> </listitem> </varlistentry> <varlistentry id="ini.session.gc-probability"> <term> <parameter>session.gc_probability</parameter> <type>integer</type> </term> <listitem> <simpara> <literal>session.gc_probability</literal> in conjunction with <literal>session.gc_divisor</literal> is used to manage probability that the gc (garbage collection) routine is started. Defaults to <literal>1</literal>. See <link linkend="ini.session.gc-divisor">session.gc_divisor</link> for details. </simpara> </listitem> </varlistentry> <varlistentry id="ini.session.gc-divisor"> <term> <parameter>session.gc_divisor</parameter> <type>integer</type> </term> <listitem> <simpara> <literal>session.gc_divisor</literal> coupled with <literal>session.gc_probability</literal> 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. <literal>session.gc_divisor</literal> defaults to <literal>100</literal>. </simpara> </listitem> </varlistentry> <varlistentry id="ini.session.gc-maxlifetime"> <term> <parameter>session.gc_maxlifetime</parameter> <type>integer</type> </term> <listitem> <simpara> <literal>session.gc_maxlifetime</literal> specifies the number of seconds after which data will be seen as 'garbage' and cleaned up. </simpara> <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 fs 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> </note> </listitem> </varlistentry> <varlistentry id="ini.session.referer-check"> <term> <parameter>session.referer_check</parameter> <type>string</type> </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. </simpara> </listitem> </varlistentry> <varlistentry id="ini.session.entropy-file"> <term> <parameter>session.entropy_file</parameter> <type>string</type> </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. </simpara> </listitem> </varlistentry> <varlistentry id="ini.session.entropy-length"> <term> <parameter>session.entropy_length</parameter> <type>integer</type> </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). </simpara> </listitem> </varlistentry> <varlistentry id="ini.session.use-cookies"> <term> <parameter>session.use_cookies</parameter> <type>boolean</type> </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). </simpara> </listitem> </varlistentry> <varlistentry id="ini.session.use-only-cookies"> <term> <parameter>session.use_only_cookies</parameter> <type>boolean</type> </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. </simpara> </listitem> </varlistentry> <varlistentry id="ini.session.cookie-lifetime"> <term> <parameter>session.cookie_lifetime</parameter> <type>integer</type> </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>. </simpara> </listitem> </varlistentry> <varlistentry id="ini.session.cookie-path"> <term> <parameter>session.cookie_path</parameter> <type>string</type> </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>. </simpara> </listitem> </varlistentry> <varlistentry id="ini.session.cookie-domain"> <term> <parameter>session.cookie_domain</parameter> <type>string</type> </term> <listitem> <simpara> <literal>session.cookie_domain</literal> specifies the domain to set in session_cookie. Default is none at all. See also <function>session_get_cookie_params</function> and <function>session_set_cookie_params</function>. </simpara> </listitem> </varlistentry> <varlistentry id="ini.session.cookie-secure"> <term> <parameter>session.cookie_secure</parameter> <type>boolean</type> </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>. </simpara> </listitem> </varlistentry> <varlistentry id="ini.session.cache-limiter"> <term> <parameter>session.cache_limiter</parameter> <type>string</type> </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>. </simpara> </listitem> </varlistentry> <varlistentry id="ini.session.cache-expire"> <term> <parameter>session.cache_expire</parameter> <type>integer</type> </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>. </simpara> </listitem> </varlistentry> <varlistentry id="ini.session.use-trans-sid"> <term> <parameter>session.use_trans_sid</parameter> <type>boolean</type> </term> <listitem> <simpara> <literal>session.use_trans_sid</literal> whether transparent sid support is enabled or not. Defaults to <literal>0</literal> (disabled). </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. </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. </simpara> </note> </listitem> </varlistentry> <varlistentry id="ini.session.bug-compat-42"> <term> <parameter>session.bug_compat_42</parameter> <type>boolean</type> </term> <listitem> <simpara> PHP versions 4.2.0 and lower have an undocumented feature/bug that allows you to 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. </simpara> </listitem> </varlistentry> <varlistentry id="ini.session.bug-compat-warn"> <term> <parameter>session.bug_compat_warn</parameter> <type>boolean</type> </term> <listitem> <simpara> PHP versions 4.2.0 and lower have an undocumented feature/bug that allows you to 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>. </simpara> </listitem> </varlistentry> <varlistentry id="ini.session.hash-function"> <term> <parameter>session.hash_function</parameter> <type>integer</type> </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). </simpara> <note> <para> This was introduced in PHP 5. </para> </note> </listitem> </varlistentry> <varlistentry id="ini.session.hash-bits-per-character"> <term> <parameter>session.hash_bits_per_character</parameter> <type>integer</type> </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, "-", ","). </simpara> <note> <para> This was introduced in PHP 5. </para> </note> </listitem> </varlistentry> <varlistentry id="ini.url-rewriter.tags"> <term> <parameter>url_rewriter.tags</parameter> <type>string</type> </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> </simpara> <note> <simpara> If you want XHTML conformity, remove the <literal>form</literal> entry and use the <fieldset> tags around your form fields. </simpara> </note> </listitem> </varlistentry> </variablelist> </para> <para> The <link linkend="ini.track-vars"><literal>track_vars</literal></link> and <link linkend="ini.register-globals"><literal>register_globals</literal></link> configuration settings influence how the session variables get stored and restored. </para> <note> <para> As of PHP 4.0.3, <link linkend="ini.track-vars"><literal>track_vars</literal></link> is always turned on. </para> </note> </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:"../../../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 -->
http://cvs.php.net/diff.php/phpdoc-it/appendices/reserved.xml?r1=1.11&r2=1.12&ty=u Index: phpdoc-it/appendices/reserved.xml diff -u phpdoc-it/appendices/reserved.xml:1.11 phpdoc-it/appendices/reserved.xml:1.12 --- phpdoc-it/appendices/reserved.xml:1.11 Fri Jan 30 15:37:34 2004 +++ phpdoc-it/appendices/reserved.xml Tue Mar 8 11:59:59 2005 @@ -1,230 +1,1296 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- EN-Revision: 1.14 Maintainer: cortesi Status: ready --> -<appendix id="reserved"> - <title>Parole riservate nel PHP</title> - <para> - Questa è la lista delle parole riservate nel PHP, tipicamente - <link linkend="language.constants">costanti</link> e - delle <link linkend="language.variables.predefined">variabili predefinite</link>. - In questa lista non sono elencate le funzioni, ma solo i costrutti del - linguaggio. I nomi qui elencati non devono essere utilizzati come nomi di variabili, funzioni, - costanti o metodi, ciò porterebbe inevitabilmente a creare confusioni. - <simplelist columns="3"> - <member> - <link linkend="language.operators.logical">and</link> - </member> - <member> - <link linkend="language.variables.predefined.php">$argv</link> - </member> - <member> - <link linkend="control-structures.foreach">as</link> - </member> - <member> - <link linkend="language.variables.predefined.php">$argc</link> - </member> - <member> - <link linkend="control-structures.break">break</link> - </member> - <member> - <link linkend="control-structures.switch">case</link> - </member> - <member> - <link linkend="functions.old-syntax">cfunction</link> - </member> - <member> - <link linkend="keyword.class">class</link> - </member> - <member> - <link linkend="control-structures.continue">continue</link> - </member> - <member> - <link linkend="control-structures.declare">declare</link> - </member> - <member> - <link linkend="control-structures.switch">default</link> - </member> - <member> - <link linkend="control-structures.do.while">do</link> - </member> - <member> - <function>die</function> - </member> - <member> - <function>echo</function> - </member> - <member> - <link linkend="control-structures.else">else</link> - </member> - <member> - <link linkend="control-structures.elseif">elseif</link> - </member> - <member> - <function>empty</function> - </member> - <member> - <link linkend="control-structures.declare">enddeclare</link> - </member> - <member> - <link linkend="control-structures.alternative-syntax">endfor</link> - </member> - <member> - <link linkend="control-structures.alternative-syntax">endforeach</link> - </member> - <member> - <link linkend="control-structures.alternative-syntax">endif</link> - </member> - <member> - <link linkend="control-structures.alternative-syntax">endswitch</link> - </member> - <member> - <link linkend="control-structures.alternative-syntax">endwhile</link> - </member> - <member> - <link linkend="language.constants">E_ALL</link> - </member> - <member> - <link linkend="language.constants">E_PARSE</link> - </member> - <member> - <link linkend="language.constants">E_ERROR</link> - </member> - <member> - <link linkend="language.constants">E_WARNING</link> - </member> - <member> - <link linkend="function.eval">eval</link> - </member> - <member> - <function>exit</function> - </member> - <member> - <link linkend="keyword.class">extends</link> - </member> - <member> - <link linkend="language.constants">&false;</link> - </member> - <member> - <link linkend="control-structures.for">for</link> - </member> - <member> - <link linkend="control-structures.foreach">foreach</link> - </member> - <member> - <link linkend="functions.user-defined">function</link> - </member> - <member> - <link linkend="language.variables.predefined.php">$HTTP_COOKIE_VARS</link> - </member> - <member> - <link linkend="language.variables.predefined.php">$HTTP_GET_VARS</link> - </member> - <member> - <link linkend="language.variables.predefined.php">$HTTP_POST_VARS</link> - </member> - <member> - <link linkend="language.variables.predefined.php">$HTTP_POST_FILES</link> - </member> - <member> - <link linkend="language.variables.predefined.php">$HTTP_ENV_VARS</link> - </member> - <member> - <link linkend="language.variables.predefined.php">$HTTP_SERVER_VARS</link> - </member> - <member> - <link linkend="control-structures.if">if</link> - </member> - <member> - <function>include</function> - </member> - <member> - <function>include_once</function> - </member> - <member> - <link linkend="language.variables.scope">global</link> - </member> - <member> - <function>list</function> - </member> - <member> - <link linkend="keyword.class">new</link> - </member> - <member> - <link linkend="language.operators.logical">not</link> - </member> - <member> - <link linkend="language.constants.predefined">NULL</link> - </member> - <member> - <link linkend="functions.old-syntax">old_function</link> - </member> - <member> - <link linkend="language.operators.logical">or</link> - </member> - <member> - <link linkend="keyword.parent">parent</link> - </member> - <member> - <link linkend="language.constants">PHP_OS</link> - </member> - <member> - <link linkend="language.variables.predefined.php">$PHP_SELF</link> - </member> - <member> - <link linkend="language.constants">PHP_VERSION</link> - </member> - <member> - <function>print</function> - </member> - <member> - <function>require</function> - </member> - <member> - <function>require_once</function> - </member> - <member> - <function>return</function> - </member> - <member> - <link linkend="language.variables.scope">static</link> - </member> - <member> - <link linkend="control-structures.switch">switch</link> - </member> - <member> - <link linkend="keyword.class">stdClass</link> - </member> - <member> - <link linkend="keyword.class">$this</link> - </member> - <member> - <link linkend="language.constants">&true;</link> - </member> - <member> - <link linkend="keyword.class">var</link> - </member> - <member> - <link linkend="language.operators.logical">xor</link> - </member> - <member> - <function>virtual</function> - </member> - <member> - <link linkend="control-structures.while">while</link> - </member> - <member> - <link linkend="language.constants">__FILE__</link> - </member> - <member> - <link linkend="language.constants">__LINE__</link> - </member> - <member> - <link linkend="language.oop.magic-functions">__sleep</link> - </member> - <member> - <link linkend="language.oop.magic-functions">__wakeup</link> - </member> - </simplelist> - </para> +<!-- EN-Revision: 1.53 Maintainer: cucinato Status: working --> +<!-- CREDITS: cortesi --> + <appendix id="reserved"> + <title>Parole riservate nel PHP</title> + <para> + Questa è la lista delle parole riservate nel PHP. Nessuno + di questi identificatori deve essere utilizzato negli + script. Questa lista include parole chiave e variabili predefinite, + costanti e nomi di classi. Questa lista non è né esaustiva né + completa. + </para> + + <sect1 id="reserved.keywords"> + <title>Lista delle parole chiave</title> + <simpara> + Queste parole hanno significato speciale per il PHP. Alcune di esse rappresentano cose + che assomigliano a funzioni, altri a costanti, e così via. Ma + non lo sono, in verità : sono costrutti del linguaggi. non si deve utilizzare + nessuna di queste parole come costante, nome di classe, funzione o nome di metodo. + L'utilizzo come nomi di variabili normalmente funziona, ma questo può generare confusione. + </simpara> + + <table> + <title>Parole chiave</title> + <tgroup cols="5"> + <tbody> + <row> + <entry> + <link linkend="language.operators.logical">and</link> + </entry> + <entry> + <link linkend="language.operators.logical">or</link> + </entry> + <entry> + <link linkend="language.operators.logical">xor</link> + </entry> + <entry> + <link linkend="language.constants.predefined">__FILE__</link> + </entry> + <entry> + <link linkend="reserved.classes.php5">exception</link> (PHP 5) + </entry> + </row> + <row> + <entry> + <link linkend="language.constants.predefined">__LINE__</link> + </entry> + <entry> + <function>array</function> + </entry> + <entry> + <link linkend="control-structures.foreach">as</link> + </entry> + <entry> + <link linkend="control-structures.break">break</link> + </entry> + <entry> + <link linkend="control-structures.switch">case</link> + </entry> + </row> + <row> + <entry> + <link linkend="keyword.class">class</link> + </entry> + <entry> + <link linkend="language.oop5.constants">const</link> + </entry> + <entry> + <link linkend="control-structures.continue">continue</link> + </entry> + <entry> + <link linkend="control-structures.declare">declare</link> + </entry> + <entry> + <link linkend="control-structures.switch">default</link> + </entry> + </row> + <row> + <entry> + <function>die</function> + </entry> + <entry> + <link linkend="control-structures.do.while">do</link> + </entry> + <entry> + <function>echo</function> + </entry> + <entry> + <link linkend="control-structures.else">else</link> + </entry> + <entry> + <link linkend="control-structures.elseif">elseif</link> + </entry> + </row> + <row> + <entry> + <function>empty</function> + </entry> + <entry> + <link linkend="control-structures.declare">enddeclare</link> + </entry> + <entry> + <link linkend="control-structures.alternative-syntax">endfor</link> + </entry> + <entry> + <link linkend="control-structures.alternative-syntax">endforeach</link> + </entry> + <entry> + <link linkend="control-structures.alternative-syntax">endif</link> + </entry> + </row> + <row> + <entry> + <link linkend="control-structures.alternative-syntax">endswitch</link> + </entry> + <entry> + <link linkend="control-structures.alternative-syntax">endwhile</link> + </entry> + <entry> + <function>eval</function> + </entry> + <entry> + <function>exit</function> + </entry> + <entry> + <link linkend="keyword.class">extends</link> + </entry> + </row> + <row> + <entry> + <link linkend="control-structures.for">for</link> + </entry> + <entry> + <link linkend="control-structures.foreach">foreach</link> + </entry> + <entry> + <link linkend="functions.user-defined">function</link> + </entry> + <entry> + <link linkend="language.variables.scope">global</link> + </entry> + <entry> + <link linkend="control-structures.if">if</link> + </entry> + </row> + <row> + <entry> + <function>include</function> + </entry> + <entry> + <function>include_once</function> + </entry> + <entry> + <function>isset</function> + </entry> + <entry> + <function>list</function> + </entry> + <entry> + <link linkend="keyword.class">new</link> + </entry> + </row> + <row> + <entry> + <function>print</function> + </entry> + <entry> + <function>require</function> + </entry> + <entry> + <function>require_once</function> + </entry> + <entry> + <function>return</function> + </entry> + <entry> + <link linkend="language.variables.scope">static</link> + </entry> + </row> + <row> + <entry> + <link linkend="control-structures.switch">switch</link> + </entry> + <entry> + <function>unset</function> + </entry> + <entry> + use + </entry> + <entry> + <link linkend="keyword.class">var</link> + </entry> + <entry> + <link linkend="control-structures.while">while</link> + </entry> + </row> + <row> + <entry> + <link linkend="language.constants.predefined">__FUNCTION__</link> + </entry> + <entry> + <link linkend="language.constants.predefined">__CLASS__</link> + </entry> + <entry> + <link linkend="language.constants.predefined">__METHOD__</link> + </entry> + <entry> + <link linkend="language.oop5.final">final</link> (PHP 5) + </entry> + <entry> + <link linkend="reserved.classes.php5">php_user_filter</link> (PHP 5) + </entry> + </row> + <row> + <entry> + <link linkend="language.oop5.interfaces">interface</link> (PHP 5) + </entry> + <entry> + <link linkend="language.oop5.interfaces">implements</link> (PHP 5) + </entry> + <entry> + <link linkend="language.oop5.basic">extends</link> + </entry> + <entry> + <link linkend="language.oop5.visibility">public</link> (PHP 5) + </entry> + <entry> + <link linkend="language.oop5.visibility">private</link> (PHP 5) + </entry> + </row> + <row> + <entry> + <link linkend="language.oop5.visibility">protected</link> (PHP 5) + </entry> + <entry> + <link linkend="language.oop5.abstract">abstract</link> (PHP 5) + </entry> + <entry> + <link linkend="language.oop5.cloning">clone</link> (PHP 5) + </entry> + <entry> + <link linkend="language.exceptions">try</link> (PHP 5) + </entry> + <entry> + <link linkend="language.exceptions">catch</link> (PHP 5) + </entry> + </row> + <row> + <entry> + <link linkend="language.exceptions">throw</link> (PHP 5) + </entry> + <entry> + <link linkend="migration.old-function">cfunction</link> (PHP 4 only) + </entry> + <entry> + <link linkend="migration.old-function">old_function</link> (PHP 4 only) + </entry> + <entry> + </entry> + <entry> + </entry> + </row> + </tbody> + </tgroup> + </table> + </sect1> + + <sect1 id="reserved.variables"> + <title>Variabili predefinite</title> + + <para> + A partire dal PHP 4.1.0, il metodo raccomandato per ottenere le + <link linkend="language.variables.external">variabili esterne</link> è + quello di usare i superglobals, come spiegato più sotto. In precedenza, gli sviluppatori si appoggiavano + ai <link linkend="ini.register-globals">register_globals</link> + o agli array predefiniti (<varname>$HTTP_*_VARS</varname>). + + &avail.register-long-arrays; + </para> + + <sect2 id="reserved.variables.server"> + <title>Variabili di server: <varname>$_SERVER</varname></title> + <note> + <simpara> + Introdotta dal PHP 4.1.0. Nelle versioni precedenti, utilizzare + <varname>$HTTP_SERVER_VARS</varname>. + </simpara> + </note> + + <simpara> + <varname>$_SERVER</varname> è un array che contiene informazioni + quali header, percorsi e posizioni degli script. Le voci in questo + array sono create dal server web. non c'è garanzia che + ogni server web fornisca queste informazioni; i server possono ometterne alcune, + oppure fornirne altre non contemplate qui. Detto questo, gran parte di + queste variabili sono contemplate nelle <ulink + url="&url.cgispec;">specifiche CGI 1.1</ulink>, quindi è molto probabile + ritrovarle in questo array. + </simpara> + + <simpara> + Questo array è una variabile 'superglobal', o globale automatica. Ciò + siginifica che è disponibile in tutti gli scope all'interno di uno + script. Non è necessario scrivere <command>global + $_SERVER;</command> per accedervi in una funzione o metodo, come + invece occorreva fare con <varname>$HTTP_SERVER_VARS</varname>. + </simpara> + + <simpara> + <varname>$HTTP_SERVER_VARS</varname> contiene le stesse informazioni, + ma non è autoglobal. (si noti che + <varname>$HTTP_SERVER_VARS</varname> e <varname>$_SERVER</varname> + sono variabili distinte e che PHP le tratta di conseguenza) + </simpara> + + <simpara> + Se la direttiva <link + linkend="ini.register-globals">register_globals</link> + è impostata, queste informazioni saranno rese disponibili anche nello + scope globale dello script; quindi in variabili diverse da + <varname>$_SERVER</varname> e <varname>$HTTP_SERVER_VARS</varname> + arrays. Per la documentazione correlata, vedere il capitolo sulla sicurezza intitolato + <link linkend="security.globals">Utilizzo dei Register + Globals</link>. Queste variabili globali individuali non sono autoglobal. + </simpara> + + <simpara> + You may or may not find any of the following elements in + $_SERVER. Note that few, if any, of these will be available (or + indeed have any meaning) if running PHP on the command line. + </simpara> + + <para> + <variablelist> + <varlistentry> + <term>'<varname>PHP_SELF</varname>'</term> + <listitem> + <simpara> + The filename of the currently executing script, relative to + the document root. For instance, + <varname>$_SERVER['PHP_SELF']</varname> in a script at the + address <filename>http://example.com/test.php/foo.bar</filename> + would be <filename>/test.php/foo.bar</filename>. + The <link linkend="language.constants.predefined">__FILE__</link> + constant contains the full path and filename of the current (i.e. + included) file. + </simpara> + <simpara> + If PHP is running as a command-line processor this variable contains + the script name since PHP 4.3.0. Previously it was not available. + </simpara> + </listitem> + </varlistentry> + + <varlistentry> + <term>'<varname>argv</varname>'</term> + <listitem> + <simpara> + Array of arguments passed to the script. When the script is + run on the command line, this gives C-style access to the + command line parameters. When called via the GET method, this + will contain the query string. + </simpara> + </listitem> + </varlistentry> + + <varlistentry> + <term>'<varname>argc</varname>'</term> + <listitem> + <simpara> + Contains the number of command line parameters passed to the + script (if run on the command line). + </simpara> + </listitem> + </varlistentry> + + <varlistentry> + <term>'<varname>GATEWAY_INTERFACE</varname>'</term> + <listitem> + <simpara> + What revision of the CGI specification the server is using; + i.e. '<literal>CGI/1.1</literal>'. + </simpara> + </listitem> + </varlistentry> + + <varlistentry> + <term>'<varname>SERVER_NAME</varname>'</term> + <listitem> + <simpara> + The name of the server host under which the current script is + executing. If the script is running on a virtual host, this + will be the value defined for that virtual host. + </simpara> + </listitem> + </varlistentry> + + <varlistentry> + <term>'<varname>SERVER_SOFTWARE</varname>'</term> + <listitem> + <simpara> + Server identification string, given in the headers when + responding to requests. + </simpara> + </listitem> + </varlistentry> + + <varlistentry> + <term>'<varname>SERVER_PROTOCOL</varname>'</term> + <listitem> + <simpara> + Name and revision of the information protocol via which the + page was requested; i.e. '<literal>HTTP/1.0</literal>'; + </simpara> + </listitem> + </varlistentry> + + <varlistentry> + <term>'<varname>REQUEST_METHOD</varname>'</term> + <listitem> + <simpara> + Which request method was used to access the page; i.e. '<literal>GET</literal>', + '<literal>HEAD</literal>', '<literal>POST</literal>', '<literal>PUT</literal>'. + </simpara> + </listitem> + </varlistentry> + + <varlistentry> + <term>'<varname>REQUEST_TIME</varname>'</term> + <listitem> + <simpara> + The timestamp of the start of the request. Available since PHP 5.1.0. + </simpara> + </listitem> + </varlistentry> + + <varlistentry> + <term>'<varname>QUERY_STRING</varname>'</term> + <listitem> + <simpara> + The query string, if any, via which the page was accessed. + </simpara> + </listitem> + </varlistentry> + + <varlistentry> + <term>'<varname>DOCUMENT_ROOT</varname>'</term> + <listitem> + <simpara> + The document root directory under which the current script is + executing, as defined in the server's configuration file. + </simpara> + </listitem> + </varlistentry> + + <varlistentry> + <term>'<varname>HTTP_ACCEPT</varname>'</term> + <listitem> + <simpara> + Contents of the <literal>Accept:</literal> header from the + current request, if there is one. + </simpara> + </listitem> + </varlistentry> + + <varlistentry> + <term>'<varname>HTTP_ACCEPT_CHARSET</varname>'</term> + <listitem> + <simpara> + Contents of the <literal>Accept-Charset:</literal> header + from the current request, if there is one. Example: + '<literal>iso-8859-1,*,utf-8</literal>'. + </simpara> + </listitem> + </varlistentry> + + <varlistentry> + <term>'<varname>HTTP_ACCEPT_ENCODING</varname>'</term> + <listitem> + <simpara> + Contents of the <literal>Accept-Encoding:</literal> header + from the current request, if there is one. Example: '<literal>gzip</literal>'. + </simpara> + </listitem> + </varlistentry> + + <varlistentry> + <term>'<varname>HTTP_ACCEPT_LANGUAGE</varname>'</term> + <listitem> + <simpara> + Contents of the <literal>Accept-Language:</literal> header + from the current request, if there is one. Example: '<literal>en</literal>'. + </simpara> + </listitem> + </varlistentry> + + <varlistentry> + <term>'<varname>HTTP_CONNECTION</varname>'</term> + <listitem> + <simpara> + Contents of the <literal>Connection:</literal> header from + the current request, if there is one. Example: '<literal>Keep-Alive</literal>'. + </simpara> + </listitem> + </varlistentry> + + <varlistentry> + <term>'<varname>HTTP_HOST</varname>'</term> + <listitem> + <simpara> + Contents of the <literal>Host:</literal> header from the + current request, if there is one. + </simpara> + </listitem> + </varlistentry> + + <varlistentry> + <term>'<varname>HTTP_REFERER</varname>'</term> + <listitem> + <simpara> + The address of the page (if any) which referred the user + agent to the current page. This is set by the user agent. Not + all user agents will set this, and some provide the ability + to modify <varname>HTTP_REFERER</varname> as a feature. In + short, it cannot really be trusted. + </simpara> + </listitem> + </varlistentry> + + <varlistentry> + <term>'<varname>HTTP_USER_AGENT</varname>'</term> + <listitem> + <simpara> + Contents of the <literal>User-Agent:</literal> header from + the current request, if there is one. This is a string + denoting the user agent being which is accessing the page. A + typical example is: <computeroutput>Mozilla/4.5 [en] (X11; U; + Linux 2.2.9 i586)</computeroutput>. Among other things, you + can use this value with <function>get_browser</function> to + tailor your page's output to the capabilities of the user + agent. + </simpara> + </listitem> + </varlistentry> + + <varlistentry> + <term>'<varname>REMOTE_ADDR</varname>'</term> + <listitem> + <simpara> + The IP address from which the user is viewing the current + page. + </simpara> + </listitem> + </varlistentry> + + <varlistentry> + <term>'<varname>REMOTE_HOST</varname>'</term> + <listitem> + <simpara> + The Host name from which the user is viewing the current + page. The reverse dns lookup is based off the + <varname>REMOTE_ADDR</varname> of the user. + </simpara> + <note> + <simpara> + Your web server must be configured to create this variable. For + example in Apache you'll need <literal>HostnameLookups On</literal> + inside &httpd.conf; for it to exist. See also + <function>gethostbyaddr</function>. + </simpara> + </note> + </listitem> + </varlistentry> + + <varlistentry> + <term>'<varname>REMOTE_PORT</varname>'</term> + <listitem> + <simpara> + The port being used on the user's machine to communicate with + the web server. + </simpara> + </listitem> + </varlistentry> + + <varlistentry> + <term>'<varname>SCRIPT_FILENAME</varname>'</term> + <listitem> + <para> + The absolute pathname of the currently executing script. + <note> + <para> + If a script is executed with the CLI, as a relative path, + such as <filename>file.php</filename> or + <filename>../file.php</filename>, + <varname>$_SERVER['SCRIPT_FILENAME']</varname> will + contain the relative path specified by the user. + </para> + </note> + </para> + </listitem> + </varlistentry> + + <varlistentry> + <term>'<varname>SERVER_ADMIN</varname>'</term> + <listitem> + <simpara> + The value given to the SERVER_ADMIN (for Apache) directive in + the web server configuration file. If the script is running + on a virtual host, this will be the value defined for that + virtual host. + </simpara> + </listitem> + </varlistentry> + + <varlistentry> + <term>'<varname>SERVER_PORT</varname>'</term> + <listitem> + <simpara> + The port on the server machine being used by the web server + for communication. For default setups, this will be '<literal>80</literal>'; + using SSL, for instance, will change this to whatever your + defined secure HTTP port is. + </simpara> + </listitem> + </varlistentry> + + <varlistentry> + <term>'<varname>SERVER_SIGNATURE</varname>'</term> + <listitem> + <simpara> + String containing the server version and virtual host name + which are added to server-generated pages, if enabled. + </simpara> + </listitem> + </varlistentry> + + <varlistentry> + <term>'<varname>PATH_TRANSLATED</varname>'</term> + <listitem> + <simpara> + Filesystem- (not document root-) based path to the current + script, after the server has done any virtual-to-real + mapping. + </simpara> + <note> + <simpara> + As of PHP 4.3.2, <envar>PATH_TRANSLATED</envar> is no longer set + implicitly under the Apache 2 <acronym>SAPI</acronym> in contrast + to the situation in Apache 1, where it's set to the same value as + the <envar>SCRIPT_FILENAME</envar> server variable when it's not + populated by Apache. This change was made to comply with the + <acronym>CGI</acronym> specification that + <envar>PATH_TRANSLATED</envar> should only exist if + <envar>PATH_INFO</envar> is defined. + </simpara> + <simpara> + Apache 2 users may use <literal>AcceptPathInfo = On</literal> inside + <filename>httpd.conf</filename> to define <envar>PATH_INFO</envar>. + </simpara> + </note> + </listitem> + </varlistentry> + + <varlistentry> + <term>'<varname>SCRIPT_NAME</varname>'</term> + <listitem> + <simpara> + Contains the current script's path. This is useful for pages + which need to point to themselves. + The <link linkend="language.constants.predefined">__FILE__</link> + constant contains the full path and filename of the current (i.e. + included) file. + </simpara> + </listitem> + </varlistentry> + + <varlistentry> + <term>'<varname>REQUEST_URI</varname>'</term> + <listitem> + <simpara> + The URI which was given in order to access this page; for + instance, '<literal>/index.html</literal>'. + </simpara> + </listitem> + </varlistentry> + + <varlistentry> + <term>'<varname>PHP_AUTH_USER</varname>'</term> + <listitem> + <simpara> + When running under Apache as module doing HTTP authentication this + variable is set to the username provided by the user. + </simpara> + </listitem> + </varlistentry> + + <varlistentry> + <term>'<varname>PHP_AUTH_PW</varname>'</term> + <listitem> + <simpara> + When running under Apache as module doing HTTP authentication this + variable is set to the password provided by the user. + </simpara> + </listitem> + </varlistentry> + + <varlistentry> + <term>'<varname>AUTH_TYPE</varname>'</term> + <listitem> + <simpara> + When running under Apache as module doing HTTP authenticated this + variable is set to the authentication type. + </simpara> + </listitem> + </varlistentry> + + </variablelist> + </para> + + </sect2> + + <sect2 id="reserved.variables.environment"> + <title>Environment variables: <varname>$_ENV</varname></title> + + <note> + <simpara> + Introduced in 4.1.0. In earlier versions, use + <varname>$HTTP_ENV_VARS</varname>. + </simpara> + </note> + + <simpara> + These variables are imported into PHP's global namespace from the + environment under which the PHP parser is running. Many are + provided by the shell under which PHP is running and different + systems are likely running different kinds of shells, a + definitive list is impossible. Please see your shell's + documentation for a list of defined environment variables. + </simpara> + + <simpara> + Other environment variables include the CGI variables, placed + there regardless of whether PHP is running as a server module or + CGI processor. + </simpara> + + <simpara> + This is a 'superglobal', or automatic global, variable. This + simply means that it is available in all scopes throughout a + script. You don't need to do a <command>global + $_ENV;</command> to access it within functions or methods, as + you do with <varname>$HTTP_ENV_VARS</varname>. + </simpara> + + <simpara> + <varname>$HTTP_ENV_VARS</varname> contains the same initial + information, but is not an autoglobal. (Note that + <varname>$HTTP_ENV_VARS</varname> and <varname>$_ENV</varname> + are different variables and that PHP handles them as such) + </simpara> + + <simpara> + If the <link + linkend="ini.register-globals">register_globals</link> directive + is set, then these variables will also be made available in the + global scope of the script; i.e., separate from the + <varname>$_ENV</varname> and <varname>$HTTP_ENV_VARS</varname> + arrays. For related information, see the security chapter titled + <link linkend="security.globals">Using Register + Globals</link>. These individual globals are not autoglobals. + </simpara> + </sect2> + + <sect2 id="reserved.variables.cookies"> + <title>HTTP Cookies: <varname>$_COOKIE</varname></title> + + <note> + <simpara> + Introduced in 4.1.0. In earlier versions, use + <varname>$HTTP_COOKIE_VARS</varname>. + </simpara> + </note> + + <simpara> + An associative array of variables passed to the current script + via HTTP cookies. Automatically global in any scope. + </simpara> + + <simpara> + This is a 'superglobal', or automatic global, variable. This + simply means that it is available in all scopes throughout a + script. You don't need to do a <command>global + $_COOKIE;</command> to access it within functions or methods, as + you do with <varname>$HTTP_COOKIE_VARS</varname>. + </simpara> + + <simpara> + <varname>$HTTP_COOKIE_VARS</varname> contains the same initial + information, but is not an autoglobal. (Note that + <varname>$HTTP_COOKIE_VARS</varname> and <varname>$_COOKIE</varname> + are different variables and that PHP handles them as such) + </simpara> + + <simpara> + If the <link + linkend="ini.register-globals">register_globals</link> directive + is set, then these variables will also be made available in the + global scope of the script; i.e., separate from the + <varname>$_COOKIE</varname> and <varname>$HTTP_COOKIE_VARS</varname> + arrays. For related information, see the security chapter titled + <link linkend="security.globals">Using Register + Globals</link>. These individual globals are not autoglobals. + </simpara> + </sect2> + + <sect2 id="reserved.variables.get"> + <title>HTTP GET variables: <varname>$_GET</varname></title> + + <note> + <simpara> + Introduced in 4.1.0. In earlier versions, use + <varname>$HTTP_GET_VARS</varname>. + </simpara> + </note> + + <simpara> + An associative array of variables passed to the current script + via the HTTP GET method. Automatically global in any scope. + </simpara> + + <simpara> + This is a 'superglobal', or automatic global, variable. This + simply means that it is available in all scopes throughout a + script. You don't need to do a <command>global + $_GET;</command> to access it within functions or methods, as + you do with <varname>$HTTP_GET_VARS</varname>. + </simpara> + + <simpara> + <varname>$HTTP_GET_VARS</varname> contains the same initial + information, but is not an autoglobal. (Note that + <varname>$HTTP_GET_VARS</varname> and <varname>$_GET</varname> + are different variables and that PHP handles them as such) + </simpara> + + <simpara> + If the <link + linkend="ini.register-globals">register_globals</link> directive + is set, then these variables will also be made available in the + global scope of the script; i.e., separate from the + <varname>$_GET</varname> and <varname>$HTTP_GET_VARS</varname> + arrays. For related information, see the security chapter titled + <link linkend="security.globals">Using Register + Globals</link>. These individual globals are not autoglobals. + </simpara> + </sect2> + + <sect2 id="reserved.variables.post"> + <title>HTTP POST variables: <varname>$_POST</varname></title> + + <note> + <simpara> + Introduced in 4.1.0. In earlier versions, use + <varname>$HTTP_POST_VARS</varname>. + </simpara> + </note> + + <simpara> + An associative array of variables passed to the current script + via the HTTP POST method. Automatically global in any scope. + </simpara> + + <simpara> + This is a 'superglobal', or automatic global, variable. This + simply means that it is available in all scopes throughout a + script. You don't need to do a <command>global + $_POST;</command> to access it within functions or methods, as + you do with <varname>$HTTP_POST_VARS</varname>. + </simpara> + + <simpara> + <varname>$HTTP_POST_VARS</varname> contains the same initial + information, but is not an autoglobal. (Note that + <varname>$HTTP_POST_VARS</varname> and <varname>$_POST</varname> + are different variables and that PHP handles them as such) + </simpara> + + <simpara> + If the <link + linkend="ini.register-globals">register_globals</link> directive + is set, then these variables will also be made available in the + global scope of the script; i.e., separate from the + <varname>$_POST</varname> and <varname>$HTTP_POST_VARS</varname> + arrays. For related information, see the security chapter titled + <link linkend="security.globals">Using Register + Globals</link>. These individual globals are not autoglobals. + </simpara> + </sect2> + + <sect2 id="reserved.variables.files"> + <title>HTTP File upload variables: <varname>$_FILES</varname></title> + + <note> + <simpara> + Introduced in 4.1.0. In earlier versions, use + <varname>$HTTP_POST_FILES</varname>. + </simpara> + </note> + + <simpara> + An associative array of items uploaded to the current script + via the HTTP POST method. Automatically global in any scope. + </simpara> + + <simpara> + This is a 'superglobal', or automatic global, variable. This + simply means that it is available in all scopes throughout a + script. You don't need to do a <command>global + $_FILES;</command> to access it within functions or methods, as + you do with <varname>$HTTP_POST_FILES</varname>. + </simpara> + + <simpara> + <varname>$HTTP_POST_FILES</varname> contains the same + information, but is not an autoglobal. (Note that + <varname>$HTTP_POST_FILES</varname> and <varname>$_FILES</varname> + are different variables and that PHP handles them as such) + </simpara> + + <simpara> + If the <link + linkend="ini.register-globals">register_globals</link> directive + is set, then these variables will also be made available in the + global scope of the script; i.e., separate from the + <varname>$_FILES</varname> and <varname>$HTTP_POST_FILES</varname> + arrays. For related information, see the security chapter titled + <link linkend="security.globals">Using Register + Globals</link>. These individual globals are not autoglobals. + </simpara> + </sect2> + + <sect2 id="reserved.variables.request"> + <title>Request variables: <varname>$_REQUEST</varname></title> + + <note> + <simpara> + Introduced in 4.1.0. There is no equivalent array in earlier + versions. + </simpara> + </note> + <note> + <simpara> + Prior to PHP 4.3.0, <varname>$_FILES</varname> information was + also included in <varname>$_REQUEST</varname>. + </simpara> + </note> + + <simpara> + An associative array consisting of the contents of + <varname>$_GET</varname>, <varname>$_POST</varname>, + and <varname>$_COOKIE</varname>. + </simpara> + + <simpara> + This is a 'superglobal', or automatic global, variable. This + simply means that it is available in all scopes throughout a + script. You don't need to do a <command>global + $_REQUEST;</command> to access it within functions or methods. + </simpara> + + <simpara> + If the <link + linkend="ini.register-globals">register_globals</link> directive + is set, then these variables will also be made available in the + global scope of the script; i.e., separate from the + <varname>$_REQUEST</varname> array. For related information, see + the security chapter titled <link + linkend="security.globals">Using Register + Globals</link>. These individual globals are not autoglobals. + </simpara> + </sect2> + + <sect2 id="reserved.variables.session"> + <title>Session variables: <varname>$_SESSION</varname></title> + + <note> + <simpara> + Introduced in 4.1.0. In earlier versions, use + <varname>$HTTP_SESSION_VARS</varname>. + </simpara> + </note> + + <simpara> + An associative array containing session variables available to + the current script. See the <link linkend="ref.session">Session + functions</link> documentation for more information on how this + is used. + </simpara> + + <simpara> + This is a 'superglobal', or automatic global, variable. This + simply means that it is available in all scopes throughout a + script. You don't need to do a <command>global + $_SESSION;</command> to access it within functions or methods, as + you do with <varname>$HTTP_SESSION_VARS</varname>. + </simpara> + + <simpara> + <varname>$HTTP_SESSION_VARS</varname> contains the same + information, but is not an autoglobal. (Note that + <varname>$HTTP_SESSION_VARS</varname> and <varname>$_SESSION</varname> + are different variables and that PHP handles them as such) + </simpara> + + <simpara> + If the <link + linkend="ini.register-globals">register_globals</link> directive + is set, then these variables will also be made available in the + global scope of the script; i.e., separate from the + <varname>$_SESSION</varname> and <varname>$HTTP_SESSION_VARS</varname> + arrays. For related information, see the security chapter titled + <link linkend="security.globals">Using Register + Globals</link>. These individual globals are not autoglobals. + </simpara> + </sect2> + + <sect2 id="reserved.variables.globals"> + <title>Global variables: <varname>$GLOBALS</varname></title> + + <note> + <simpara> + <varname>$GLOBALS</varname> has been available since PHP 3.0.0. + </simpara> + </note> + + <simpara> + An associative array containing references to all variables which + are currently defined in the global scope of the script. The + variable names are the keys of the array. + </simpara> + + <simpara> + This is a 'superglobal', or automatic global, variable. This + simply means that it is available in all scopes throughout a + script. You don't need to do a <command>global + $GLOBALS;</command> to access it within functions or methods. + </simpara> + + </sect2> + + <sect2 id="reserved.variables.phperrormsg"> + <title>The previous error message: <varname>$php_errormsg</varname></title> + <simpara> + <varname>$php_errormsg</varname> is a variable containing the + text of the last error message generated by PHP. This variable + will only be available within the scope in which the error + occurred, and only if the <link + linkend="ini.track-errors">track_errors</link> configuration + option is turned on (it defaults to off). + </simpara> + </sect2> + </sect1> + + + <sect1 id="reserved.classes"> + <title>Predefined Classes</title> + + <sect2 id="reserved.classes.standard"> + <title>Standard Defined Classes</title> + + <simpara> + These classes are defined in the standard set of functions included + in the PHP build. + </simpara> + + <variablelist> + <varlistentry> + <term><classname>Directory</classname></term> + <listitem> + <simpara> + The class from which <link linkend="class.dir">dir</link> is instantiated. + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><classname>stdClass</classname></term> + <listitem> + <simpara> + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><classname>__PHP_Incomplete_Class</classname></term> + <listitem> + <simpara> + </simpara> + </listitem> + </varlistentry> + </variablelist> + </sect2> + + <sect2 id="reserved.classes.php5"> + <title>Predefined classes as of PHP 5</title> + + <simpara> + These additional predefined classes were introduced in + PHP 5.0.0 + </simpara> + + <variablelist> + <varlistentry> + <term><classname>exception</classname></term> + <listitem> + <simpara> + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><classname>php_user_filter</classname></term> + <listitem> + <simpara> + </simpara> + </listitem> + </varlistentry> + </variablelist> + </sect2> + + <sect2 id="reserved.classes.ming"> + <title><link linkend="ref.ming">Ming</link> Defined Classes</title> + + <simpara> + These classes are defined in the + <link linkend="ref.ming">Ming</link> + extension, and will only be available when that extension has either + been compiled into PHP or dynamically loaded at runtime. + </simpara> + + <variablelist> + <varlistentry> + <term><classname>swfshape</classname></term> + <listitem> + <simpara> + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><classname>swffill</classname></term> + <listitem> + <simpara> + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><classname>swfgradient</classname></term> + <listitem> + <simpara> + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><classname>swfbitmap</classname></term> + <listitem> + <simpara> + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><classname>swftext</classname></term> + <listitem> + <simpara> + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><classname>swftextfield</classname></term> + <listitem> + <simpara> + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><classname>swffont</classname></term> + <listitem> + <simpara> + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><classname>swfdisplayitem</classname></term> + <listitem> + <simpara> + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><classname>swfmovie</classname></term> + <listitem> + <simpara> + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><classname>swfbutton</classname></term> + <listitem> + <simpara> + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><classname>swfaction</classname></term> + <listitem> + <simpara> + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><classname>swfmorph</classname></term> + <listitem> + <simpara> + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><classname>swfsprite</classname></term> + <listitem> + <simpara> + </simpara> + </listitem> + </varlistentry> + </variablelist> + </sect2> + + <sect2 id="reserved.classes.oci8"> + <title><link linkend="ref.oci8">Oracle 8</link> Defined Classes</title> + + <simpara> + These classes are defined in the <link + linkend="ref.oci8">Oracle 8</link> extension, and will only be + available when that extension has either been compiled into PHP + or dynamically loaded at runtime. + </simpara> + + <variablelist> + <varlistentry> + <term><classname>OCI-Lob</classname></term> + <listitem> + <simpara> + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><classname>OCI-Collection</classname></term> + <listitem> + <simpara> + </simpara> + </listitem> + </varlistentry> + </variablelist> + </sect2> + + <sect2 id="reserved.classes.qtdom"> + <title><link linkend="ref.qtdom">qtdom</link> Defined Classes</title> + + <simpara> + These classes are defined in the + <link linkend="ref.qtdom">qtdom</link> + extension, and will only be available when that extension has either + been compiled into PHP or dynamically loaded at runtime. + </simpara> + + <variablelist> + <varlistentry> + <term><classname>QDomDocument</classname></term> + <listitem> + <simpara> + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><classname>QDomNode</classname></term> + <listitem> + <simpara> + </simpara> + </listitem> + </varlistentry> + </variablelist> + </sect2> + + </sect1> + + &appendices.reserved.constants; + </appendix> <!-- Keep this comment at the end of the file http://cvs.php.net/diff.php/phpdoc-it/features/safe-mode.xml?r1=1.7&r2=1.8&ty=u Index: phpdoc-it/features/safe-mode.xml diff -u phpdoc-it/features/safe-mode.xml:1.7 phpdoc-it/features/safe-mode.xml:1.8 --- phpdoc-it/features/safe-mode.xml:1.7 Wed Dec 12 15:51:46 2001 +++ phpdoc-it/features/safe-mode.xml Tue Mar 8 12:00:00 2005 @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- EN-Revision: 1.16 Maintainer: perugini Status: working --> +<!-- EN-Revision: 1.17 Maintainer: cucinato Status: working --> +<!-- CREDITS: perugini --> <chapter id="features.safe-mode"> <title>Modalità sicura (Safe mode)</title> @@ -11,6 +12,300 @@ non sono realistiche, in molti, specialmente ISP (Internet Service Provider), utilizzano la modalità sicura. </para> + + <sect1 id="ini.sect.safe-mode"> + <title>Security and Safe Mode</title> + <para> + <table> + <title>Direttive di configurazione della Modalità sicura e Sdella icurezza</title> + <tgroup cols="4"> + <thead> + <row> + <entry>Nome</entry> + <entry>Default</entry> + <entry>Changeable</entry> + <entry>Changelog</entry> + </row> + </thead> + <tbody> + <row> + <entry>safe_mode</entry> + <entry>"0"</entry> + <entry>PHP_INI_SYSTEM</entry> + <entry></entry> + </row> + <row> + <entry>safe_mode_gid</entry> + <entry>"0"</entry> + <entry>PHP_INI_SYSTEM</entry> + <entry>Disponibile dal PHP 4.1.0.</entry> + </row> + <row> + <entry>safe_mode_include_dir</entry> + <entry>NULL</entry> + <entry>PHP_INI_SYSTEM</entry> + <entry>Disponibile dal PHP 4.1.0.</entry> + </row> + <row> + <entry>safe_mode_exec_dir</entry> + <entry>""</entry> + <entry>PHP_INI_SYSTEM</entry> + <entry></entry> + </row> + <row> + <entry>safe_mode_allowed_env_vars</entry> + <entry>"PHP_"</entry> + <entry>PHP_INI_SYSTEM</entry> + <entry></entry> + </row> + <row> + <entry>safe_mode_protected_env_vars</entry> + <entry>"LD_LIBRARY_PATH"</entry> + <entry>PHP_INI_SYSTEM</entry> + <entry></entry> + </row> + <row> + <entry>open_basedir</entry> + <entry>NULL</entry> + <entry>PHP_INI_SYSTEM</entry> + <entry></entry> + </row> + <row> + <entry>disable_functions</entry> + <entry>""</entry> + <entry>&php.ini; only</entry> + <entry>Disponibile dal PHP 4.0.1.</entry> + </row> + <row> + <entry>disable_classes</entry> + <entry>""</entry> + <entry>&php.ini; only</entry> + <entry>Disponibile dal PHP 4.3.2.</entry> + </row> + </tbody> + </tgroup> + </table> + Per ulteriori dettagli e definizione delle costanti PHP_INI_* vedere + <function>ini_set</function>. + </para> + + &ini.descriptions.title; + + <para> + <variablelist> + <varlistentry id="ini.safe-mode"> + <term> + <parameter>safe_mode</parameter> + <type>boolean</type> + </term> + <listitem> + <para> + Abilita o disabilita la modalità sicura di PHP's. Leggere il + capitolo <link linkend="security">Sicurezza</link> per ulteriori + informazioni. + </para> + </listitem> + </varlistentry> + <varlistentry id="ini.safe-mode-gid"> + <term> + <parameter>safe_mode_gid</parameter> + <type>boolean</type> + </term> + <listitem> + <para> + Di default, Safe Mode does a UID compare check when + opening files. If you want to relax this to a GID compare, + then turn on safe_mode_gid. + Whether to use <literal>UID</literal> (&false;) or + <literal>GID</literal> (&true;) checking upon file + access. + </para> + </listitem> + </varlistentry> + <varlistentry id="ini.safe-mode-include-dir"> + <term> + <parameter>safe_mode_include_dir</parameter> + <type>string</type> + </term> + <listitem> + <para> + <literal>UID</literal>/<literal>GID</literal> checks are bypassed when + including files from this directory and its subdirectories (directory + must also be in <link linkend="ini.include-path">include_path</link> + or full path must including). + </para> + <simpara> + As of PHP 4.2.0, this directive can take a colon (semi-colon on + Windows) separated path in a fashion similar to the + <link linkend="ini.include-path">include_path</link> directive, + rather than just a single directory. + </simpara> + <simpara> + The restriction specified is actually a prefix, not a directory name. + This means that "safe_mode_include_dir = /dir/incl" also allows + access to "/dir/include" and "/dir/incls" if they exist. When you + want to restrict access to only the specified directory, end with a + slash. For example: "safe_mode_include_dir = /dir/incl/" + </simpara> + </listitem> + </varlistentry> + <varlistentry id="ini.safe-mode-exec-dir"> + <term> + <parameter>safe_mode_exec_dir</parameter> + <type>string</type> + </term> + <listitem> + <para> + If PHP is used in safe mode, <function>system</function> and the other + <link linkend="ref.exec">functions executing system programs</link> + refuse to start programs that are not in this directory. + You have to use <literal>/</literal> as directory separator on all + environments including Windows. + </para> + </listitem> + </varlistentry> + <varlistentry id="ini.safe-mode-allowed-env-vars"> + <term> + <parameter>safe_mode_allowed_env_vars</parameter> + <type>string</type> + </term> + <listitem> + <para> + Setting certain environment variables may be a potential security breach. + This directive contains a comma-delimited list of prefixes. In Safe Mode, + the user may only alter environment variables whose names begin with the + prefixes supplied here. By default, users will only be able to set + environment variables that begin with PHP_ (e.g. PHP_FOO=BAR). + </para> + <note> + <para> + If this directive is empty, PHP will let the user modify ANY + environment variable! + </para> + </note> + </listitem> + </varlistentry> + <varlistentry id="ini.safe-mode-protected-env-vars"> + <term> + <parameter>safe_mode_protected_env_vars</parameter> + <type>string</type> + </term> + <listitem> + <para> + This directive contains a comma-delimited list of environment + variables that the end user won't be able to change using + <function>putenv</function>. These variables will be protected + even if safe_mode_allowed_env_vars is set to allow to change them. + </para> + </listitem> + </varlistentry> + <varlistentry id="ini.open-basedir"> + <term> + <parameter>open_basedir</parameter> + <type>string</type> + </term> + <listitem> + <para> + Limit the files that can be opened by PHP to the specified + directory-tree, including the file itself. This directive + is <emphasis>NOT</emphasis> affected by whether Safe Mode is + turned On or Off. + </para> + <para> + When a script tries to open a file with, for example, + <function>fopen</function> or <function>gzopen</function>, + the location of the file is checked. When the file is outside the + specified directory-tree, PHP will refuse to open it. All symbolic + links are resolved, so it's not possible to avoid this restriction + with a symlink. + </para> + <para> + The special value <systemitem class="constant">.</systemitem> + indicates that the working directory of the script will be used as the + base-directory. This is, however, a little dangerous as the working directory + of the script can easily be changed with <function>chdir</function>. + </para> + <para> + In <filename>httpd.conf</filename>, open_basedir can be turned off + (e.g. for some virtual hosts) + <link linkend="configuration.changes.apache">the same way</link> as + any other configuration directive with "php_admin_value open_basedir + none". + </para> + <para> + Under Windows, separate the directories with a semicolon. On all + other systems, separate the directories with a colon. As an Apache + module, open_basedir paths from parent directories are now + automatically inherited. + </para> + <para> + The restriction specified with open_basedir is actually a + prefix, not a directory name. This means that "open_basedir = + /dir/incl" also allows access to "/dir/include" and + "/dir/incls" if they exist. When you want to restrict access + to only the specified directory, end with a slash. For example: + "open_basedir = /dir/incl/" + </para> + <note> + <para> + Support for multiple directories was added in 3.0.7. + </para> + </note> + <para> + The default is to allow all files to be opened. + </para> + </listitem> + </varlistentry> + <varlistentry id="ini.disable-functions"> + <term> + <parameter>disable_functions</parameter> + <type>string</type> + </term> + <listitem> + <simpara> + This directive allows you to disable certain functions for + <link linkend="security">security</link> reasons. It takes + on a comma-delimited list of function names. disable_functions + is not affected by <link linkend="ini.safe-mode">Safe Mode</link>. + </simpara> + <simpara> + This directive must be set in &php.ini; For example, you + cannot set this in &httpd.conf;. + </simpara> + </listitem> + </varlistentry> + <varlistentry id="ini.disable-classes"> + <term> + <parameter>disable_classes</parameter> + <type>string</type> + </term> + <listitem> + <simpara> + This directive allows you to disable certain classes for + <link linkend="security">security</link> reasons. It takes + on a comma-delimited list of class names. disable_classes + is not affected by <link linkend="ini.safe-mode">Safe Mode</link>. + </simpara> + <simpara> + This directive must be set in &php.ini; For example, you + cannot set this in &httpd.conf;. + </simpara> + <note> + <title>Availability note</title> + <simpara> + This directive became available in PHP 4.3.2 + </simpara> + </note> + </listitem> + </varlistentry> + </variablelist> + </para> + <para> + See also: <link linkend="ini.register-globals">register_globals</link>, + <link linkend="ini.display-errors">display_errors</link>, and + <link linkend="ini.log-errors">log_errors</link> + </para> + <para> Le direttive di configurazione che controllano la modalità sicura sono: <programlisting role="ini"> @@ -87,6 +382,7 @@ ]]> </screen> </para> + </sect1> <sect1 id="features.safe-mode.functions"> <title>Funzioni limitate/disabilitate dalla modalità sicura (safe-mode)</title> http://cvs.php.net/co.php/phpdoc-it/reference/session/ini.xml?r=1.1&p=1 Index: phpdoc-it/reference/session/ini.xml +++ phpdoc-it/reference/session/ini.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- EN-Revision: 1.30 Maintainer: cucinato Status: working --> <section id="session.configuration"> &reftitle.runtime; &extension.runtime; <para> <table> <title>Opzioni di configurazione della sessione</title> <tgroup cols="4"> <thead> <row> <entry>Name</entry> <entry>Default</entry> <entry>Modificabile</entry> <entry>Changelog</entry> </row> </thead> <tbody> <row> <entry>session.save_path</entry> <entry>""</entry> <entry>PHP_INI_ALL</entry> <entry></entry> </row> <row> <entry>session.name</entry> <entry>"PHPSESSID"</entry> <entry>PHP_INI_ALL</entry> <entry></entry> </row> <row> <entry>session.save_handler</entry> <entry>"files"</entry> <entry>PHP_INI_ALL</entry> <entry></entry> </row> <row> <entry>session.auto_start</entry> <entry>"0"</entry> <entry>PHP_INI_ALL</entry> <entry></entry> </row> <row> <entry>session.gc_probability</entry> <entry>"1"</entry> <entry>PHP_INI_ALL</entry> <entry></entry> </row> <row> <entry>session.gc_divisor</entry> <entry>"100"</entry> <entry>PHP_INI_ALL</entry> <entry>Disponibile dal PHP 4.3.2.</entry> </row> <row> <entry>session.gc_maxlifetime</entry> <entry>"1440"</entry> <entry>PHP_INI_ALL</entry> <entry></entry> </row> <row> <entry>session.serialize_handler</entry> <entry>"php"</entry> <entry>PHP_INI_ALL</entry> <entry></entry> </row> <row> <entry>session.cookie_lifetime</entry> <entry>"0"</entry> <entry>PHP_INI_ALL</entry> <entry></entry> </row> <row> <entry>session.cookie_path</entry> <entry>"/"</entry> <entry>PHP_INI_ALL</entry> <entry></entry> </row> <row> <entry>session.cookie_domain</entry> <entry>""</entry> <entry>PHP_INI_ALL</entry> <entry></entry> </row> <row> <entry>session.cookie_secure</entry> <entry>""</entry> <entry>PHP_INI_ALL</entry> <entry>Disponibile dal PHP 4.0.4.</entry> </row> <row> <entry>session.use_cookies</entry> <entry>"1"</entry> <entry>PHP_INI_ALL</entry> <entry></entry> </row> <row> <entry>session.use_only_cookies</entry> <entry>"0"</entry> <entry>PHP_INI_ALL</entry> <entry>Disponibile dal PHP 4.3.0.</entry> </row> <row> <entry>session.referer_check</entry> <entry>""</entry> <entry>PHP_INI_ALL</entry> <entry></entry> </row> <row> <entry>session.entropy_file</entry> <entry>""</entry> <entry>PHP_INI_ALL</entry> <entry></entry> </row> <row> <entry>session.entropy_length</entry> <entry>"0"</entry> <entry>PHP_INI_ALL</entry> <entry></entry> </row> <row> <entry>session.cache_limiter</entry> <entry>"nocache"</entry> <entry>PHP_INI_ALL</entry> <entry></entry> </row> <row> <entry>session.cache_expire</entry> <entry>"180"</entry> <entry>PHP_INI_ALL</entry> <entry></entry> </row> <row> <entry>session.use_trans_sid</entry> <entry>"0"</entry> <entry>PHP_INI_ALL</entry> <entry>PHP_INI_ALL in PHP <= 4.2.3. PHP_INI_PERDIR in PHP <= 4-cvs. Disponibile dal PHP 4.0.3.</entry> </row> <row> <entry>session.bug_compat_42</entry> <entry>"1"</entry> <entry>PHP_INI_ALL</entry> <entry>Disponibile dal PHP 4.3.0.</entry> </row> <row> <entry>session.bug_compat_warn</entry> <entry>"1"</entry> <entry>PHP_INI_ALL</entry> <entry>Disponibile dal PHP 4.3.0.</entry> </row> <row> <entry>session.hash_function</entry> <entry>"0"</entry> <entry>PHP_INI_ALL</entry> <entry>Disponibile dal PHP 5.0.0.</entry> </row> <row> <entry>session.hash_bits_per_character</entry> <entry>"4"</entry> <entry>PHP_INI_ALL</entry> <entry>Disponibile dal PHP 5.0.0.</entry> </row> <row> <entry>url_rewriter.tags</entry> <entry>"a=href,area=href,frame=src,form=,fieldset="</entry> <entry>PHP_INI_ALL</entry> <entry>Disponibile dal PHP 4.0.4.</entry> </row> <!-- Not yet <row> <entry>session.encode_sources</entry> <entry>"globals</entry> <entry>track"</entry> <entry></entry> </row> --> </tbody> </tgroup> </table> &ini.php.constants; </para> <para> The session management system supports a number of configuration options which you can place in your &php.ini; file. We will give a short overview. <variablelist> <varlistentry id="ini.session.save-handler"> <term> <parameter>session.save_handler</parameter> <type>string</type> </term> <listitem> <simpara> <literal>session.save_handler</literal> defines the name of the handler which is used for storing and retrieving data associated with a session. Defaults to <literal>files</literal>. See also <function>session_set_save_handler</function>. </simpara> </listitem> </varlistentry> <varlistentry id="ini.session.save-path"> <term> <parameter>session.save_path</parameter> <type>string</type> </term> <listitem> <simpara> <literal>session.save_path</literal> 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. Defaults to <literal>/tmp</literal>. See also <function>session_save_path</function>. </simpara> <para> There is an optional N argument to this directive that determines the number of directory levels your session files will be spread around in. For example, setting to <literal>'5;/tmp'</literal> may end up creating a session file and location like <literal>/tmp/4/b/1/e/3/sess_4b1e384ad74619bd212e236e52a5a174If </literal>. In order to use N you must create all of these directories before use. A small shell script exists in <filename>ext/session</filename> to do this, it's called <filename>mod_files.sh</filename>. Also note that if N is used and greater than 0 then automatic garbage collection will not be performed, see a copy of &php.ini; for further information. Also, if you use N, be sure to surround <literal>session.save_path</literal> in "quotes" because the separator (<literal>;</literal>) is also used for comments in &php.ini;. </para> <warning> <para> If you leave this set to a world-readable directory, such as <filename>/tmp</filename> (the default), other users on the server may be able to hijack sessions by getting the list of files in that directory. </para> </warning> <note> <simpara> Prior to PHP 4.3.6, Windows users had to change this variable in order to use PHP's session functions. A valid path must be specified, e.g.: <filename>c:/temp</filename>. </simpara> </note> </listitem> </varlistentry> <varlistentry id="ini.session.name"> <term> <parameter>session.name</parameter> <type>string</type> </term> <listitem> <simpara> <literal>session.name</literal> specifies the name of the session which is used as cookie name. It should only contain alphanumeric characters. Defaults to <literal>PHPSESSID</literal>. See also <function>session_name</function>. </simpara> </listitem> </varlistentry> <varlistentry id="ini.session.auto-start"> <term> <parameter>session.auto_start</parameter> <type>boolean</type> </term> <listitem> <simpara> <literal>session.auto_start</literal> specifies whether the session module starts a session automatically on request startup. Defaults to <literal>0</literal> (disabled). </simpara> </listitem> </varlistentry> <varlistentry id="ini.session.serialize-handler"> <term> <parameter>session.serialize_handler</parameter> <type>string</type> </term> <listitem> <simpara> <literal>session.serialize_handler</literal> defines the name of the handler which is used to serialize/deserialize data. Currently, a PHP internal format (name <literal>php</literal>) and WDDX is supported (name <literal>wddx</literal>). WDDX is only available, if PHP is compiled with <link linkend="ref.wddx">WDDX support</link>. Defaults to <literal>php</literal>. </simpara> </listitem> </varlistentry> <varlistentry id="ini.session.gc-probability"> <term> <parameter>session.gc_probability</parameter> <type>integer</type> </term> <listitem> <simpara> <literal>session.gc_probability</literal> in conjunction with <literal>session.gc_divisor</literal> is used to manage probability that the gc (garbage collection) routine is started. Defaults to <literal>1</literal>. See <link linkend="ini.session.gc-divisor">session.gc_divisor</link> for details. </simpara> </listitem> </varlistentry> <varlistentry id="ini.session.gc-divisor"> <term> <parameter>session.gc_divisor</parameter> <type>integer</type> </term> <listitem> <simpara> <literal>session.gc_divisor</literal> coupled with <literal>session.gc_probability</literal> 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. <literal>session.gc_divisor</literal> defaults to <literal>100</literal>. </simpara> </listitem> </varlistentry> <varlistentry id="ini.session.gc-maxlifetime"> <term> <parameter>session.gc_maxlifetime</parameter> <type>integer</type> </term> <listitem> <simpara> <literal>session.gc_maxlifetime</literal> specifies the number of seconds after which data will be seen as 'garbage' and cleaned up. </simpara> <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 fs 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> </note> </listitem> </varlistentry> <varlistentry id="ini.session.referer-check"> <term> <parameter>session.referer_check</parameter> <type>string</type> </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. </simpara> </listitem> </varlistentry> <varlistentry id="ini.session.entropy-file"> <term> <parameter>session.entropy_file</parameter> <type>string</type> </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. </simpara> </listitem> </varlistentry> <varlistentry id="ini.session.entropy-length"> <term> <parameter>session.entropy_length</parameter> <type>integer</type> </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). </simpara> </listitem> </varlistentry> <varlistentry id="ini.session.use-cookies"> <term> <parameter>session.use_cookies</parameter> <type>boolean</type> </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). </simpara> </listitem> </varlistentry> <varlistentry id="ini.session.use-only-cookies"> <term> <parameter>session.use_only_cookies</parameter> <type>boolean</type> </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. </simpara> </listitem> </varlistentry> <varlistentry id="ini.session.cookie-lifetime"> <term> <parameter>session.cookie_lifetime</parameter> <type>integer</type> </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>. </simpara> </listitem> </varlistentry> <varlistentry id="ini.session.cookie-path"> <term> <parameter>session.cookie_path</parameter> <type>string</type> </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>. </simpara> </listitem> </varlistentry> <varlistentry id="ini.session.cookie-domain"> <term> <parameter>session.cookie_domain</parameter> <type>string</type> </term> <listitem> <simpara> <literal>session.cookie_domain</literal> specifies the domain to set in session_cookie. Default is none at all. See also <function>session_get_cookie_params</function> and <function>session_set_cookie_params</function>. </simpara> </listitem> </varlistentry> <varlistentry id="ini.session.cookie-secure"> <term> <parameter>session.cookie_secure</parameter> <type>boolean</type> </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>. </simpara> </listitem> </varlistentry> <varlistentry id="ini.session.cache-limiter"> <term> <parameter>session.cache_limiter</parameter> <type>string</type> </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>. </simpara> </listitem> </varlistentry> <varlistentry id="ini.session.cache-expire"> <term> <parameter>session.cache_expire</parameter> <type>integer</type> </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>. </simpara> </listitem> </varlistentry> <varlistentry id="ini.session.use-trans-sid"> <term> <parameter>session.use_trans_sid</parameter> <type>boolean</type> </term> <listitem> <simpara> <literal>session.use_trans_sid</literal> whether transparent sid support is enabled or not. Defaults to <literal>0</literal> (disabled). </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. </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. </simpara> </note> </listitem> </varlistentry> <varlistentry id="ini.session.bug-compat-42"> <term> <parameter>session.bug_compat_42</parameter> <type>boolean</type> </term> <listitem> <simpara> PHP versions 4.2.0 and lower have an undocumented feature/bug that allows you to 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. </simpara> </listitem> </varlistentry> <varlistentry id="ini.session.bug-compat-warn"> <term> <parameter>session.bug_compat_warn</parameter> <type>boolean</type> </term> <listitem> <simpara> PHP versions 4.2.0 and lower have an undocumented feature/bug that allows you to 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>. </simpara> </listitem> </varlistentry> <varlistentry id="ini.session.hash-function"> <term> <parameter>session.hash_function</parameter> <type>integer</type> </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). </simpara> <note> <para> This was introduced in PHP 5. </para> </note> </listitem> </varlistentry> <varlistentry id="ini.session.hash-bits-per-character"> <term> <parameter>session.hash_bits_per_character</parameter> <type>integer</type> </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, "-", ","). </simpara> <note> <para> This was introduced in PHP 5. </para> </note> </listitem> </varlistentry> <varlistentry id="ini.url-rewriter.tags"> <term> <parameter>url_rewriter.tags</parameter> <type>string</type> </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> </simpara> <note> <simpara> If you want XHTML conformity, remove the <literal>form</literal> entry and use the <fieldset> tags around your form fields. </simpara> </note> </listitem> </varlistentry> </variablelist> </para> <para> The <link linkend="ini.track-vars"><literal>track_vars</literal></link> and <link linkend="ini.register-globals"><literal>register_globals</literal></link> configuration settings influence how the session variables get stored and restored. </para> <note> <para> As of PHP 4.0.3, <link linkend="ini.track-vars"><literal>track_vars</literal></link> is always turned on. </para> </note> </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:"../../../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 -->