Moved Linux+MySQL installation information to a table, and removed a few PHP 4 specific details. And fixed a bug that stated mysqlnd (and all mysql extensions) are enabled by default.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@318281 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Philip Olson 2011-10-21 01:37:42 +00:00
parent 7207fb703d
commit 9cac711102

View file

@ -21,50 +21,55 @@
<section xml:id="mysql.installation.linux">
<title>Installation on Linux Systems</title>
<section>
<title>PHP 4</title>
<para>
The option <option role="configure">--with-mysql</option> is
enabled by default. This default behavior may be disabled with the
<option role="configure">--without-mysql</option> configure option.
If MySQL is enabled without specifying the path to the
MySQL install DIR, PHP will use the bundled MySQL client libraries.
</para>
<para>
Users who run other applications that use MySQL (for example,
<literal>auth-mysql</literal>) should not use the bundled library, but rather specify the
path to MySQL's install directory, like so:
<option role="configure">--with-mysql=/path/to/mysql</option>.
This will force PHP to use the client libraries installed by MySQL, thus
avoiding any conflicts.
</para>
</section>
<section>
<title>PHP 5.0.x, 5.1.x, 5.2.x</title>
<para>
MySQL is not enabled by default, nor is the MySQL library
bundled with PHP. Read this <link linkend="faq.databases.mysql.php5">
FAQ</link> for details on why. Use the
<option role="configure">--with-mysql[=DIR]</option> configure option
to include MySQL support.
You can download <emphasis>headers and libraries</emphasis> from
<link xlink:href="&url.mysql;">MySQL</link>.
</para>
</section>
<section xml:id="mysql.installation.linux.mysqlnd">
<title>PHP 5.3.0+</title>
<para>
In PHP 5.3.0 and above the MySQL-related database extensions use the
<link linkend="mysqlnd.overview">MySQL Native Driver</link>
by default. This means that the MySQL Client Library (<literal>libmysql</literal>)
is no longer required in order to support connection to a MySQL database. The extensions
<literal>mysql</literal>, <literal>mysqli</literal>, and <literal>PHP_PDO_MYSQL</literal> are
all enabled by default in PHP 5.3.0+, and all use the MySQL Native Driver by default. In each
case no further installation steps are required in order to use these extensions, although
you may want to set some preferences in <filename>php.ini</filename> depending on your
requirements.
</para>
</section>
<para>
Note: <literal>[DIR]</literal> is the path to the MySQL client library
files (<emphasis>headers and libraries</emphasis>), which can be downloaded from
<link xlink:href="&url.mysql;">MySQL</link>.
</para>
<table>
<title>MySQL compile time support matrix</title>
<tgroup cols="5">
<thead>
<row>
<entry>PHP Version</entry>
<entry>Default</entry>
<entry>Flag: <link linkend="mysqlnd.overview">mysqlnd</link></entry>
<entry>Flag: <literal>libmysql</literal></entry>
<entry>Changelog and notes</entry>
</row>
</thead>
<tbody>
<row>
<entry>4.x.x</entry>
<entry>libmysql</entry>
<entry>&NotAvailable;</entry>
<entry><option role="configure">--without-mysql</option> to disable</entry>
<entry>MySQL enabled by default, MySQL client libraries are bundled</entry>
</row>
<row>
<entry>5.0.x, 5.1.x, 5.2.x</entry>
<entry>libmysql</entry>
<entry>&NotAvailable;</entry>
<entry><option role="configure">--with-mysql=[DIR]</option></entry>
<entry>MySQL is no longer enabled by default, and the MySQL client libraries are <link linkend="faq.databases.mysql.php5">no longer bundled</link></entry>
</row>
<row>
<entry>5.3.x</entry>
<entry>libmysql</entry>
<entry><option role="configure">--with-mysql=mysqlnd</option></entry>
<entry><option role="configure">--with-mysql=[DIR]</option></entry>
<entry>mysqlnd is now available</entry>
</row>
<row>
<entry>5.4.x</entry>
<entry>mysqlnd</entry>
<entry><option role="configure">--with-mysql</option></entry>
<entry><option role="configure">--with-mysql=[DIR]</option></entry>
<entry>mysqlnd is now the default</entry>
</row>
</tbody>
</tgroup>
</table>
</section>
<section xml:id="mysql.installation.windows">
@ -109,11 +114,12 @@
</note>
</section>
<section>
<title>PHP 5.3.0+</title>
<para>
Please refer to <link linkend="mysql.installation.linux.mysqlnd">these notes</link> on
installing MySQL support on PHP 5.3.0 and above.
</para>
<title>PHP 5.3.0+</title>
<para>
The <link linkend="mysqlnd.overview">MySQL Native Driver</link> is enabled by
default. Include <filename>php_mysql.dll</filename>, but <filename>libmysql.dll</filename>
is no longer required or used.
</para>
</section>
</section>