1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157
|
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 1.2 $ -->
<chapter xml:id="sdodasrel.setup" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
&reftitle.setup;
<!-- {{{ Requirements -->
<section xml:id="sdodasrel.requirements">
&reftitle.required;
<para>
The Relational DAS requires that the SDO extension be installed.
The SDO extension requires a version of PHP 5.1, and the
Relational DAS requires a recent version that contains
an important fix for PDO. The most up-to-date information about
required levels of PHP should be found in the changelog for the
package on PECL. At the time of writing, though, the Relational
DAS requires the most recent beta level of PHP 5.1, that is
PHP 5.1.0.
</para>
<para>
The Relational DAS uses PDO to access the relational database,
and so should run with a variety of different relational databases.
At the time of writing it has been tested in the following configurations
<itemizedlist>
<listitem>
<para>
MySQL 4.1.14, on Windows.
The Relational DAS operates correctly with the php_pdo_mysql
driver that comes with the pre-built binaries for PHP 5.1.0.
</para>
</listitem>
<listitem>
<para>
MySQL 4.1.13, on Linux. It is necessary to have the most up-to-date
PDO driver for MySQL, which comes built in to PHP 5.1.0.
It may be necessary to uninstall the usual driver that would have
come from PECL using
<command>pear uninstall pdo_mysql</command>
. You will need to configure PHP with the
<command>--with-pdo-mysql</command> option.
</para>
</listitem>
<listitem>
<para>
DB2 8.2 Personal Edition, on Windows.
The Relational DAS operates correctly with the
php_pdo_odbc driver that comes with the pre-built binaries for
PHP 5.1.0.
</para>
</listitem>
<listitem>
<para>
DB2 8.2 Personal Developer's Edition, on Linux.
The Developer's Edition is needed because it
contains the include files needed when PHP is configured
and built. You will need to configure PHP with the
<command>--with-pdo-odbc=ibm-db2</command> option.
</para>
</listitem>
</itemizedlist>
</para>
<para>
The Relational DAS applies changes to the database within
a user-delimited transaction: that is, it issues a call to
<function>PDO::beginTransaction</function>
before beginning to apply changes, and
<function>PDO::commit</function>
or
<function>PDO::rollback</function>
on completion.
Whichever database is chosen, the database and the PDO driver
for the database must support these calls.
</para>
</section>
<!-- }}} -->
<!-- {{{ Installation -->
<section xml:id="sdodasrel.installation">
&reftitle.install;
<para>
The installation instructions for all the SDO components
are in the SDO
<link linkend="sdo.installation">install</link>
section of the SDO documentation.
</para>
<para>
In any case, the essential facts are that
the Relational DAS is written in PHP and it
should be placed somewhere on the PHP
<link linkend="ini.include-path">include_path</link>.
</para>
<para>
Your application will of course need to include the Relational DAS
with a statement like this:
<programlisting role="php">
<![CDATA[
<?php
require_once 'SDO/DAS/Relational.php';
?>
]]>
</programlisting>
</para>
</section>
<!-- }}} -->
<!-- {{{ Configuration -->
<section xml:id="sdodasrel.configuration">
&reftitle.runtime;
&no.config;
<section xml:id='sdo.das.rel.tracing'>
<title>Tracing</title>
<para>
You may be interested in seeing the SQL statements that are generated
in order to apply changes back to the database. At the top of the
<filename>SDO/DAS/Relational.php</filename>
you will find a number of constants which control whether the process
of constructing and executing the SQL statements is to be traced.
Try setting
<varname>DEBUG_EXECUTE_PLAN</varname>
to &true; to see the generated SQL statements.
</para>
</section>
</section>
<!-- }}} -->
<!-- {{{ Resources -->
<section xml:id="sdodasrel.resources">
&reftitle.resources;
&no.resource;
</section>
<!-- }}} -->
</chapter>
<!-- 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
-->
|