Bring installation instructions into line with current reality.

Flag username and password parameters as optional for the ctor.


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@179349 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Dan Scott 2005-02-09 17:20:15 +00:00
parent ab6b36e104
commit 55a668cc6a
2 changed files with 95 additions and 17 deletions

View file

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.8 $ -->
<!-- $Revision: 1.9 $ -->
<refentry id="function.PDO-construct">
<refnamediv>
<refname>PDO::__construct</refname>
@ -12,8 +12,8 @@
<methodsynopsis>
<type>PDO</type><methodname>PDO::__construct</methodname>
<methodparam><type>string</type><parameter>dsn</parameter></methodparam>
<methodparam><type>string</type><parameter>username</parameter></methodparam>
<methodparam><type>string</type><parameter>password</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>username</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>password</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter>driver_options</parameter></methodparam>
</methodsynopsis>
&warn.experimental.func;
@ -72,14 +72,16 @@
<varlistentry><term>username</term>
<listitem>
<para>
The user name, if required, for the DSN string.
The user name for the DSN string. This parameter is optional for
some PDO drivers.
</para>
</listitem>
</varlistentry>
<varlistentry><term>password</term>
<listitem>
<para>
The password, if required, for the DSN string.
The password for the DSN string. This parameter is optional for
some PDO drivers.
</para>
</listitem>
</varlistentry>

View file

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.13 $ -->
<!-- $Revision: 1.14 $ -->
<!-- Generated by xml_proto.php v2.1. Found in /scripts directory of phpdoc. -->
<reference id="ref.pdo">
<title>PDO Functions</title>
@ -21,10 +21,13 @@
</section>
<section id="pdo.installation">
&reftitle.install;
<!-- Uncomment this section when PDO actually stabilizes and PEAR method
works -->
<!--
<para>
PDO is currently available as a PECL extension from
<ulink url='&url.pecl.package;pdo'>&url.pecl.package;pdo</ulink>.
Ensure you have installed the CGI version of PHP and that the
Ensure you have installed the CLI version of PHP and that the
<command>pear</command> and <command>phpize</command> scripts are
available in your current path.
</para>
@ -37,11 +40,6 @@ pear install pdo
]]>
</screen>
</para>
<para>
Windows users can download the extension DLL <filename>php_pdo.dll</filename>
as part of the PECL collection binaries from
<ulink url='&url.php.downloads;'>&url.php.downloads;</ulink>.
</para>
<para>
The <command>pear</command> command automatically installs the
PDO module into your PHP extensions directory. To enable the
@ -52,14 +50,88 @@ pear install pdo
extension=pdo.so
]]>
</screen>
To enable the PDO extension on Windows operating systems, you must
add the following line to &php.ini;:
<screen>
</para>
-->
<procedure id='installwindows'>
<title>Windows</title>
<step>
<para>
Windows users can download the extension DLL <filename>php_pdo.dll</filename>
as part of the PECL collection binaries from
<ulink url='&url.php.downloads;'>&url.php.downloads;</ulink>.
</para>
</step>
<step>
<para>
To enable the PDO extension on Windows operating systems, you must
add the following line to &php.ini;:
<screen>
<![CDATA[
extension=php_pdo.dll
]]>
</screen>
</para>
</screen>
</para>
</step>
<para>
Follow the same steps to install and enable the PDO drivers of your
choice.
</para>
</procedure>
<procedure id='installunix'>
<title>Linux and UNIX</title>
<para>
Due to a bug in the <command>pear</command> installer you should install
the PDO package manually using the following steps:
</para>
<step>
<para>Download the PDO package to your local machine:
<screen>
<![CDATA[
bash$ wget http://pecl.php.net/get/PDO
]]>
</screen>
</para>
</step>
<step>
<para>
Determine your PHP <filename>bin</filename> directory. If your
PHP 5 CLI binary lives at <filename>/usr/local/php5/bin/php</filename>
then the bin dir is <filename>/usr/local/php5/bin</filename>.
</para>
</step>
<step>
<para>
Set your path so that your PHP <filename>bin</filename> directory
is at the front:
<screen>
<![CDATA[
export PATH="/usr/local/php5/bin:$PATH"
]]>
</screen>
</para>
</step>
<step>
<para>
Manually build and install the PDO extension:
<screen>
<![CDATA[
bash$ tar xzf PDO-0.2.tgz
bash$ cd PDO-0.2
bash$ phpize
bash$ ./configure
bash$ make
bash$ sudo -s
bash# make install
bash# echo extension=pdo.so >> /usr/local/php5/lib/php.ini
]]>
</screen>
</para>
</step>
<para>
Follow the same steps to install and enable the PDO drivers of your
choice.
</para>
</procedure>
</section>
<section id="pdo.drivers">
<title>PDO Drivers</title>
@ -74,6 +146,10 @@ extension=php_pdo.dll
</row>
</thead>
<tbody>
<row>
<entry>PDO_DBLIB</entry>
<entry>FreeTDS / Microsoft SQL Server / Sybase</entry>
</row>
<row>
<entry>PDO_FIREBIRD</entry>
<entry>Firebird/Interbase 6</entry>