php-doc-en/reference/mysql/configure.xml

166 lines
6 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<section xml:id="mysql.installation" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
&reftitle.install;
<warning>
&mysql.alternative.note;
</warning>
<para xml:id="mysql.configure">
For compiling, simply use the
<option role="configure">--with-mysql[=DIR]</option>
configuration option where the optional <literal>[DIR]</literal> points to
the MySQL installation directory.
</para>
<para>
Although this MySQL extension is compatible with MySQL 4.1.0 and greater,
it doesn't support the extra functionality that these versions provide.
For that, use the <link linkend="book.mysqli">MySQLi</link> extension.
</para>
<para>
If you would like to install the mysql extension along with the mysqli extension
you have to use the same client library to avoid any conflicts.
</para>
<section xml:id="mysql.installation.linux">
<title>Installation on Linux Systems</title>
<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 xml:id="mysql.installation.compile.support">
<title>ext/mysql compile time support matrix</title>
<tgroup cols="5">
<thead>
<row>
<entry>PHP &Version;</entry>
<entry>&Default;</entry>
<entry>&ConfigureOptions;: <link linkend="mysqlnd.overview">mysqlnd</link></entry>
<entry>&ConfigureOptions;: <literal>libmysqlclient</literal></entry>
<entry>&Changelog;</entry>
</row>
</thead>
<tbody>
<row>
<entry>4.x.x</entry>
<entry>libmysqlclient</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>libmysqlclient</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 no longer bundled
</entry>
</row>
<row>
<entry>5.3.x</entry>
<entry>libmysqlclient</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">
<title>Installation on Windows Systems</title>
<section xml:id="mysql.installation.windows.php52">
<title>PHP 5.0.x, 5.1.x, 5.2.x</title>
<para>
MySQL is no longer enabled by default, so the
<filename>php_mysql.dll</filename> DLL must be enabled inside of
&php.ini;. Also, PHP needs access to the MySQL client library. A file
named <filename>libmysql.dll</filename> is included in the Windows PHP
distribution and in order for PHP to talk to MySQL this file needs to be
available to the Windows systems <envar>PATH</envar>. See the FAQ
titled "<link linkend="faq.installation.addtopath">How do I add my PHP
directory to the <envar>PATH</envar> on Windows</link>" for information on how to do
this. Although copying <filename>libmysql.dll</filename> to the Windows
system directory also works (because the system directory is by default in
the system's <envar>PATH</envar>), it's not recommended.
</para>
<para>
As with enabling any PHP extension (such as
<filename>php_mysql.dll</filename>), the PHP directive
<link linkend="ini.extension-dir">extension_dir</link> should be set to
the directory where the PHP extensions are located. See also the
<link linkend="install.windows.manual">Manual Windows Installation
Instructions</link>. An example extension_dir value for PHP 5 is
<literal>c:\php\ext</literal>
</para>
<note>
<para>
If when starting the web server an error similar to the following occurs:
<literal>"Unable to load dynamic library './php_mysql.dll'"</literal>,
this is because <filename>php_mysql.dll</filename> and/or
<filename>libmysql.dll</filename> cannot be found by the system.
</para>
</note>
</section>
<section xml:id="mysql.installation.windows.php53">
<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>
<section xml:id="mysql.installation.notes">
<title>MySQL Installation Notes</title>
<warning>
<para>
Crashes and startup problems of PHP may be encountered
when loading this extension in conjunction with the recode extension.
See the <link linkend="ref.recode">recode</link> extension for more
information.
</para>
</warning>
<note>
<para>
If you need charsets other than <emphasis>latin</emphasis> (default), you
have to install external (not bundled) libmysqlclient with compiled charset
support.
</para>
</note>
</section>
</section>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->