Improved install info, and moved newer info above the old

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@337722 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Philip Olson 2015-09-03 00:32:00 +00:00
parent 5dd7ff3e72
commit 67cc2eb5d8

View file

@ -16,22 +16,27 @@
<para>
The common Unix distributions include binary versions of PHP that can
be installed. Although these binary versions are typically built with
support for MySQL extensions enabled, the extension libraries
support for the MySQL extensions, the extension libraries
themselves may need to be installed using an additional package. Check
the package manager than comes with your chosen distribution for
availability.
</para>
<para>
Unless your Unix distribution comes with a binary package of PHP with
the <literal>mysqli</literal> extension available, you will need to
build PHP from source code. Building PHP from source allows you to
specify the MySQL extensions you want to use, as well as your choice
of client library for each extension.
For example, on Ubuntu the <literal>php5-mysql</literal> package installs
the ext/mysql, ext/mysqli, and pdo_mysql PHP extensions. On CentOS,
the <literal>php-mysql</literal> package also installs these three
PHP extensions.
</para>
<para>
The MySQL Native Driver is the recommended option, as it
Alternatively, you can compile this extension yourself. Building PHP from
source allows you to specify the MySQL extensions you want to use, as well
as your choice of client library for each extension.
</para>
<para>
The MySQL Native Driver is the recommended client library option, as it
results in improved performance and gives access to features not
available when using the MySQL Client Library. Refer to
<link linkend="mysqli.overview.mysqlnd">What is PHP's MySQL Native
@ -59,25 +64,25 @@
</thead>
<tbody>
<row>
<entry>5.0.x, 5.1.x, 5.2.x</entry>
<entry>libmysqlclient</entry>
<entry>&NotAvailable;</entry>
<entry>5.4.x and above</entry>
<entry>mysqlnd</entry>
<entry><option role="configure">--with-mysqli</option></entry>
<entry><option role="configure">--with-mysqli=/path/to/mysql_config</option></entry>
<entry></entry>
<entry>mysqlnd is the default</entry>
</row>
<row>
<entry>5.3.x</entry>
<entry>libmysqlclient</entry>
<entry><option role="configure">--with-mysqli=mysqlnd</option></entry>
<entry><option role="configure">--with-mysqli=/path/to/mysql_config</option></entry>
<entry>mysqlnd is now supported</entry>
<entry>mysqlnd is supported</entry>
</row>
<row>
<entry>5.4.x</entry>
<entry>mysqlnd</entry>
<entry><option role="configure">--with-mysqli</option></entry>
<entry>5.0.x, 5.1.x, 5.2.x</entry>
<entry>libmysqlclient</entry>
<entry>&NotAvailable;</entry>
<entry><option role="configure">--with-mysqli=/path/to/mysql_config</option></entry>
<entry>mysqlnd is now the default</entry>
<entry>mysqlnd is not supported</entry>
</row>
</tbody>
</tgroup>
@ -92,20 +97,6 @@
possible.
</para>
<para>
The following example builds the MySQL extension to use the MySQL
Client Library, and the <literal>mysqli</literal> and PDO MYSQL
extensions to use the MySQL Native Driver:
</para>
<programlisting role="shell">
<![CDATA[
./configure --with-mysql=/usr/bin/mysql_config \
--with-mysqli=mysqlnd \
--with-pdo-mysql=mysqlnd
[other options]
]]>
</programlisting>
</section>
<section xml:id="mysqli.installation.windows">
@ -117,12 +108,27 @@
installer.
</para>
<section xml:id="mysqli.installation.windows.php53">
<title>PHP 5.3.0 and newer</title>
<para>
On Windows, for PHP versions 5.3 and newer, the
<literal>mysqli</literal> extension is enabled and
uses the MySQL Native Driver by default. This means you don't need to
worry about configuring access
to <filename>libmysql.dll</filename>.
</para>
</section>
<section xml:id="mysqli.installation.windows.php52">
<title>PHP 5.0, 5.1, 5.2</title>
<para>
Once PHP has been installed, some configuration is
On these old unsupported PHP versions (PHP 5.2 reached EOL on '6 Jan 2011'),
additional configuration procedures are
required to enable <literal>mysqli</literal> and specify the client
library you want it to use.
</para>
@ -175,20 +181,6 @@
</note>
</section>
<section xml:id="mysqli.installation.windows.php53">
<title>PHP 5.3.0+</title>
<para>
On Windows, for PHP versions 5.3 and newer, the
<literal>mysqli</literal> extension is enabled and
uses the MySQL Native Driver by default. This means you don't need to
worry about configuring access
to <filename>libmysql.dll</filename>.
</para>
</section>
</section>
</section>