Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Info INI page #2543

Merged
merged 1 commit into from
Jun 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions language-snippets.ent
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,10 @@ xmlns="http://docbook.org/ns/docbook"><simpara>This function has been
<emphasis>DEPRECATED</emphasis> as of PHP 7.4.0, and <emphasis>REMOVED</emphasis> as of PHP 8.0.0. Relying on this function
is highly discouraged.</simpara></warning>'>

<!ENTITY warn.feature.removed-8-0-0 '<warning xmlns="http://docbook.org/ns/docbook">
<simpara>This feature was <emphasis>REMOVED</emphasis> as of PHP 8.0.0.</simpara>
</warning>'>

<!ENTITY warn.deprecated.function-8-0-0 '<warning
xmlns="http://docbook.org/ns/docbook"><simpara>This function has been
<emphasis>DEPRECATED</emphasis> as of PHP 8.0.0. Relying on this function
Expand Down
2 changes: 1 addition & 1 deletion reference/info/functions/get-magic-quotes-gpc.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>get_magic_quotes_gpc</methodname>
<type>false</type><methodname>get_magic_quotes_gpc</methodname>
<void/>
</methodsynopsis>
<para>
Expand Down
29 changes: 3 additions & 26 deletions reference/info/functions/get-magic-quotes-runtime.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,11 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>get_magic_quotes_runtime</methodname>
<type>false</type><methodname>get_magic_quotes_runtime</methodname>
<void/>
</methodsynopsis>
<simpara>
Returns the current active configuration setting of <link
linkend="ini.magic-quotes-runtime">magic_quotes_runtime</link>.
Always returns &false;.
</simpara>
</refsect1>

Expand All @@ -30,8 +29,7 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns 0 if magic_quotes_runtime is off, 1 otherwise.
Or always returns &false; as of PHP 5.4.0.
Always returns &false;.
</para>
</refsect1>

Expand All @@ -58,27 +56,6 @@
</informaltable>
</para>
</refsect1>

<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title><function>get_magic_quotes_runtime</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
// Check if magic_quotes_runtime is active
if(get_magic_quotes_runtime())
{
// Deactivate
set_magic_quotes_runtime(false);
}
?>
]]>
</programlisting>
</example>
</para>
</refsect1>

<refsect1 role="seealso">
&reftitle.seealso;
Expand Down
106 changes: 6 additions & 100 deletions reference/info/ini.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,31 +74,19 @@
<entry><link linkend="ini.max-input-nesting-level">max_input_nesting_level</link></entry>
<entry>"64"</entry>
<entry>PHP_INI_PERDIR</entry>
<entry>Available as of PHP 5.2.3.</entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.max-input-vars">max_input_vars</link></entry>
<entry>1000</entry>
<entry>PHP_INI_PERDIR</entry>
<entry>Available as of PHP 5.3.9.</entry>
</row>
<row>
<entry><link linkend="ini.magic-quotes-gpc">magic_quotes_gpc</link></entry>
<entry>"1"</entry>
<entry>PHP_INI_PERDIR</entry>
<entry>Removed in PHP 5.4.0.</entry>
</row>
<row>
<entry><link linkend="ini.magic-quotes-runtime">magic_quotes_runtime</link></entry>
<entry>"0"</entry>
<entry>PHP_INI_ALL</entry>
<entry>Removed in PHP 5.4.0.</entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.zend.enable-gc">zend.enable_gc</link></entry>
<entry>"1"</entry>
<entry>PHP_INI_ALL</entry>
<entry>Available as of PHP 5.3.0.</entry>
<entry></entry>
</row>
</tbody>
</tgroup>
Expand All @@ -118,6 +106,8 @@
<listitem>
<para>
Enable <function>assert</function> evaluation.
<link linkend="ini.zend.assertions">zend.assertions</link> should be
used instead to control the behaviour of <function>assert</function>.
</para>
</listitem>
</varlistentry>
Expand Down Expand Up @@ -164,6 +154,7 @@
<type>bool</type>
</term>
<listitem>
&warn.feature.removed-8-0-0;
<para>
Use the current setting of <function>error_reporting</function> during
assertion expression evaluation. If enabled, no errors are shown
Expand Down Expand Up @@ -284,91 +275,6 @@
</para>
</listitem>
</varlistentry>

<varlistentry xml:id="ini.magic-quotes-gpc">
<term>
<parameter>magic_quotes_gpc</parameter>
<type>bool</type>
</term>
<listitem>
&warn.deprecated.feature-5-3-0.removed-5-4-0;
<para>
Sets the magic_quotes state for GPC (Get/Post/Cookie)
operations. When magic_quotes are on, all ' (single-quote),
&quot; (double quote), \ (backslash) and NUL's are escaped
with a backslash automatically.
</para>
<para>
See also <function>get_magic_quotes_gpc</function>
</para>
</listitem>
</varlistentry>

<varlistentry xml:id="ini.magic-quotes-runtime">
<term>
<parameter>magic_quotes_runtime</parameter>
<type>bool</type>
</term>
<listitem>
&warn.deprecated.feature-5-3-0.removed-5-4-0;
<para>
If <parameter>magic_quotes_runtime</parameter> is enabled,
most functions that return data from any sort of external
source including databases and text files will have quotes
escaped with a backslash.
</para>
<para>
Functions affected by <parameter>magic_quotes_runtime</parameter>
(does not include functions from PECL):
<simplelist>
<member><function>get_meta_tags</function></member>
<member><function>file_get_contents</function></member>
<member><function>file</function></member>
<member><function>fgets</function></member>
<member><function>fwrite</function></member>
<member><function>fread</function></member>
<member><function>fputcsv</function></member>
<member><function>stream_socket_recvfrom</function></member>
<member><function>exec</function></member>
<member><function>system</function></member>
<member><function>passthru</function></member>
<member><function>stream_get_contents</function></member>
<member><function>bzread</function></member>
<member><function>gzfile</function></member>
<member><function>gzgets</function></member>
<member><function>gzwrite</function></member>
<member><function>gzread</function></member>
<member><function>exif_read_data</function></member>
<member><function>dba_insert</function></member>
<member><function>dba_replace</function></member>
<member><function>dba_fetch</function></member>
<member><function>ibase_fetch_row</function></member>
<member><function>ibase_fetch_assoc</function></member>
<member><function>ibase_fetch_object</function></member>
<member><function>mssql_fetch_row</function></member>
<member><function>mssql_fetch_object</function></member>
<member><function>mssql_fetch_array</function></member>
<member><function>mssql_fetch_assoc</function></member>
<member><function>mysqli_fetch_row</function></member>
<member><function>mysqli_fetch_array</function></member>
<member><function>mysqli_fetch_assoc</function></member>
<member><function>mysqli_fetch_object</function></member>
<member><function>pg_fetch_row</function></member>
<member><function>pg_fetch_assoc</function></member>
<member><function>pg_fetch_array</function></member>
<member><function>pg_fetch_object</function></member>
<member><function>pg_fetch_all</function></member>
<member><function>pg_select</function></member>
<member><function>sybase_fetch_object</function></member>
<member><function>sybase_fetch_array</function></member>
<member><function>sybase_fetch_assoc</function></member>
<member><function>SplFileObject::fgets</function></member>
<member><function>SplFileObject::fgetcsv</function></member>
<member><function>SplFileObject::fwrite</function></member>
</simplelist>
</para>
</listitem>
</varlistentry>

<varlistentry xml:id="ini.zend.enable-gc">
<term>
Expand Down
2 changes: 0 additions & 2 deletions reference/mysql/functions/mysql-escape-string.xml
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,6 @@ Escaped string: Zak\'s Laptop
<para>
<simplelist>
<member><function>mysql_real_escape_string</function></member>
<member><function>addslashes</function></member>
<member>The <link linkend="ini.magic-quotes-gpc">magic_quotes_gpc</link> directive.</member>
</simplelist>
</para>
</refsect1>
Expand Down
11 changes: 0 additions & 11 deletions reference/mysql/functions/mysql-real-escape-string.xml
Original file line number Diff line number Diff line change
Expand Up @@ -186,13 +186,6 @@ SELECT * FROM users WHERE user='aidan' AND password='' OR ''=''
last MySQL connection is used.
</para>
</note>
<note>
<para>
If <link linkend="ini.magic-quotes-gpc">magic_quotes_gpc</link> is enabled,
first apply <function>stripslashes</function> to the data. Using this function
on data which has already been escaped will escape the data twice.
</para>
</note>
<note>
<para>
If this function is not used to escape data, the query is vulnerable to
Expand All @@ -215,10 +208,6 @@ SELECT * FROM users WHERE user='aidan' AND password='' OR ''=''
<simplelist>
<member><function>mysql_set_charset</function></member>
<member><function>mysql_client_encoding</function></member>
<member><function>addslashes</function></member>
<member><function>stripslashes</function></member>
<member>The <link linkend="ini.magic-quotes-gpc">magic_quotes_gpc</link> directive</member>
<member>The <link linkend="ini.magic-quotes-runtime">magic_quotes_runtime</link> directive</member>
</simplelist>
</para>
</refsect1>
Expand Down